Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgres_exporter: metrics was collected before with the same name and label values #285

Open
xluffy opened this issue Dec 11, 2024 · 0 comments

Comments

@xluffy
Copy link
Owner

xluffy commented Dec 11, 2024

> curl 127.0.0.1:9187/metrics

An error has occurred while serving metrics:

5 error(s) occurred:
* collected metric "pg_stat_statements_calls_total" { label:{name:"datname"  value:"gh_core_prod"}  label:{name:"queryid"  value:"549333668763896527"}  label:{name:"user"  value:"postgres"}  counter:{value:1}} was collected before with the same name and label values
* collected metric "pg_stat_statements_seconds_total" { label:{name:"datname"  value:"gh_core_prod"}  label:{name:"queryid"  value:"549333668763896527"}  label:{name:"user"  value:"postgres"}  counter:{value:0.26491449}} was collected before with the same name and label values
* collected metric "pg_stat_statements_rows_total" { label:{name:"datname"  value:"gh_core_prod"}  label:{name:"queryid"  value:"549333668763896527"}  label:{name:"user"  value:"postgres"}  counter:{value:168}} was collected before with the same name and label values
* collected metric "pg_stat_statements_block_read_seconds_total" { label:{name:"datname"  value:"gh_core_prod"}  label:{name:"queryid"  value:"549333668763896527"}  label:{name:"user"  value:"postgres"}  counter:{value:0.545993546}} was collected before with the same name and label values
* collected metric "pg_stat_statements_block_write_seconds_total" { label:{name:"datname"  value:"gh_core_prod"}  label:{name:"queryid"  value:"549333668763896527"}  label:{name:"user"  value:"postgres"}  counter:{value:0.008973103}} was collected before with the same name and label values

psql> SELECT *  FROM pg_stat_statements WHERE queryid = 549333668763896527;

Solution

psql> SELECT pg_stat_statements_reset();
 pg_stat_statements_reset
--------------------------

(1 row)

Time: 1.058 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant