[check_postgres] nagios output for check locks

Cédric Villemain cedric.villemain at dalibo.com
Thu Aug 6 16:20:13 UTC 2009


Hello,

I have made the nagios output for check_locks.

It introduce a change in validate_range which output everytime a ref for 
warning and critical when type is multival. check_locks have been more modify 
than other cehcks to this patch, please test/proofread the code carefully.

I choose to output ref for validate_range multival because it clarify the test 
case in check_locks and also because the multival is used only for check_locks 
and was already hardcoded *for* check_locks. (looking at the regex).

Side note (wait : I like side note) : I have already ask about the 
include/exclude behavior regarding perfdata_output. 
Look this example :

check_postgres.pl --action locks --include postgres,sqldesigner  -c 
'total=1000;waiting=5;exclusive=20' -w 'total=2;exclusive=2'

actual output (after this patch):
POSTGRES_LOCKS OK: DB "postgres" (host:localhost) total=1  | time=0.01  
'postgres.exclusive'=0;2;20 'postgres.total'=1;2;1000 'postgres.waiting'=0;;5

But I really prefer this output :
POSTGRES_LOCKS OK: DB "postgres" (host:localhost) total=1  | time=0.01  
'postgres.exclusive'=0;2;20 'postgres.total'=1;2;1000 'postgres.waiting'=0;;5 
'sqldesigner.exclusive'=0;2;20 'sqldesigner.total'=0;2;1000 
'sqldesigner.waiting'=0;;5

If that do not shoot someone. It is in my todo list to do that.

Final step will be to provide my pnp4nagios templates which let you have 
beautifull graph of your postgresql activities.


----
Cédric Villemain
Administrateur de Base de Données
Cel: +33 (0)6 74 15 56 53
http://dalibo.com - http://dalibo.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nagios_output_locks
Type: text/x-patch
Size: 4749 bytes
Desc: not available
Url : https://mail.endcrypt.com/pipermail/check_postgres/attachments/20090806/83d3c30b/attachment.bin 


More information about the Check_postgres mailing list