pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feed From: ynux <ynux@gmx.net>
To: pgsql-admin@postgresql.org
Subject: Re: allow a user to see current_query in pg_stat_activity in 8.4
Date: Fri, 21 Dec 2012 05:12:06 -0800 (PST)
Message-ID: <1356095526821-5737499.post@n5.nabble.com> (raw )
In-Reply-To: <1355456074.36965.YahooMailNeo@web125901.mail.ne1.yahoo.com >
References: <1355453967.41645.YahooMailNeo@web125905.mail.ne1.yahoo.com >
<18307.1355454996@sss.pgh.pa.us >
<1355456074.36965.YahooMailNeo@web125901.mail.ne1.yahoo.com >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Hi.
Your question was:
>> We want to create a role used by a monitor to check for "<IDLE> in
>> Transaction" with the most restrictive permissions we can on a 8.4.13
>> instance.
>
>> The user has been granted connect privilege to the database and some
>> limited permissions to user tabhles that need to be monitored. But
>> pg_stat_activity shows only "<insufficient privilege>"
>
I had the same problem, wondered how nagios does it, and found this:
https://github.com/elecnix/nagios-postgresql/blob/master/pg_stat_activity.sql
It works perfectly for me, on 8.4.12 though.
Make sure to run it in the database your monitoring user connects to, and do
not use template1. You may have to "create language plpgsql;" first.
Regards, Ynux
--
View this message in context: http://postgresql.1045698.n5.nabble.com/allow-a-user-to-see-current-query-in-pg-stat-activity-in-8-4...
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
view thread (5+ messages) latest in thread
Message-ID: <1356095526821-5737499.post@n5.nabble.com>
Permalink: ../1356095526821-5737499.post@n5.nabble.com/
Also on: postgresql.org/message-id/1356095526821-5737499.post@n5.nabble.com
copy link · copy postgr.es
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ynux@gmx.net
Subject: Re: allow a user to see current_query in pg_stat_activity in 8.4
In-Reply-To: <1356095526821-5737499.post@n5.nabble.com>
* 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