I've been using Nagios Core 3.2.3 together with Nagiosgraph 1.4.4 for a while and everything was working fine until I upgraded to Nagios 3.3.1 last week. After upgrade, I discovered that some graphs weren't working anymore. Further debugging showed that perfdata.log file is not getting data from some service check commands. What's more interesting, the data from those commands is still displayed in web interface and alerts are triggered correctly, but nothing is entered in perfdata.log and external perfdata processor is not executed. Other commands work OK, for example:
define command{
command_name check_windows_cpu
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c CheckCPU -a time=5m warn=80 crit=95 ShowAll
}
will pass performance data to perfdata.log, but
define command{
command_name check_windows_nic
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c CheckCounter -a "Counter:(NIC) Bytes total/sec=\\Network Interface($ARG1$)\Bytes Total/sec" \
"Counter:(NIC) Bytes sent/sec=\\Network Interface($ARG1$)\Bytes Sent/sec" \
"Counter:(NIC) Bytes received/sec=\\Network Interface($ARG1$)\Bytes Received/sec" ShowAll
}
will only display data in web interface, but perfdata.log is not updated. Also, none of the plugins written as shell script update perfata.log file, they only display data in web interface.
Again, it was all working correctly so I am confident that commands, file permissions, config files etc are OK. Perfdata file template is as follows:
service_perfdata_file_template=$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$ $LONGSERVICEOUTPUT$||$SERVICEPERFDATA$
Can someone suggest how to fix that stuff?
perfdata log is not updated after upgrade
Re: perfdata log is not updated after upgrade
OK, just found that there was a breaking (and undocumented) change in Nagios 3.3.1 which disabled external data processing if plugin didn't return any perfdata. There're three possible resolutions:
1) Modify your plugins and commands so they all return perfdata string
2) Patch and recompile Nagios (that's what I did)
3) Downgrade to 3.2.3
Detailed info on the issue can be found here http://sourceforge.net/mailarchive/foru ... gios-devel
1) Modify your plugins and commands so they all return perfdata string
2) Patch and recompile Nagios (that's what I did)
3) Downgrade to 3.2.3
Detailed info on the issue can be found here http://sourceforge.net/mailarchive/foru ... gios-devel
Re: perfdata log is not updated after upgrade
Glad you found that, useful information and thanks for following up!