Nagios & NRPE Multiline Output trouble
Daniel Szmandiuk
DSzmandi at imc.net.au
Fri Aug 28 03:00:13 CEST 2009
Any ideas (See below)?
Does anyone have notifications with $LONGSERVICEOUTPUT$ macro definitions working?
Thanks,
Daniel
Running Nagios 3.06 and NRPE 2.12.
Nagios is running check_nrpe against a remote server running the NRPE daemon. One of the NRPE commands kicks off a perl script which needs to return multiple lines of output. The perl script does something like this:
print ("Line1;\nLine2;\nLine3;\n");
I'm trying to use the Nagios 3.0 multiline capability to get the output's second and subsequent lines into the $LONGSERVICEOUTPUT$ macro, which in turn gets used in an email notification. I have other types of notifications (eg SMS and Pagers) where I don't use the $LONGSERVICEOUTPUT$ macro.
I'm following the doc at the following URL:
http://nagios.sourceforge.net/docs/3_0/pluginapi.html
I just can't get this to work properly.
If I run check_nrpe manually from the Nagios server, I see the multiple lines displayed on the console. However, Nagios always appears to discard everything after the first \n in the output.
The closest thing that I have been able to make work is to use something like this in the perl script:
print ("Line1;\\rLine2;\\rLine3;\\r\n");
This appears to work, but upon further investigation I found out that this is just placing everything into $SERVICEOUTPUT$. My SMS and Pager notifications show all the output, even though they are not configured with the $LONGSERVICEOUTPUT$ macro.
Is there some setting in NRPE or Nagios that I need to set in order to support Multiline outputs properly? Or is this a bug?
Daniel
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list