[check_postgres] nagios output for database_size + patch validate_range + new function

Cédric Villemain cedric.villemain at dalibo.com
Wed Aug 5 14:04:33 UTC 2009


Hello,

I keep on refactoring the nagios output trying to following nagios guidelines.

Here is a patch that do :

 * change validate_range to return also the warning unit and the critical unit 
when relevant.
 * new function bytes_in_size wich is the opposite of size_in_bytes (using a 
poor sprintf %.3f, feel free to refactor this ;) ).
 * output database_size the nagios way : 
    time=0.01 'wwwsqldesigner'=3.752MB;50.000;100.000

Please, I think it is important to report output change in the 
changelog/upgrade notes in case people parse it. It can be a regression for 
some.

And, as you can see I am in the process of format nagios output. Some work 
that can be considered too is using RANGE  like -- backends --warning "2:30" 
(warning if < 2 or > 30) and using warning, critical by element like for 
locks... (but for db_size, backends/db, and so on)

----
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_range_db_size
Type: text/x-patch
Size: 13199 bytes
Desc: not available
Url : https://mail.endcrypt.com/pipermail/check_postgres/attachments/20090805/7f6e6750/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : https://mail.endcrypt.com/pipermail/check_postgres/attachments/20090805/7f6e6750/attachment-0001.bin 


More information about the Check_postgres mailing list