pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How are ppl monitoring PostgreSQL ... ?  What is being monitored ... ?
12+ messages / 8 participants
[nested] [flat]

* How are ppl monitoring PostgreSQL ... ?  What is being monitored ... ?
@ 2006-06-10 18:27 Marc G. Fournier <scrappy@postgresql.org>
  2006-06-10 18:29 ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Andy Shellam <andy@andycc.net>
  2006-06-10 22:04 ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Joshua D. Drake <jd@commandprompt.com>
  2006-06-11 15:10 ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? hubert depesz lubaczewski <depesz@gmail.com>
  0 siblings, 3 replies; 12+ messages in thread

From: Marc G. Fournier @ 2006-06-10 18:27 UTC (permalink / raw)
  To: pgsql-admin


The subject kinda says it all ... I know there are SNMP patches available 
out there now, but without those ... ?

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email . scrappy@hub.org                              MSN . scrappy@hub.org
Yahoo . yscrappy               Skype: hub.org        ICQ . 7615664



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: How are ppl monitoring PostgreSQL ... ?  What is being
  2006-06-10 18:27 How are ppl monitoring PostgreSQL ... ?  What is being monitored ... ? Marc G. Fournier <scrappy@postgresql.org>
@ 2006-06-10 18:29 ` Andy Shellam <andy@andycc.net>
  2006-06-10 19:06   ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Michael Fuhr <mike@fuhr.org>
  2 siblings, 1 reply; 12+ messages in thread

From: Andy Shellam @ 2006-06-10 18:29 UTC (permalink / raw)
  To: Marc G. Fournier <scrappy@postgresql.org>; pgsql-admin

I'm using a great little Linux program called "monit" to check that
there's something listening on the 5432 port.  It also monitors
individual process memory and CPU usage etc.  Quite good.

http://www.tildeslash.com/monit/

Andy

Marc G. Fournier wrote:
> 
> The subject kinda says it all ... I know there are SNMP patches
> available out there now, but without those ... ?
> 
> ----
> Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
> Email . scrappy@hub.org                              MSN . scrappy@hub.org
> Yahoo . yscrappy               Skype: hub.org        ICQ . 7615664
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
> 
> !DSPAM:14,448b0f39256841201919775!
> 
> 




^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: How are ppl monitoring PostgreSQL ... ?  What is being
  2006-06-10 18:27 How are ppl monitoring PostgreSQL ... ?  What is being monitored ... ? Marc G. Fournier <scrappy@postgresql.org>
  2006-06-10 18:29 ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Andy Shellam <andy@andycc.net>
@ 2006-06-10 19:06   ` Michael Fuhr <mike@fuhr.org>
  2006-06-10 21:01     ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Christopher Browne <cbbrowne@acm.org>
  0 siblings, 1 reply; 12+ messages in thread

From: Michael Fuhr @ 2006-06-10 19:06 UTC (permalink / raw)
  To: Andy Shellam <andy@andycc.net>; +Cc: Marc G. Fournier <scrappy@postgresql.org>; pgsql-admin

On Sat, Jun 10, 2006 at 07:29:52PM +0100, Andy Shellam wrote:
> I'm using a great little Linux program called "monit" to check that
> there's something listening on the 5432 port.  It also monitors
> individual process memory and CPU usage etc.  Quite good.

A server can be quite broken yet still respond to transport- and
network-layer probes like TCP connections and pings.  Some NMSs
support custom monitors, so whenever possible I like to do
application-layer tests to ensure that the server not only accepts
connections but is indeed behaving as expected.

> Marc G. Fournier wrote:
> > 
> > The subject kinda says it all ... I know there are SNMP patches
> > available out there now, but without those ... ?

MRTG can generate graphs of anything you can write a script to
measure, as long as the script returns output in a certain format.
Other packages of that ilk probably have similar capabilities.

-- 
Michael Fuhr



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: How are ppl monitoring PostgreSQL ... ?  What is being
  2006-06-10 18:27 How are ppl monitoring PostgreSQL ... ?  What is being monitored ... ? Marc G. Fournier <scrappy@postgresql.org>
  2006-06-10 18:29 ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Andy Shellam <andy@andycc.net>
  2006-06-10 19:06   ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Michael Fuhr <mike@fuhr.org>
