diff --git a/README.md b/README.md index 12676658..cc65f25f 100644 --- a/README.md +++ b/README.md @@ -44,13 +44,19 @@ Name | Description `LISTEN_PORT` | The port to bind to. Defaults to 9182. `METRICS_PATH` | The path at which to serve metrics. Defaults to `/metrics` `TEXTFILE_DIR` | As the `--collector.textfile.directory` flag, provide a directory to read text files with metrics from +`EXTRA_FLAGS` | Allows passing full CLI flags. Defaults to an empty string. -Parameters are sent to the installer via `msiexec`. Example invocation: +Parameters are sent to the installer via `msiexec`. Example invocations: ```powershell msiexec /i ENABLED_COLLECTORS=os,iis LISTEN_PORT=5000 ``` +Example service collector with a custom query. +```powershell +msiexec /i ENABLED_COLLECTORS=os,service --% EXTRA_FLAGS="--collector.service.services-where ""Name LIKE 'sql%'""" +``` + ## Roadmap See [open issues](https://github.com/martinlindhe/wmi_exporter/issues) diff --git a/installer/wmi_exporter.wxs b/installer/wmi_exporter.wxs index f45b78a5..7064a635 100644 --- a/installer/wmi_exporter.wxs +++ b/installer/wmi_exporter.wxs @@ -19,6 +19,9 @@ ENABLED_COLLECTORS + + EXTRA_FLAGS + LISTEN_ADDR OR LISTEN_PORT @@ -42,7 +45,7 @@ - +