postgres_exporter icon indicating copy to clipboard operation
postgres_exporter copied to clipboard

Capture usename and application_name for pg_stat_activity

Open cezmunsta opened this issue 3 years ago • 3 comments

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 avatar Aug 15 '22 10:08 cezmunsta

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 :+1:

Arnoways avatar Sep 29 '22 02:09 Arnoways

This PR is out of date with the base branch.

sysadmind avatar Oct 04 '22 00:10 sysadmind

@sysadmind rebase complete

cezmunsta avatar Oct 04 '22 16:10 cezmunsta

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

Arnoways avatar Dec 06 '22 17:12 Arnoways

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).

cezmunsta avatar Feb 02 '23 10:02 cezmunsta