@ 2006-06-10 21:01     ` Christopher Browne <cbbrowne@acm.org>
  0 siblings, 0 replies; 12+ messages in thread

From: Christopher Browne @ 2006-06-10 21:01 UTC (permalink / raw)
  To: pgsql-admin

mike@fuhr.org (Michael Fuhr) wrote:
> On Sat, Jun 10, 2006 at 07:29:52PM +0100, Andy Shellam wrote:
>> I'm using a great little Linux program called "monit" to check that
>> there's something listening on the 5432 port.  It also monitors
>> individual process memory and CPU usage etc.  Quite good.
>
> A server can be quite broken yet still respond to transport- and
> network-layer probes like TCP connections and pings.  Some NMSs
> support custom monitors, so whenever possible I like to do
> application-layer tests to ensure that the server not only accepts
> connections but is indeed behaving as expected.

I'd generally agree with this; it points to having tests that aren't
so much about PostgreSQL as they are about the applications using
PostgreSQL...

>> Marc G. Fournier wrote:
>> > 
>> > The subject kinda says it all ... I know there are SNMP patches
>> > available out there now, but without those ... ?
>
> MRTG can generate graphs of anything you can write a script to
> measure, as long as the script returns output in a certain format.
> Other packages of that ilk probably have similar capabilities.

Our NOC group runs "replication tests" against various servers that
feed MRTG; they point at a view that is normally frequently updated,
and check to see how elderly the latest value is.

On replicated nodes, this checks the health of replication.

On "master" nodes, this checks the health of the application itself.
-- 
select 'cbbrowne' || '@' || 'gmail.com';
http://linuxdatabases.info/info/slony.html
Rules of the Evil Overlord #66. "My security keypad will actually be a
fingerprint scanner.  Anyone who watches  someone press a  sequence of
buttons or dusts  the pad for fingerprints then  subsequently tries to
enter  by repeating  that  sequence will  trigger  the alarm  system."
<http://www.eviloverlord.com/;



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: How are ppl monitoring PostgreSQL ... ?  What is being
  2006-06-10 18:27 How are ppl monitoring PostgreSQL ... ?  What is being monitored ... ? Marc G. Fournier <scrappy@postgresql.org>
@ 2006-06-10 22:04 ` Joshua D. Drake <jd@commandprompt.com>
  2006-06-11 00:24   ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Marc G. Fournier <scrappy@postgresql.org>
  2 siblings, 1 reply; 12+ messages in thread

From: Joshua D. Drake @ 2006-06-10 22:04 UTC (permalink / raw)
  To: Marc G. Fournier <scrappy@postgresql.org>; +Cc: pgsql-admin

Marc G. Fournier wrote:
> 
> The subject kinda says it all ... I know there are SNMP patches 
> available out there now, but without those ... ?

We use Nagios to call shell scripts that perform specific requests to a 
PostgreSQL server. Usually over SSH via psql, but you could use anything.

Joshua D. Drake

> 
> ----
> Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
> Email . scrappy@hub.org                              MSN . scrappy@hub.org
> Yahoo . yscrappy               Skype: hub.org        ICQ . 7615664
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
> 


-- 

             === The PostgreSQL Company: Command Prompt, Inc. ===
       Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
       Providing the most comprehensive  PostgreSQL solutions since 1997
                      http://www.commandprompt.com/





^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: How are ppl monitoring PostgreSQL ... ?  What is being
  2006-06-10 18:27 How are ppl monitoring PostgreSQL ... ?  What is being monitored ... ? Marc G. Fournier <scrappy@postgresql.org>
  2006-06-10 22:04 ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Joshua D. Drake <jd@commandprompt.com>
