From 2290969596294287181c8fd5976403902bd13631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Hofst=C3=A4tter?= Date: Fri, 3 Apr 2020 20:49:11 +0200 Subject: [PATCH] Fix README to use new `--collector.process.whitelist` (#497) With PR #489 `--collector.process.processes-where` no longer works, changing example to use `--collector.process.whitelist` with regexp --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 360c6f12..f4e13c0f 100644 --- a/README.md +++ b/README.md @@ -97,11 +97,9 @@ The prometheus metrics will be exposed on [localhost:9182](http://localhost:9182 ### Enable only process collector and specify a custom query - .\wmi_exporter.exe --collectors.enabled "process" --collector.process.processes-where "Name LIKE 'firefox%'" + .\wmi_exporter.exe --collectors.enabled "process" --collector.process.whitelist="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 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%%`. +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 [regular expression](https://en.wikipedia.org/wiki/Regular_expression) must use `.+`. See [process](docs/collector.process.md) for more information. ## License