Description
Hi,
When the PG_EXPORTER_AUTO_DISCOVER_DATABASES
flag is set to true, I have noticed that metrics from the pg_stat_user_tables view are only being fetched from the postgres
database in the latest version: prometheuscommunity/postgres-exporter:v0.15.0
. However, I would like to retrieve these metrics from all available databases in the instance.
Use Case:
I am looking to scale my PostgreSQL instance based on the rate of incoming read requests to better handle traffic. For this, I need to monitor the pg_stat_user_tables_seq_scan
and pg_stat_user_tables_idx_scan
metrics across all tables in all databases.
With this data, I plan to run a Prometheus query that computes the rate of sum of the total scans(idx_scan and seq_scan) from all databases. With the result of the query, I can then scale my postgres instance.
So, adding support to fetch these metrics from all the databases would be very helpful.