Bug with macros expansion and perfdata command?

Maxime Henrion m.henrion at mediactive.fr
Mon Aug 21 15:33:33 CEST 2006


	Hello all,


I've been recently trying to setup nagiostat with my nagios 2.5
installation.  Unfortunately, it turns out that there seems to be a bug
with nagios and macros expansion for the service perfdata command.

None of the macros referenced in the command get expanded.  I first
thought it was only a problem with the nagiostat documentation being
out-of-date, and had to replace a few macros: $LASTCHECK$ ->
$SERVICELASTCHECK$, $OUTPUT$ -> $SERVICEOUTPUT$ and $PERFDATA$ ->
$SERVICEPERFDATA$, but that wasn't sufficient and the nagiostat script
was still getting empty stuff.

So, I changed the service perfdata command to the one provided in the
example configuration file for testing purposes :

command_line    /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t
$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t
$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t
$SERVICEPERFDATA$\n" >> /var/spool/nagios/service-perfdata.out

and I only get empty lines in the /var/spool/nagios/service-perfdata.out
file, which seems to confirm that nagios isn't properly expanding the
macros like with every other command.

Am I doing something stupid?  Is this indeed a bug, and if so is it
known and is there a patch for it?

Thanks in advance,
Maxime


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the Developers mailing list