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

From Adrian Klaver
Subject Re: Monitoring for long running transactions
Date
Msg-id a1814b67-07bf-6a95-0d35-e1c7a0b9439d@aklaver.com
Whole thread Raw
In response to Re: Monitoring for long running transactions  (Samuel Smith <pgsql@net153.net>)
List pgsql-general
On 6/4/20 12:59 PM, Samuel Smith wrote:
> On 6/4/20 2:29 PM, Adrian Klaver wrote:

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

I guess it comes down to how much info you want. A list of monitoring tools:

https://wiki.postgresql.org/wiki/Monitoring#pgcenter

Haven't used it but this one:

https://pgmetrics.io/

looks interesting. From here:

https://pgmetrics.io/docs/

Active backends: transaction running too long, idling in transaction, 
waiting for locks

Information on scripting above:

https://pgmetrics.io/docs/scripting.html


> 
> Regards,
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Shared memory error
Next
From: Christoph Moench-Tegeder
Date:
Subject: Re: Monitoring for long running transactions