Nagios 4.0.3 ignores perfdata_timeout value

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
chrislewis28
Posts: 11
Joined: Tue Jun 04, 2013 6:49 am

Nagios 4.0.3 ignores perfdata_timeout value

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios 4.0.3 ignores perfdata_timeout value

Post by scottwilkerson »

Just to clarify, you did restart nagios after changing the perfdata_timeout in nagios.cfg correct?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
chrislewis28
Posts: 11
Joined: Tue Jun 04, 2013 6:49 am

Re: Nagios 4.0.3 ignores perfdata_timeout value

Post by chrislewis28 »

Yes have restarted a few times!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios 4.0.3 ignores perfdata_timeout value

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
chrislewis28
Posts: 11
Joined: Tue Jun 04, 2013 6:49 am

Re: Nagios 4.0.3 ignores perfdata_timeout value

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios 4.0.3 ignores perfdata_timeout value

Post 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 ....
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
chrislewis28
Posts: 11
Joined: Tue Jun 04, 2013 6:49 am

Re: Nagios 4.0.3 ignores perfdata_timeout value

Post 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!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios 4.0.3 ignores perfdata_timeout value

Post by scottwilkerson »

Yep. I believe this will resolve the issue. Let us know if it reoccurs.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked