From 75d542d496c90dd7366034a875d35bbe48d2d28d Mon Sep 17 00:00:00 2001 From: "Vladimir N. Indik" Date: Wed, 20 Nov 2019 00:19:34 +0100 Subject: [PATCH] Update "Flags" list in README (#331) * Update README according --help output * Update environment variables list in README --- README.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e6add597..a81bcd9b 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,9 @@ Package vendoring is handled with [`govendor`](https://github.com/kardianos/gove ### Flags +* `help` + Show context-sensitive help (also try --help-long and --help-man). + * `web.listen-address` Address to listen on for web interface and telemetry. Default is `:9187`. @@ -55,6 +58,9 @@ Package vendoring is handled with [`govendor`](https://github.com/kardianos/gove * `disable-settings-metrics` Use the flag if you don't want to scrape `pg_settings`. +* `auto-discover-databases` + Whether to discover the databases on a server dynamically. + * `extend.query-path` Path to a YAML file containing custom queries to run. Check out [`queries.yaml`](queries.yaml) for examples of the format. @@ -63,6 +69,15 @@ Package vendoring is handled with [`govendor`](https://github.com/kardianos/gove Do not run - print the internal representation of the metric maps. Useful when debugging a custom queries file. +* `constantLabels` + Labels to set in all metrics. A list of `label=value` pairs, separated by commas. + +* `version` + Show application version. + +* `exclude-databases` + A list of databases to remove when autoDiscoverDatabases is enabled. + * `log.level` Set logging level: one of `debug`, `info`, `warn`, `error`, `fatal` @@ -70,9 +85,6 @@ Package vendoring is handled with [`govendor`](https://github.com/kardianos/gove Set the log output target and format. e.g. `logger:syslog?appname=bob&local=7` or `logger:stdout?json=true` Defaults to `logger:stderr`. -* `constantLabels` - Labels to set in all metrics. A list of `label=value` pairs, separated by commas. - ### Environment Variables The following environment variables configure the exporter: @@ -114,6 +126,9 @@ The following environment variables configure the exporter: * `PG_EXPORTER_DISABLE_SETTINGS_METRICS` Use the flag if you don't want to scrape `pg_settings`. Value can be `true` or `false`. Defauls is `false`. +* `PG_EXPORTER_AUTO_DISCOVER_DATABASES` + Whether to discover the databases on a server dynamically. Value can be `true` or `false`. Defauls is `false`. + * `PG_EXPORTER_EXTEND_QUERY_PATH` Path to a YAML file containing custom queries to run. Check out [`queries.yaml`](queries.yaml) for examples of the format. @@ -121,6 +136,9 @@ The following environment variables configure the exporter: * `PG_EXPORTER_CONSTANT_LABELS` Labels to set in all metrics. A list of `label=value` pairs, separated by commas. +* `PG_EXPORTER_EXCLUDE_DATABASES` + A comma-separated list of databases to remove when autoDiscoverDatabases is enabled. Default is empty string. + Settings set by environment variables starting with `PG_` will be overwritten by the corresponding CLI flag if given. ### Setting the Postgres server's data source name