service-perfdata file life?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
aiqbal88
Posts: 16
Joined: Tue Feb 04, 2020 3:40 pm

service-perfdata file life?

Post 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
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: service-perfdata file life?

Post 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
Locked