cmd: add --scrape.stdout one-shot mode (#2705)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau
2026-10-13 16:44:34 +02:00
committed by GitHub
parent 8f118226f7
commit 5d6cf525bf
4 changed files with 102 additions and 5 deletions
+1
View File
@@ -93,6 +93,7 @@ windows_exporter accepts flags to configure certain behaviours. The ones configu
| `--telemetry.path` | URL path for surfacing collected metrics. | `/metrics` |
| `--collectors.enabled` | Comma-separated list of collectors to use. Use `[defaults]` as a placeholder which gets expanded containing all the collectors enabled by default. | `[defaults]` |
| `--scrape.timeout-margin` | Seconds to subtract from the timeout allowed by the client. The margin takes at most half of the client's timeout. Tune to allow for overhead or high loads. | `0.5` |
| `--scrape.stdout` | Collect metrics once and write them to stdout, then exit. Logs go to stderr unless `--log.file` is set. PDH rate counters cover only a short interval on the first scrape after startup. | `false` |
| `--web.config.file` | A [web config][web_config] for setting up TLS and Auth | None |
| `--config.file` | [Using a config file](#using-a-configuration-file) from path | None |
| `--log.file` | Output file of log messages. One of [stdout, stderr, eventlog, \<path to log file>]<br>**NOTE:** The MSI installer will add a default argument to the installed service setting this to eventlog | stderr |