@ 2006-06-11 00:24   ` Marc G. Fournier <scrappy@postgresql.org>
  2006-06-11 00:32     ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Joshua D. Drake <jd@commandprompt.com>
  0 siblings, 1 reply; 12+ messages in thread

From: Marc G. Fournier @ 2006-06-11 00:24 UTC (permalink / raw)
  To: Joshua D. Drake <jd@commandprompt.com>; +Cc: Marc G. Fournier <scrappy@postgresql.org>; pgsql-admin

On Sat, 10 Jun 2006, Joshua D. Drake wrote:

> Marc G. Fournier wrote:
>> 
>> The subject kinda says it all ... I know there are SNMP patches available 
>> out there now, but without those ... ?
>
> We use Nagios to call shell scripts that perform specific requests to a 
> PostgreSQL server. Usually over SSH via psql, but you could use anything.

'k, so what are you testing for?  Just that a query runs?  time it takes 
to run?  specific results?

SELECT count(1) FROM pg_connections;

would be a good one to graph ...

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email . scrappy@hub.org                              MSN . scrappy@hub.org
Yahoo . yscrappy               Skype: hub.org        ICQ . 7615664



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: How are ppl monitoring PostgreSQL ... ?  What is being
  2006-06-10 18:27 How are ppl monitoring PostgreSQL ... ?  What is being monitored ... ? Marc G. Fournier <scrappy@postgresql.org>
  2006-06-10 22:04 ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Joshua D. Drake <jd@commandprompt.com>
  2006-06-11 00:24   ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Marc G. Fournier <scrappy@postgresql.org>
@ 2006-06-11 00:32     ` Joshua D. Drake <jd@commandprompt.com>
  0 siblings, 0 replies; 12+ messages in thread

From: Joshua D. Drake @ 2006-06-11 00:32 UTC (permalink / raw)
  To: Marc G. Fournier <scrappy@postgresql.org>; +Cc: pgsql-admin

> 
> SELECT count(1) FROM pg_connections;
> 
> would be a good one to graph ...

Well you should use pg_stat_databases for that :)

We have complete graphing and monitoring service coming out at the end 
of this month.

Joshua D. Drake


> 
> ----
> Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
> Email . scrappy@hub.org                              MSN . scrappy@hub.org
> Yahoo . yscrappy               Skype: hub.org        ICQ . 7615664
> 


-- 

             === The PostgreSQL Company: Command Prompt, Inc. ===
       Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
       Providing the most comprehensive  PostgreSQL solutions since 1997
                      http://www.commandprompt.com/





^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ?
  2006-06-10 18:27 How are ppl monitoring PostgreSQL ... ?  What is being monitored ... ? Marc G. Fournier <scrappy@postgresql.org>
@ 2006-06-11 15:10 ` hubert depesz lubaczewski <depesz@gmail.com>
  2006-07-07 04:37   ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? ogjunk-pgjedan@yahoo.com
  2 siblings, 1 reply; 12+ messages in thread

From: hubert depesz lubaczewski @ 2006-06-11 15:10 UTC (permalink / raw)
  To: Marc G. Fournier <scrappy@postgresql.org>; +Cc: pgsql-admin

On 6/10/06, Marc G. Fournier <scrappy@postgresql.org> wrote:
>
> The subject kinda says it all ... I know there are SNMP patches available
> out there now, but without those ... ?
>

i can tell you what we do monitor:
1. general server things (free disk space, cpu-idle, load, memory used, swap
used, context switches, io operations, sockets in state close_wait).
2. db stuff:
  - numer of transactions per second
  - database size
  - size of specific tables/indices that we know have nasty tendency to grow
  - number of objects in database
  - duration of longest query
  - replication lag (in events, and in time)

to make mrtg graphs of db stuff we made some perl scripts, which are bound
to snmp using snmp's "exec" feature. then we just grab the values using mrtg
and draw. quite simple actually.

depesz

-- 
http://www.depesz.com/ - nowy, lepszy depesz

^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ?
  2006-06-10 18:27 How are ppl monitoring PostgreSQL ... ?  What is being monitored ... ? Marc G. Fournier <scrappy@postgresql.org>
  2006-06-11 15:10 ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? hubert depesz lubaczewski <depesz@gmail.com>
@ 2006-07-07 04:37   ` ogjunk-pgjedan@yahoo.com
  2006-07-07 07:37     ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? hubert depesz lubaczewski <depesz@gmail.com>
  0 siblings, 1 reply; 12+ messages in thread

