Closed aclerc-blachere closed 1 month ago
Hello
You can disable some collectors, all examples are described in the documentation here
If you use pgSCV in Docker or K8S then you should disable at least the system collector
The error
pg_stat_statements not found
is related to the fact that the pg_stat_statements extension is not installed in your database.
You should install it and then the error will disappear
Here is an example of a typical configuration to run in Docker or K8S to monitor a remote database
settings via pgscv.yaml configuration file
listen_address: 0.0.0.0:9890
services:
"MYSERVICE":
service_type: "postgres"
conninfo: "postgres://USER:PASSWORD@REMOTESERVER:5432/MYDB"
disable_collectors:
- system
databases: "MYDB"
or settings via environment variables
PGSCV_LISTEN_ADDRESS: "0.0.0.0:9890"
DATABASE_DSN_MYSERVICE: "postgresql://USER:PASSWORD@REMOTESERVER:5432/MYDB"
PGSCV_DISABLE_COLLECTORS: "system"
PGSCV_DATABASES: "MYDB"
Is your feature request related to a problem? Please describe. I see some errors but they don't block the scraping
It would be also nice to be able to disable scrapping localhost (in my configuration, pgscv is just a docker scraping distant postgreSQL, i have nothing to scrap locally)
Describe the solution you'd like some configuration / documentation about these features
Describe alternatives you've considered Ignoring error messages, i don't know if they prevent me from having some metrics but i didn't go that far with the tool yet. It's just spamming the errors in the error / war loglevel
Additional context in my configuration, pgscv is just a docker scraping distant postgreSQL. pgscv is packaged inside a kubernetes cluster (i would like to propose a helm chart in the future as well)