Re: host & service perfdata increasing alarmingly
Posted: Thu Feb 09, 2017 6:57 pm
I have this in my commands.cfg:
'''
# SAMPLE PERFORMANCE DATA COMMANDS
#
# These are sample performance data commands that can be used to send performance
# data output to two text files (one for hosts, another for services). If you
# plan on simply writing performance data out to a file, consider using the
# host_perfdata_file and service_perfdata_file options in the main config file.
#
################################################################################
# 'process-host-perfdata' command definition
define command{
command_name process-host-perfdata
command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /usr/local/nagios/var/host-perfdata.out
}
# 'process-service-perfdata' command definition
define command{
command_name process-service-perfdata
command_line /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> /usr/local/nagios/var/service-perfdata.out
}
define command{
command_name process-service-perfdata-file
command_line /bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$
}
define command{
command_name process-host-perfdata-file
command_line /bin/mv /usr/local/pnp4nagios/var/host-perfdata /usr/local/pnp4nagios/var/spool/host-perfdata.$TIMET$
}
'''
Also, an interesting find that might help:
'''
[root@nagios-eqx-01 local]# grep -R -i 'process-host-perfdata-file' .
./nagios/var/nagios.log:[1486632671] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486632707] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486663091] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486663173] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486663610] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486664528] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486667224] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486668876] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486668923] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486676061] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
grep: ./nagios/var/rw/nagios.qh: No such device or address
^C
[root@nagios-eqx-01 local]# grep -R -i 'process-service-perfdata-file' .
./nagios/var/nagios.log:[1486632671] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486632707] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486663091] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486663173] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486663610] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486664528] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486667224] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486668876] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486668923] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486676061] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
grep: ./nagios/var/rw/nagios.qh: No such device or address
'''
'''
# SAMPLE PERFORMANCE DATA COMMANDS
#
# These are sample performance data commands that can be used to send performance
# data output to two text files (one for hosts, another for services). If you
# plan on simply writing performance data out to a file, consider using the
# host_perfdata_file and service_perfdata_file options in the main config file.
#
################################################################################
# 'process-host-perfdata' command definition
define command{
command_name process-host-perfdata
command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /usr/local/nagios/var/host-perfdata.out
}
# 'process-service-perfdata' command definition
define command{
command_name process-service-perfdata
command_line /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> /usr/local/nagios/var/service-perfdata.out
}
define command{
command_name process-service-perfdata-file
command_line /bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$
}
define command{
command_name process-host-perfdata-file
command_line /bin/mv /usr/local/pnp4nagios/var/host-perfdata /usr/local/pnp4nagios/var/spool/host-perfdata.$TIMET$
}
'''
Also, an interesting find that might help:
'''
[root@nagios-eqx-01 local]# grep -R -i 'process-host-perfdata-file' .
./nagios/var/nagios.log:[1486632671] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486632707] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486663091] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486663173] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486663610] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486664528] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486667224] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486668876] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486668923] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
./nagios/var/nagios.log:[1486676061] Warning: Host performance file processing command 'process-host-perfdata-file' was not found - host performance data file will not be processed!
grep: ./nagios/var/rw/nagios.qh: No such device or address
^C
[root@nagios-eqx-01 local]# grep -R -i 'process-service-perfdata-file' .
./nagios/var/nagios.log:[1486632671] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486632707] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486663091] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486663173] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486663610] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486664528] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486667224] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486668876] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486668923] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
./nagios/var/nagios.log:[1486676061] Warning: Service performance file processing command 'process-service-perfdata-file' was not found - service performance data file will not be processed!
grep: ./nagios/var/rw/nagios.qh: No such device or address
'''