From: ogjunk-pgjedan@yahoo.com @ 2006-07-07 04:37 UTC (permalink / raw)
  To: pgsql-admin; +Cc: hubert depesz lubaczewski <depesz@gmail.com>

Interesting, Hubert.
Where/how do you get the data for:
  - number of transactions per second 
  - duration of longest query  
 ?

Thanks,
Otis
 
----- Original Message ---- 
From: hubert depesz lubaczewski  
To: Marc G. Fournier  
Cc: pgsql-admin@postgresql.org 
Sent: Sunday, June 11, 2006 11:10:20 AM 
Subject: Re: [ADMIN] How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? 
 
On 6/10/06, Marc G. Fournier  wrote: The subject kinda says it all ... I know there are SNMP patches available 
out there now, but without those ... ? 
 
 
i can tell you what we do monitor: 
1. general server things (free disk space, cpu-idle, load, memory used, swap used, context switches, io operations, sockets in state close_wait).  
2. db stuff: 
  - numer of transactions per second 
  - database size 
  - size of specific tables/indices that we know have nasty tendency to grow 
  - number of objects in database 
  - duration of longest query  
  - replication lag (in events, and in time) 
 
to make mrtg graphs of db stuff we made some perl scripts, which are bound to snmp using snmp's "exec" feature. then we just grab the values using mrtg and draw. quite simple actually.  
 
depesz 
 
--  
http://www.depesz.com/ - nowy, lepszy depesz 
 
 





^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ?
  2006-06-10 18:27 How are ppl monitoring PostgreSQL ... ?  What is being monitored ... ? Marc G. Fournier <scrappy@postgresql.org>
  2006-06-11 15:10 ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? hubert depesz lubaczewski <depesz@gmail.com>
  2006-07-07 04:37   ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? ogjunk-pgjedan@yahoo.com
@ 2006-07-07 07:37     ` hubert depesz lubaczewski <depesz@gmail.com>
  2006-07-09 20:32       ` Re: How are ppl monitoring PostgreSQL ... ? What is being Jeff Frost <jeff@frostconsultingllc.com>
  0 siblings, 1 reply; 12+ messages in thread

From: hubert depesz lubaczewski @ 2006-07-07 07:37 UTC (permalink / raw)
  To: ogjunk-pgjedan@yahoo.com <ogjunk-pgjedan@yahoo.com>; +Cc: pgsql-admin

On 7/7/06, ogjunk-pgjedan@yahoo.com <ogjunk-pgjedan@yahoo.com> wrote:
>
> Interesting, Hubert.
> Where/how do you get the data for:
>   - number of transactions per second



periodically (every 5 minutes) i do:
select sum(xact_commit) + sum(xact_rollback) from pg_stat_database
and then just check against previous value, and calculate "per/second". this
is actually handled nicely by mrtg itself.


  - duration of longest query
>

select * from pg_stat_activity where current_query !~ '<IDLE>' order by
query_start asc limit 1;
this has some problems though, but are more or less easily avoidable.

depesz

-- 
http://www.depesz.com/ - nowy, lepszy depesz

^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: How are ppl monitoring PostgreSQL ... ? What is being
  2006-06-10 18:27 How are ppl monitoring PostgreSQL ... ?  What is being monitored ... ? Marc G. Fournier <scrappy@postgresql.org>
  2006-06-11 15:10 ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? hubert depesz lubaczewski <depesz@gmail.com>
  2006-07-07 04:37   ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? ogjunk-pgjedan@yahoo.com
  2006-07-07 07:37     ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? hubert depesz lubaczewski <depesz@gmail.com>
