[Nagiosplug-devel] Multi-line output of NRPE plugins

Thomas Bartosik TBarto at novomatic.com
Tue Apr 29 11:38:51 CEST 2008


Hi all!

I am doing a lot of plugin development right now and we've started to experiment with Nagios 3.x now. (3.0.1 is currently installed, to be precise).

What mostly made me move to 3.x was the multi-line output for the plugins.

I have not yet done anything with macros, but I also do not really think that the mentioned macros will help me here.
$LONGHOSTOUTPUT$ and $LONGSERVICEOUTPUT$ contain the lines after the first line, but there is no way (for me) to display them in the web interface (nagios.cgi).

What is the general design philosophy behind these macros?
Should they ever be used for display purposes in the web frontend?
Or should they just be used for notifications?

I give you an example:
I am currently checking an MSSQL server for disabled jobs. There might be more than one disabled job, so my NRPE_NT plugin prints one disabled job per line. But only the first one can be seen in the web frontend. (possibly giving a critical error although only a job causing a warning is displayed; this is irritating)

What is the general advice for plugin developers now?
Should we not take advantage of multi-line output? (that would be too bad, as this is really limiting)
Or should we use ugly HTML markup (like <br>) to generate the wanted multi-line output in HTML?

Please share your thoughts or give advice. I think the best way to solve the problem (if it is a problem; maybe I am just too unexperienced to know how to do it...) is to offer a parameter in the nagios.cfg file to enable or disable long output in the web frontend.

Thanks a lot in advance!

thomas






More information about the Devel mailing list