1 ################################################################################
2 # Sample object config file for Nagios
4 # Read the documentation for more information on this configuration file. I've
5 # provided some comments here, but things may not be so clear without further
6 # explanation, so make sure to read the HTML documentation!
8 # Last Modified: 12-17-2005
10 ################################################################################
13 ################################################################################
19 # template <templatename>
21 # command_name <commandname>
22 # command_line <commandline>
27 # <templatename> = object name of another command definition that should be
28 # used as a template for this definition (optional)
29 # <objectname> = object name of command definition, referenced by other
30 # command definitions that use it as a template (optional)
31 # <commandname> = name of the command, as recognized/used by Nagios
32 # <commandline> = command line
34 ################################################################################
39 ################################################################################
41 # SAMPLE NOTIFICATION COMMANDS
43 # These are some example notification commands. They may or may not work on
44 # your system without modification.
46 ################################################################################
49 # 'host-notify-by-email' command definition
51 command_name host-notify-by-email
52 command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
56 # 'host-notify-by-epager' command definition
58 command_name host-notify-by-epager
59 command_line /usr/bin/printf "%b" "Host '$HOSTALIAS$' is $HOSTSTATE$\nInfo: $HOSTOUTPUT$\nTime: $LONGDATETIME$" | /bin/mail -s "$NOTIFICATIONTYPE$ alert - Host $HOSTNAME$ is $HOSTSTATE$" $CONTACTPAGER$
62 # 'notify-by-email' command definition
64 command_name notify-by-email
65 command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
69 # 'notify-by-epager' command definition
71 command_name notify-by-epager
72 command_line /usr/bin/printf "%b" "Service: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\nInfo: $SERVICEOUTPUT$\nDate: $LONGDATETIME$" | /bin/mail -s "$NOTIFICATIONTYPE$: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$" $CONTACTPAGER$
79 ################################################################################
81 # SAMPLE PERFORMANCE DATA COMMANDS
83 # These are sample performance data commands that can be used to send performance
84 # data output to two text files (one for hosts, another for services). If you
85 # plan on simply writing performance data out to a file, consider using the
86 # host_perfdata_file and service_perfdata_file options in the main config file.
88 ################################################################################
91 # 'process-host-perfdata' command definition
93 command_name process-host-perfdata
94 command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /var/log/nagios/host-perfdata.out
98 # 'process-service-perfdata' command definition
100 command_name process-service-perfdata
101 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/log/nagios/service-perfdata.out