Re: Monitoring for long running transactions - Mailing list pgsql-general

From Christoph Moench-Tegeder
Subject Re: Monitoring for long running transactions
Date
Msg-id 20200604202911.GB53594@elch.exwg.net
Whole thread Raw
In response to Re: Monitoring for long running transactions  (Samuel Smith <pgsql@net153.net>)
List pgsql-general
## Samuel Smith (pgsql@net153.net):

> Sorry, I should have clarified that I was aware of the pg_stat_activity 
> table. That is how we found the problem in the first place. And yes I 
> could just write a bash script and run it in cron. I just didn't know if 
> there was a more "official" way to go about this since it is probably a 
> common monitoring point and/or if something like this was already made.

This works fine for everything nagios-like:
https://bucardo.org/check_postgres/check_postgres.pl.html#txn_time

Other solutions may be found via the PostgreSQL wiki - as you noted,
this is (should be) monitored, so almost everything which can monitor
PostgreSQL covers this. (which raises the obvious question - did you
monitor your server or did you just use the common "shouting user"
approach? ;))

Regards,
Christoph

-- 
Spare Space



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Monitoring for long running transactions
Next
From: Thomas Kellerer
Date:
Subject: Re: Monitoring for long running transactions