Page 1 of 1

Nagios 4.0.3 ignores perfdata_timeout value

Posted: Mon Mar 24, 2014 5:52 am
by chrislewis28
Hi,

I'm have an issue with the following message appearing in my log files:

Code: Select all

[1395657695] Warning: Service performance data file processing command '/usr/local/pnp4nagios/libexec/process_perfdata.pl --bulk=/usr/local/pnp4nagios/var/service-perfdata' timed out after 5 seconds
I think the timeout is caused by Nagios and not pnp4nagios. The reason being I increased in in process_perfdata.cfg to 30 however I still got the error message, I then hard coded it into process_perfdata.pl and the commands.cfg but still got the message. Also running the command '/usr/local/pnp4nagios/libexec/process_perfdata.pl' shows the updated timeout in the help output.

I have also set "perfdata_timeout=60" in nagios.cfg.

Does anyone know how I can change the 5 second timeout? FYI i'm running nagios 4.0.3

Chris

Re: Nagios 4.0.3 ignores perfdata_timeout value

Posted: Mon Mar 24, 2014 2:11 pm
by scottwilkerson
Just to clarify, you did restart nagios after changing the perfdata_timeout in nagios.cfg correct?

Re: Nagios 4.0.3 ignores perfdata_timeout value

Posted: Mon Mar 24, 2014 2:20 pm
by chrislewis28
Yes have restarted a few times!

Re: Nagios 4.0.3 ignores perfdata_timeout value

Posted: Mon Mar 24, 2014 4:35 pm
by abrist
I would just like to verify that you are using bulk mode *without* npcd, is that correct?
Additionally, could you check your nagios.cfg for near duplicate performance data lines?

Code: Select all

grep perf /path/to/nagios.cfg

Re: Nagios 4.0.3 ignores perfdata_timeout value

Posted: Tue Mar 25, 2014 4:10 am
by chrislewis28
Hi,

Im not using npcd. Output from nagios.cfg below:

Code: Select all

grep perf /usr/local/nagios/etc/nagios.cfg|grep -v ^#
perfdata_timeout=60
process_performance_data=1
service_perfdata_file=/usr/local/pnp4nagios/var/service-perfdata
host_perfdata_file=/usr/local/pnp4nagios/var/host-perfdata
host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$
host_perfdata_file_mode=a
service_perfdata_file_mode=a
host_perfdata_file_processing_interval=15
service_perfdata_file_processing_interval=15
host_perfdata_file_processing_command=process-host-perfdata-file
service_perfdata_file_processing_command=process-service-perfdata-file

Re: Nagios 4.0.3 ignores perfdata_timeout value

Posted: Tue Mar 25, 2014 4:20 pm
by scottwilkerson
the only thing I can think of is that you have a nagios process that is running without the current perfdata_timeout values

Code: Select all

ps -ef|grep bin/nagios|grep -v grep
I say this because I setup a test machine, changed the command in service_perfdata_file_processing_command to be

Code: Select all

define command {
       command_name                  		process-service-perfdata-file-bulk
       command_line                  		sleep 31
}	
and I got this as expected

Code: Select all

[1395781469] Warning: Service performance data file processing command 'sleep 31' timed out after 5 seconds
Then I changed my perfdata_timeout value in nagios.cfg to

Code: Select all

perfdata_timeout=30
and I got this as expected

Code: Select all

[1395781599] Warning: Service performance data file processing command 'sleep 31' timed out after 30 seconds
So it is taking the value from the nagios.cfg ....

Re: Nagios 4.0.3 ignores perfdata_timeout value

Posted: Tue Mar 25, 2014 4:43 pm
by chrislewis28
Hi

I think you may be right. I actually posted another topic as I noticed that multiple Nagios daemons are running on the server. I stopped Nagios then killed all the remaining daemon processes and started it again but still see more than one daemon process. Not sure if this is expected or not! However since killing of the remaining Nagios processes I haven't seen the graph message problem!

Re: Nagios 4.0.3 ignores perfdata_timeout value

Posted: Wed Mar 26, 2014 7:29 am
by scottwilkerson
Yep. I believe this will resolve the issue. Let us know if it reoccurs.