Skip to content

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

Open
@RavinaChidambaram

Description

@RavinaChidambaram

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions