inform Plugins about NRPE's version

william(at)elan.net william at elan.net
Sun May 20 06:35:16 CEST 2007


If this is done at all, it should be general environment variable which 
says if calling program (nagios or nrpe or something else) can accept 
multi-line result or not. However most of the cases the setup would
determine that (i.e. I'd imagine there would be separate config option
for plugins that support it to enable sending multi-line results).

On Sat, 19 May 2007, Gerhard Lausser wrote:

> 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/nrpe-2.8.1-env-programversion.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 SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/




More information about the Developers mailing list