CrunchyData / postgres-operator

Production PostgreSQL for Kubernetes, from high availability Postgres clusters to full-scale database-as-a-service.
https://access.crunchydata.com/documentation/postgres-operator/v5/
Apache License 2.0
3.94k stars 592 forks source link

postgres_exporter: set auto-discover-databases=true #3587

Open mzwettler2 opened 1 year ago

mzwettler2 commented 1 year ago

I found that the default postgres_exporter configuration only scrapes the "postgres" database (auto-discover-databases=false).

Setting auto-discover-databases=true would scrape metrics for all databases per postgres_exporter documentation.

I could not find a possiblity to set this option (auto-discover-databases=true) or environment parameter (_PG_EXPORTER_AUTO_DISCOVERDATABASES=true) within PostgresCluster.spec.monitoring.pgmonitor.exporter.

Any hint?

andrewlecuyer commented 1 year ago

@mzwettler2 thanks for reaching out!

Just a quick update to let you know that we have a feature request in the PGO backlog for enabling the auto discovery of databases with the Postgres Exporter.

If there are any other details you'd like to provide about your use case, requirements, environment, etc. just let us know.