[Nagios-devel] Bug with macros expansion and perfdata command?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] Bug with macros expansion and perfdata command?

Post by Guest »

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






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked