[Nagiosplug-devel] Plugin output format

Holger Weiss holger at CIS.FU-Berlin.DE
Fri Aug 3 03:25:27 CEST 2007


* Matthias Eble <matthias.eble at mailing.kaufland-informationssysteme.com> [2007-08-02 21:55]:
> > 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).

I see your point and I fully agree such cases may be a good reason to
implement these functions in C.

As far as I can see, implementing such functions wouldn't conflict with
the changes I suggested?  My main concern is simply to handle the plugin
output by a single function (plus another function for handling verbose
output) as opposed to using printf(3)/puts(3) directly, in order to make
the output easily changeable/configurable.  I'm of course perfectly
happy with any convenience functions built around such output functions
(later on or right now).

Holger

-- 
PGP fingerprint:  F1F0 9071 8084 A426 DD59  9839 59D3 F3A1 B8B5 D3DE




More information about the Devel mailing list