@ 2006-07-09 20:32       ` Jeff Frost <jeff@frostconsultingllc.com>
  2006-07-10 07:54         ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? hubert depesz lubaczewski <depesz@gmail.com>
  0 siblings, 1 reply; 12+ messages in thread

From: Jeff Frost @ 2006-07-09 20:32 UTC (permalink / raw)
  To: hubert depesz lubaczewski <depesz@gmail.com>; +Cc: ogjunk-pgjedan@yahoo.com <ogjunk-pgjedan@yahoo.com>; pgsql-admin

On Fri, 7 Jul 2006, hubert depesz lubaczewski wrote:

> periodically (every 5 minutes) i do:
> select sum(xact_commit) + sum(xact_rollback) from pg_stat_database
> and then just check against previous value, and calculate "per/second". this
> is actually handled nicely by mrtg itself.

Hubert,

Do you already have a MRTG plugin for postgres that you've written and if so, 
care to share it with the rest of us?  Or better yet, share it with the 
mrtg.org folks?  I was thinking of writing one, but if you have one already, I 
hate to reinvent the wheel.

-- 
Jeff Frost, Owner 	<jeff@frostconsultingllc.com>
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 650-780-7908	FAX: 650-649-1954



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ?
  2006-06-10 18:27 How are ppl monitoring PostgreSQL ... ?  What is being monitored ... ? Marc G. Fournier <scrappy@postgresql.org>
  2006-06-11 15:10 ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? hubert depesz lubaczewski <depesz@gmail.com>
  2006-07-07 04:37   ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? ogjunk-pgjedan@yahoo.com
  2006-07-07 07:37     ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? hubert depesz lubaczewski <depesz@gmail.com>
  2006-07-09 20:32       ` Re: How are ppl monitoring PostgreSQL ... ? What is being Jeff Frost <jeff@frostconsultingllc.com>
@ 2006-07-10 07:54         ` hubert depesz lubaczewski <depesz@gmail.com>
  0 siblings, 0 replies; 12+ messages in thread

From: hubert depesz lubaczewski @ 2006-07-10 07:54 UTC (permalink / raw)
  To: Jeff Frost <jeff@frostconsultingllc.com>; +Cc: ogjunk-pgjedan@yahoo.com <ogjunk-pgjedan@yahoo.com>; pgsql-admin

On 7/9/06, Jeff Frost <jeff@frostconsultingllc.com> wrote:
>
> Do you already have a MRTG plugin for postgres that you've written and if
> so,
> care to share it with the rest of us?  Or better yet, share it with the
> mrtg.org folks?  I was thinking of writing one, but if you have one
> already, I
> hate to reinvent the wheel.
>

this is not mrtg plugin. i use snmpd (net-snmpd to be exact), and connect
custom scripts to it using "exec" directive in config.
so basically i have series of scripts which all look more or less like this:
#!/bin/bash
psql -U pgdba -d some_database -qAt 'select .....';

and a series of:
Exec some-name /etc/snmpd/addons/somescript.sh

that's all.

depesz

-- 
http://www.depesz.com/ - nowy, lepszy depesz

^ permalink  raw  reply  [nested|flat] 12+ messages in thread


end of thread, other threads:[~2006-07-10 07:54 UTC | newest]

Thread overview: 12+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-06-10 18:27 How are ppl monitoring PostgreSQL ... ?  What is being monitored ... ? Marc G. Fournier <scrappy@postgresql.org>
2006-06-10 18:29 ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Andy Shellam <andy@andycc.net>
2006-06-10 19:06   ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Michael Fuhr <mike@fuhr.org>
2006-06-10 21:01     ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Christopher Browne <cbbrowne@acm.org>
2006-06-10 22:04 ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Joshua D. Drake <jd@commandprompt.com>
2006-06-11 00:24   ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Marc G. Fournier <scrappy@postgresql.org>
2006-06-11 00:32     ` Re: How are ppl monitoring PostgreSQL ... ?  What is being Joshua D. Drake <jd@commandprompt.com>
2006-06-11 15:10 ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? hubert depesz lubaczewski <depesz@gmail.com>
2006-07-07 04:37   ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? ogjunk-pgjedan@yahoo.com
2006-07-07 07:37     ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? hubert depesz lubaczewski <depesz@gmail.com>
2006-07-09 20:32       ` Re: How are ppl monitoring PostgreSQL ... ? What is being Jeff Frost <jeff@frostconsultingllc.com>
2006-07-10 07:54         ` Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ? hubert depesz lubaczewski <depesz@gmail.com>

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