[Nagiosplug-devel] Plugin output format

Matthias Eble matthias.eble at mailing.kaufland-informationssysteme.com
Thu Aug 2 21:55:19 CEST 2007


>> Your verbosity solution can be applied additionally, but to use message 
>> functions like in N::P the entire plugin needs to be altered.. *sigh*
> 
> Why can these functions not be applied additionally?  I mean, using them
> is purely optional with N::P, too.  

Well, I'm not shure. Given that the plugin continues on error (see 
below) and exits with a usual die, the aadded messages would not be 
printed hiding potentially important data.

> 
> Besides, I would have guessed that there are not _that_ many places
> where I'd replace die() calls with such a function pair within our C
> plugins, as in many cases the plugins can/should exit immediately in
> case of problems anyway (as opposed to "collecting" problems with
> add_message() and continuing the program flow as usual), no?  But I
> might well be just overlooking some uses!

I'd say check_disk does and should do so, but you're right, it seems 
there aren't that many places in the official plugins.

I made a blade enclosure check in perl. It checks fans, power supplies, 
interconnect switches, and the LCD. The message stuff was great for that 
since all problems need to be printed (above behaviour). But you're 
right, since the official plugins usually don't check multiple things 
for errors and hence they shouldn't need such functions.

Matthias




More information about the Devel mailing list