fix master database behavior

This commit is contained in:
sfalkon
2019-11-11 14:41:20 +03:00
committed by Will Rouesnel
parent 9b13f5ec57
commit deac1c37db
4 changed files with 112 additions and 73 deletions

View File

@@ -166,7 +166,7 @@ flag. This removes all built-in metrics, and uses only metrics defined by querie
### Automatically discover databases
To scrape metrics from all databases on a database server, the database DSN's can be dynamically discovered via the
`--auto-discover-databases` flag. When true, `SELECT datname FROM pg_database WHERE datallowconn = true AND datistemplate = false` is run for all configured DSN's. From the
`--auto-discover-databases` flag. When true, `SELECT datname FROM pg_database WHERE datallowconn = true AND datistemplate = false and datname != current_database()` is run for all configured DSN's. From the
result a new set of DSN's is created for which the metrics are scraped.
In addition, the option `--exclude-databases` adds the possibily to filter the result from the auto discovery to discard databases you do not need.