From 57449c476893687293adf127a3f34072d8016644 Mon Sep 17 00:00:00 2001 From: Guillaume Belrose Date: Tue, 28 Aug 2018 08:58:08 +0200 Subject: [PATCH] Clarified that the % character has to be escaped when using the wmi_exporter from the command prompt or batch files. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 90f869f5..2c4f2cae 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,10 @@ The prometheus metrics will be exposed on [localhost:9182](http://localhost:9182 .\wmi_exporter.exe --collectors.enabled "process" --collector.process.processes-where "Name LIKE 'firefox%'" -When there are multiple processes with the same name, WMI represents those after the first instance as `process-name#index`. So to get them all, rather than just the first one, the query needs to be a wildcard search. +When there are multiple processes with the same name, WMI represents those after the first instance as `process-name#index`. So to get them all, rather than just the first one, the query needs to be a wildcard search using a `%` character. + +Please note that in Windows batch scripts (and when using the `cmd` command prompt), the `%` character is reserved, so it has to be escaped with another `%`. For example, the wildcard syntax for searching for all firefox processes is `firefox%%`. + ## License