Re: Monitoring for long running transactions

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Samuel Smith <pgsql(at)net153(dot)net>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Monitoring for long running transactions
Date: 2020-06-04 20:24:30
Message-ID: a1814b67-07bf-6a95-0d35-e1c7a0b9439d@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christoph Moench-Tegeder 2020-06-04 20:29:11 Re: Monitoring for long running transactions
Previous Message Thomas Munro 2020-06-04 20:16:09 Re: Shared memory error