-
Notifications
You must be signed in to change notification settings - Fork 769
fix examples queries: change idle process metric name in order not to override built-in pg_stat_activity. #525
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
Conversation
… override built-in pg_stat_activity. Signed-off-by: Cédric de Saint Martin <[email protected]>
Tagging @wrouesnel, maybe you have time to review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, makes sense to separate this out.
CC @mwasilew2, would you mind reviewing/testing this? |
I've just tried this fix on my production monitoring and its working fine without any changes in other stuff. Maybe it is useful for approving this PR |
Thanks @SuperQ for the ping I was able to reproduce the problem locally (can't test it in production at the moment) using
and confirmed the patch gets rid of the override:
Metrics for the idle processes added by the patch look ok:
I submitted some minor fixes to the README file: #530 and thought about adding yaml linting to CI: prometheus/prometheus#8801 . I was also thinking about adding a test that would ensure that the example config file with custom queries works as expected (a more sophisticated version of: https://github.com/prometheus-community/postgres_exporter/blob/master/cmd/postgres_exporter/postgres_exporter_integration_test.go#L145 , in addition to just checking that the endpoint can be scraped the test would capture the response and check it ), but that's a question for another issue/PR. |
Thanks @mwasilew2! |
fix examples queries: change idle process metric name in order not to override built-in pg_stat_activity.
Fixes regression introduced in #435