postgres_exporter icon indicating copy to clipboard operation
postgres_exporter copied to clipboard

one exporter monitor multi pg instance but just return one pg_up metric

Open shutao917 opened this issue 6 years ago • 4 comments

hi, i run exporter in docker,with DATA_SOURCE_NAME= postgresql://user:[email protected]:5432/postgres?sslmode=disable,postgresql://user:[email protected]:5432/postgres?sslmode=disable but the exporter just return one "pg_up{} 1" metric exception is: pg_up{server:"postgres-single.postgresql:5432"} 1 pg_up{server:"postgres-single.postgresql-2:5432"} 1

shutao917 avatar Dec 13 '19 02:12 shutao917

I have the same issue. I checked previous versions and the last one correctly working 0.5.1. On servers with many sources, rolled back to 0.5.1. pg_up is an important metric for a trigger as pg_up != 10.

IgorOhrimenko avatar Dec 16 '19 15:12 IgorOhrimenko

Same here, proposed idea about labels in pg_up metrics seems sufficient. @wrouesnel what do You think?

aamkye avatar Jan 07 '20 12:01 aamkye

Same here, would expect server label here

timown avatar Sep 23 '20 13:09 timown

@SuperQ do you have any plan to support "server" label for pg_up? https://awesome-prometheus-alerts.grep.to/rules#rule-postgresql-1-1 for multi instance availability alert

azhurbilo avatar May 12 '21 17:05 azhurbilo