############################################################################### # COMMAND CONFIGURATION # # $Id: command.cfg.in,v 1.8.2.3 2003/06/12 04:44:52 undrgrid Exp $ # # SYNTAX: # command[]= # # = A short name used to identify the command # = The actual command line. The command line doesn't have to # be surrounded in quotes, but may contain quotes as needed within # the command line. Take care to use single quotes at the # outer edges of commands or you will have command line # expansion problems when the command is executed by the shell. # Any valid shell command can be used. Multiple commands can # be separated with semicolons, piping is allowed. The # command line can contain macros, but not are macros are valid # at all time (notifications, service checks, etc). See the # HTML documentaion for more informationon on using macros in # commands. # # Note: Service check, service notification, host check, host notification, # service event handler, and host event handler functions are all defined # here. # # Note: Use the convertcfg program in the contrib directory of the Nagios # distribution to convert this file into a object file format. # ############################################################################### # Service notification command - send email with problem summary command[notify-by-email]=/bin/printf "$OUTPUT$" | /bin/mail -s '$SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$' $CONTACTEMAIL$ # Host notification commands (one for email, one for alphanumeric # pager with email gateway) command[host-notify-by-email]=/bin/echo -e "***** Nagios *****\n\nHost "$HOSTALIAS$" is $HOSTSTATE$!\n\nDate/Time: $DATETIME$\n" | /bin/mail -s 'Host $HOSTNAME$ is $HOSTSTATE$!' $CONTACTEMAIL$ # These are some example service check commands. See the HTML # documentation on the plugins for examples of how to configure # command definitions. command[check_tcp]=/usr/lib/nagios/plugins/check_tcp -H $HOSTADDRESS$ -p $ARG1$ command[check_udp]=/usr/lib/nagios/plugins/check_udp -H $HOSTADDRESS$ -p $ARG1$ command[check_users]=/usr/lib/nagios/plugins/check_users -w $ARG1$ -c $ARG2$ command[check_ping]=/usr/lib/nagios/plugins/check_ping -H $HOSTADDRESS$ -w 10:20% -c 60:100%