Automatic reload service configuration - cherts/pgscv GitHub Wiki
Starting with pgSCV version 0.15.2, it has become possible to automatic reload service configuration.
When connecting to PostgreSQL, the PgSCV service checks a database instance parameters (version, extensions, etc).
If these parameters are changed during operation (for example, if the PostgreSQL version is updated), PgSCV will not be able to detect this without restarting, and some collectors may stop collecting data.
Enabling the refresh_service_config_interval parameter to allows PgSCV to periodically check database instance parameters.
You can also manual reload using the /flush-services-config endpoint, for example, using curl:
curl -sL http://127.0.0.1:9890/flush-services-config
Complete YAML configuration file example:
listen_address: 127.0.0.1:9890
refresh_service_config_interval: 12h
services:
"postgres1":
service_type: "postgres"
conninfo: "postgres://pgscv:pa$$w0rd@postgres1:5432/db1"
"postgres2":
service_type: "postgres"
conninfo: "postgres://pgscv:pa$$w0rd@postgres2:5432/db2"