############################################################################### # COMMANDS.CFG # ################################################################################ ################################################################################ # COMMAND DEFINITIONS # # SYNTAX: # # define command { # template # name # command_name # command_line # } # # WHERE: # # = object name of another command definition that should be # used as a template for this definition (optional) # = object name of command definition, referenced by other # command definitions that use it as a template (optional) # = name of the command, as recognized/used by Nagios # = command line # ################################################################################ ################################################################################ # # NOTIFICATION COMMANDS # # In PLD Linux we use "nagios-notify" package for notification templates. # See /etc/nagios/plugins/nagios-notify.cfg. ################################################################################ # # HOST CHECK COMMANDS # In PLD Linux we have "check-host-alive" command definition in "nagios-plugin-check_ping" package. # See /etc/nagios/plugins/check_ping.cfg. # ################################################################################ ################################################################################ # # 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" >> /var/lib/nagios/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" >> /var/lib/nagios/service-perfdata.out }