Xymon Mailing List Archive search

monitor postgresql

2 messages in this thread

list Robert P McGraw · Fri, 11 Apr 2008 11:47:50 -0400 ·
A user has asked for the following:

It would be pretty awesome to have some hobbit plugins that ran
sql queries against the postgresql install.

Things like:
select count(*) from pg_stat_activity; -- < 700 is bad
select count(*), datname from pg_stat_activity group by datname;

or even:

select min(query_start), current_query from pg_stat_activity group by
current_query;

Is there some plugin that does this or could be modified a little to do
this?

Robert


Robert P. McGraw, Jr.
Manager, Computer System                 EMAIL: user-33cf07af04dd@xymon.invalid
Purdue University                         ROOM: MATH-807
Department of Mathematics                PHONE: (XXX) XXX-XXXX
XXX N. University Street                                               
West Lafayette, IN XXXXX-XXXX
list Iain M Conochie · Fri, 11 Apr 2008 16:54:30 +0100 ·
quoted from Robert P McGraw
McGraw, Robert P wrote:
A user has asked for the following:

It would be pretty awesome to have some hobbit plugins that ran
sql queries against the postgresql install.

Things like:
select count(*) from pg_stat_activity; -- < 700 is bad
select count(*), datname from pg_stat_activity group by datname;

or even:

select min(query_start), current_query from pg_stat_activity group by
current_query;

Is there some plugin that does this or could be modified a little to do
this?
  
Would you not be able to write a script to do this? All you would really 
need are the postgres clients on the hobbit server (or you could even 
run in as an ext script on the client)

Even better, if you output it into NCV (Name colon value) format you 
could graph it

Cheers

Iain
quoted from Robert P McGraw

Robert


Robert P. McGraw, Jr.
Manager, Computer System                 EMAIL: user-33cf07af04dd@xymon.invalid
Purdue University                         ROOM: MATH-807
Department of Mathematics                PHONE: (XXX) XXX-XXXX
XXX N. University Street                                               
West Lafayette, IN XXXXX-XXXX