pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Moench-Tegeder <cmt@burggraben.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: Monitoring for long running transactions
Date: Thu, 4 Jun 2020 22:29:11 +0200
Message-ID: <20200604202911.GB53594@elch.exwg.net> (raw)
In-Reply-To: <920bb4ce-6ba8-2888-6239-52a15474fc58@net153.net>
References: <d2f5ded1-7820-e25f-2477-403283fbb2d0@net153.net>
	<d2b17c01-bde0-7860-80d0-753d5c99a602@aklaver.com>
	<920bb4ce-6ba8-2888-6239-52a15474fc58@net153.net>

## 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





view thread (6+ messages)  latest in thread

Message-ID: <20200604202911.GB53594@elch.exwg.net>
Permalink:  ../20200604202911.GB53594@elch.exwg.net/
Also on:    postgresql.org/message-id/20200604202911.GB53594@elch.exwg.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: cmt@burggraben.net
  Subject: Re: Monitoring for long running transactions
  In-Reply-To: <20200604202911.GB53594@elch.exwg.net>
  References: <d2f5ded1-7820-e25f-2477-403283fbb2d0@net153.net> <d2b17c01-bde0-7860-80d0-753d5c99a602@aklaver.com> <920bb4ce-6ba8-2888-6239-52a15474fc58@net153.net> <20200604202911.GB53594@elch.exwg.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox