Re: Monitoring for long running transactions

From: Christoph Moench-Tegeder <cmt(at)burggraben(dot)net>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Monitoring for long running transactions
Date: 2020-06-04 20:29:11
Message-ID: 20200604202911.GB53594@elch.exwg.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

## Samuel Smith (pgsql(at)net153(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2020-06-04 20:36:21 Re: Monitoring for long running transactions
Previous Message Adrian Klaver 2020-06-04 20:24:30 Re: Monitoring for long running transactions