postgres_db_exporter not able find metrics|| pg_postmaster_start_time_seconds

948 views
Skip to first unread message

Prashant Singh

unread,
Jan 23, 2023, 1:22:25 AM1/23/23
to Prometheus Users
hello ,

I am not able find metrics having  pg_postmaster_start_time_seconds.

postres_exporter version 0.11.1
DB version : 12.12.0


pg_postmaster_start_time_seconds{release="$release", instance="$instance"} * 1000

thanks 

prashant 

Brian Candler

unread,
Jan 23, 2023, 3:17:13 AM1/23/23
to Prometheus Users
Do you really mean "postgres_db_exporter", or do you mean "postgres_exporter", i.e. this one?

Maybe you have the wrong values for 'release' and 'instance' labels.  What happens if you query:

    pg_postmaster_start_time_seconds

without any label filters? (You can do this in prometheus's own web interface).

If that doesn't return anything, then are you getting *any* metrics from the exporter at all?  For example, if your scrape job has

  - job_name: 'postgres'

then you can try querying

{job="postgres"}

If that query shows nothing, then probably your scrapes aren't working at all.  Look in the Prometheus web interface under Status > Targets.

Brian Candler

unread,
Jan 23, 2023, 5:08:20 AM1/23/23
to Prometheus Users
Also, if you *are* talking about prometheus-community/postgres_exporter, then note that pg_postmaster_start_time_seconds comes from the sample queries.yaml, which won't be used unless you're using the -extend.query-path flag or the PG_EXPORTER_EXTEND_QUERY_PATH environment variable to point to a copy of that file. See:

Reply all
Reply to author
Forward
0 new messages