[check_postgres] 2 quick ones

lance raymond lance.raymond at gmail.com
Fri Aug 10 15:25:50 UTC 2012


I saw a few people saying I can use pnp4nagios, what I am looking for (if
it's possible) is to monitor postgres, running good, then monitor a
database and graph the queries by type (inserts, reads, etc.)   Is it
possible and is there a how-to and what to use?

I am running on ubuntu 12.04LTS, the checks work, all give some type of
warnings, etc.   examples are;

./check_postgres_query_time --port=5432 --warning='3 minutes' --critical='5
minutes'Use of uninitialized value $check_postgres::opt{"output"} in lc at
./check_postgres_query_time line 711.
POSTGRES_QUERY_TIME OK:  longest query: 0s | time=0.09 maxtime=0;180;300

./check_postgres_database_size --warning='1 TB' --critical='1.1 t'
Use of uninitialized value $check_postgres::opt{"output"} in lc at
./check_postgres_database_size line 711.
POSTGRES_DATABASE_SIZE OK: DB "postgres" archive: 536501068600 (500 GB)
api_stats: 6087480 (5945 kB) postgres: 6087480 (5945 kB) template0: 6087480
(5945 kB) template1: 6087480 (5945 kB)  | time=0.17  archive=536501068600
api_stats=6087480 postgres=6087480 template0=6087480 template1=6087480

./check_postgres_disk_space --port=5432 --warning='90%' --critical='90%'
Use of uninitialized value $check_postgres::opt{"output"} in lc at
./check_postgres_disk_space line 711.
POSTGRES_DISK_SPACE OK:  FS /dev/mapper/archiveDB-DataBase mounted on
/var/lib/postgresql is using 616.45 GB of 894.01 GB (73%) | time=0.14
/dev/mapper/archiveDB-DataBase=661905776640


Aside from that, you have a typo in your example for disk_space; you have...
  check_postgres_disk_space --port=5432 --warning='90%' --critical="90%'

the critical should be '90-%' , you have a " so you may want to change that.

Thanks again.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/check_postgres/attachments/20120810/3574d4f0/attachment.html>


More information about the Check_postgres mailing list