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

Capture usename and application_name for pg_stat_activity #673

Merged

Conversation

cezmunsta
Copy link
Contributor

It is necessary to be able to exclude backups from long-running
transaction alerts, as they are to be expected. With the current
pg_stat_activity metric there is no ability to filter out
specific users or application names.

Resolves #668

@cezmunsta cezmunsta force-pushed the pg_stat_activity-enhancements branch 2 times, most recently from f8c825f to 567af30 Compare August 19, 2022 10:34
@Arnoways
Copy link

Hi, thank you for this work. I've been able to test it myself on a few instances and it lgtm.
This will really help to have this out of the box. Hope this will be merged soon 👍

@sysadmind
Copy link
Contributor

This PR is out of date with the base branch.

It is necessary to be able to exclude backups from long-running
transaction alerts, as they are to be expected. With the current
pg_stat_activity metric there is no ability to filter out
specific users or application names.

Resolves prometheus-community#668

Signed-off-by: cezmunsta <github@incoming-email.co.uk>
Signed-off-by: cezmunsta <github@incoming-email.co.uk>
@cezmunsta cezmunsta force-pushed the pg_stat_activity-enhancements branch from 567af30 to d9ac4be Compare October 4, 2022 12:19
@cezmunsta
Copy link
Contributor Author

@sysadmind rebase complete

@Arnoways
Copy link

Arnoways commented Dec 6, 2022

Hi, small bump as I'm hoping to see this reviewed soon.
Thanks for your time.

@cezmunsta
Copy link
Contributor Author

Hopefully, someone will merge it for you soon @Arnoways, if you need to use this version.
If this PR remains unmerged then you could look at using PMM, as this change was merged in for the 2.32.0 release (latest is 2.34.0). The forked exporter should work just fine on its own, if you wanted just that; you can download the client and extract the postgresql_exporter (or use a package repo for APT/YUM via percona-release).

Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks!

@SuperQ SuperQ requested a review from sysadmind February 2, 2023 11:05
Copy link
Contributor

@sysadmind sysadmind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sysadmind sysadmind merged commit 36773e0 into prometheus-community:master Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add username in pg_stat_activity_count
4 participants