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

add client_addr to pg_stat_activity_max_tx_duration metric #985

Open
betanummeric opened this issue Dec 11, 2023 · 0 comments
Open

add client_addr to pg_stat_activity_max_tx_duration metric #985

betanummeric opened this issue Dec 11, 2023 · 0 comments

Comments

@betanummeric
Copy link

proposal

Add the client_addr field from pg_stat_activity as a label to the metric pg_stat_activity_max_tx_duration.

use case

My company runs the postgres_exporter for production PostgreSQL instances. Often the application (postgres client) is running on multiple hosts, sharing a common username. When one application instance blocks others by keeping an idle transaction open for too long, we need the client_addr information to figure out which application host is causing that.
By adding the client_addr field to the metrics, we would enable the application admins to determine the malfunctioning host without needing to ask a DBA (someone with privileges to query pg_stat_activity directly).

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