prometheus-community / postgres_exporter

A PostgreSQL metric exporter for Prometheus
Apache License 2.0
2.72k stars 725 forks source link

Have a custom prefix for each of the default metrics created by postgres_exporter #364

Open ajaybhat opened 4 years ago

ajaybhat commented 4 years ago

Currently postgres_exporter exports default metrics of the form pg_metric_column. For eg. pg_stat_replication_pid. Since we may write additional queries to get more metrics, through the PG_EXPORTER_EXTEND_QUERY_PATH, we would have customised metric names in the queries.yaml file, for eg foo_bar_replication. It would be nice to have a way to have the existing default metrics also have the foo_bar prefix, so we can collect all the metrics under single logical umbrella.

ajaybhat commented 4 years ago

I could work on this, if needed

uspen commented 4 years ago

I use --disable-default-metrics and write all my metrics to extended queries