Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand All @@ -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.
Expand All @@ -63,16 +69,22 @@ 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`

* `log.format`
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:
Expand Down Expand Up @@ -111,13 +123,19 @@ 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.

* `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
Expand Down