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

Cédric Villemain cedric.villemain at dalibo.com
Wed Aug 12 12:46:35 UTC 2009


Le mercredi 12 août 2009, Greg Sabino Mullane a écrit :
> On 08/05/2009 10:04 AM, Cédric Villemain wrote:
> > Hello,
> >
> > I keep on refactoring the nagios output trying to following nagios
> > guidelines.
> >
> > Here is a patch that do :
>
> This patch does not compile. For example, this line is not valid Perl:
>
> $cuom=uc "$2b";

Oops !

Pleaase excuse my ignorance, but what is invalid here ? the mixing of scalar 
and string in the " ?

>
> I see what you are trying to do with this, but it seems that it might be
> cleaner to simply store the new information in global vars, rather than
> returning new things from the validate_range function (which seem to not
> be used).

The idea behind this is also that if we stick at providing more nagios 
compatibility, then validate_range must validate range in a nagios way and 
that include test the UOM. 
We can surely be less strong than suggested by nagios dev (because nagios does 
not allow mixing UOM for example, when we allow that currently, and it is nice 
feature).
That's why I find better to upgrade validate_range. But other options are 
here, and it is not an issue to keep validate_range the same.

>
> > 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.
>
> Good point.
>
> > 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)
>
> Yes, we should support that. I think it's a very unintuitive syntax and
> may confuse people using check_postgres in a non-Nagios context, but
> Nagios is out primary supported interface after all.

Fortunely, our default match the nagios definitions, this syntax is ..well.. 
is the syntax :) and it will be enhancement, so no regression.

I am not sure I have real need for that, but seems so simple to implement. 
(perhaps in a context of replication when you want at least X connexction for 
user foo, or to check pooler).

----
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: 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/20090812/a80be457/attachment.bin 


More information about the Check_postgres mailing list