prometheus-community / prometheus-community/postgres_exporter

metric was collected before with the same name and label values v0.8.0

Open
#439 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
3.6k
Forks
835
Avg merge
2d 4h
Merged PRs (30d)
10

Description

I'm facing this error more often these days. Whenever I update the deployment, one or more metrics get this error.

* collected metric "pg_stat_statements_calls" { label:<name:"datname" value:"hamada" >  label:<name:"rolname" value:"xxx" > label:<name:"server" value:"xxx.svc:5432" > untyped:<value:2 > } was collected before with the same name and label values
* collected metric "pg_stat_statements_total_time_seconds" { label:<name:"datname" value:"hamada" > label:<name:"rolname" value:"xxx" > label:<name:"server" value:"xxx.svc:5432" > untyped:<value:7.026152139000001 > } was collected before with the same name and label values

I'm using exporter v0.8.0
I'm sure that I'm using a superuser.

To solve this issue temporarily, I delete the metrics and stop collecting them!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the duplicate-metric error with postgres_exporter v0.8.0 during a deployment while pg_stat_statements metrics are enabled. Trace the metric collection path and compare behavior before and after the deployment; the issue is done when these metrics are collected without duplicate-name errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql, prometheus
Domain
databases, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.