Hi Ethan and list,
as NRPE is now capable to transport multiline text, i thought plugins should
be given the chance to decide wether to go with the old one-line output or
to profit from the possibility to report at full length.
I made a patch for NRPE which can be found at
http://people.consol.de/~lausser/nagios ... sion.patch
With this patch, NRPE sets an environment variable $NRPE_PROGRAMVERSION
which holds it's version number (e.g. "2.8.1") which is inherited by the
called plugins. Based on that version, they can then formulate a short or a
long output.
echo "CRITICAL - 4 errors"
if [ -n "$NRPE_PROGRAMVERSION" ]; then
echo "1. bla is broken"
echo "2. blub has failed"
echo "3. hurtz!"
echo "4. suelzomat produces more than 1000 suelzes/sec"
fi
Actually the variable should be something like $NRPE_CANMULTILINE, but as
this patch will only appear in releases > 2.8.1, the existence of
NRPE_PROGRAMVERSION will mean the same thing.
Greetings from munich,
Gerhard
p.s. i am not sure if this is useful enough to justify patching NRPE, but i
am currently writing a plugin which would profit a lot from multiline output
and i want to be prepared for Nagios 3.0 without breaking compatibility with
the 2.x versions.
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]