Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for fetching pg_stat_user_tables metrics from all databases when PG_EXPORTER_AUTO_DISCOVER_DATABASES is enabled #1059

Open
RavinaChidambaram opened this issue Aug 12, 2024 · 0 comments

Comments

@RavinaChidambaram
Copy link

RavinaChidambaram commented Aug 12, 2024

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.

@RavinaChidambaram RavinaChidambaram changed the title pg_stat Support for fetching pg_stat_user_tables metrics from all databases when PG_EXPORTER_AUTO_DISCOVER_DATABASES is enabled Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant