[check_postgres] perfdata output

Cédric Villemain cedric.villemain at dalibo.com
Mon Feb 23 09:41:32 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greg Sabino Mullane a écrit :
>> I'd like to have a perfdata output which is 'consistent'. Using Nagios, we 
>> generate graph with pnp4nagios, but the pain is that check_postgres doesn't 
>> output everytime the same things in the perfata and pnp4nagios loose (because 
>> it lacks one DS or get one extra).
> 
> I think this was a limitation of the check_backends action, more than
> anything else. I rewrote it to use a left join and always fetch a
> complete list of databases, ordered by name. The git commit is
> 
> 4c3a7e9d4b20412ac2c7ee7474eaa3051a5baecf
> 
> Please try it out and see if that does what you need.
> 

Well, it helps. But it isn't exaclty my proposal which was clearly a new feature.


The patch do the job to output every db, but if I use --include, then all db
that are not in the include are exclude by default :

 ./check_postgres.pl --dbuser cedric --action backends
POSTGRES_BACKENDS OK:  1 connexions sur 100 (1%) | time=0.05  cedric=0 dalibo=0
postgres=1 template0=0 template1=0
./check_postgres.pl --dbuser cedric --action backends --include=cedric
POSTGRES_BACKENDS OK:  Aucune connexion | time=0.05  cedric=0


But, if I use both include and exclude it seems ok :

./check_postgres.pl --dbuser cedric --action backends
- --include="postgres,cedric" --exclude="template1,template0"
POSTGRES_BACKENDS OK:  1 connexions sur 100 (1%) | time=0.05  cedric=0 dalibo=0
postgres=1



So there is still a bug somewhere ... I am busy but I'll try to get back with a
patch.


- --
Cédric Villemain
Administrateur de Base de Données
Cel: +33 (0)6 74 15 56 53
http://dalibo.com - http://dalibo.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkmib0cACgkQo/dppWjpEvxTpQCfcGEeleHxNKtMUEGpZRLS8WQ1
qjIAoJGPlSPzQxLNdLRKJz5xopCDLDat
=Voq+
-----END PGP SIGNATURE-----


More information about the Check_postgres mailing list