Page 1 of 1

service-perfdata file life?

Posted: Fri Apr 23, 2021 12:39 am
by aiqbal88
IS there a way to increase time period for service-perfdata file? it gets truncated every 1 min i think. i am not sure but is there a way to increase it to 1 hour

Re: service-perfdata file life?

Posted: Fri Apr 23, 2021 1:21 pm
by vtrac
Hi,
I googled around and found this KB:
https://assets.nagios.com/downloads/nag ... gmain.html

The KB above listed this:
Service Performance Data File Processing Interval

Format: service_perfdata_file_processing_interval=<seconds>
Example: service_perfdata_file_processing_interval=0

This option allows you to specify the interval (in seconds) at which the service performance data file is processed using the service performance data file processing command. A value of 0 indicates that the performance data file should not be processed at regular intervals.

However, when I looked inside the "nagios.cfg", we defined "service_perfdata_file_processing_interval=15".
So, the "service-perfdata" process every 15 seconds, not every minute.

Code: Select all

# service performance data
service_perfdata_file=/usr/local/nagios/var/service-perfdata
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$\tSERVICEOUTPUT::$SERVICEOUTPUT$\tLONGSERVICEOUTPUT::$LONGSERVICEOUTPUT$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=15
service_perfdata_file_processing_command=process-service-perfdata-file-bulk
If you do "ls -l service-perfdata" repeatedly, you will see that this file is changing every few seconds in size, not minute, even though the date/time stamp only display changes per minute.

I'm not sure why you would want this file to change to "1 hour", which is very long.


Best Regards,
Vinh