1 ###############################################################################
2 # COMMANDS.CFG - SAMPLE COMMAND DEFINITIONS FOR ICINGA
3 # NOTES: This config file provides you with some example command definitions
4 # that you can reference in host, service, and contact definitions.
6 # You don't need to keep commands in a separate file from your other
7 # object definitions. This has been done just to make things easier to
9 ###############################################################################
12 ################################################################################
13 # SAMPLE NOTIFICATION COMMANDS
14 # These are some example notification commands. They may or may not work on
15 # your system without modification. As an example, some systems will require
16 # you to use "/usr/bin/mailx" instead of "/usr/bin/mail" in the commands below.
17 ################################################################################
20 # 'notify-host-by-email' command definition
22 command_name notify-host-by-email
23 command_line /usr/bin/printf "%b" "***** Icinga *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
26 # 'notify-service-by-email' command definition
28 command_name notify-service-by-email
29 command_line /usr/bin/printf "%b" "***** Icinga *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
33 command_name notify-irc-host
34 command_line /etc/icinga/bin/notify-irc "$CONTACTADDRESS1$" "$CONTACTEMAIL$" "$NOTIFICATIONTYPE$" "$HOSTNAME$" "" "$HOSTSTATE$" "$HOSTOUTPUT$"
38 command_name notify-irc-service
39 command_line /etc/icinga/bin/notify-irc "$CONTACTADDRESS1$" "$CONTACTEMAIL$" "$NOTIFICATIONTYPE$" "$HOSTNAME$" "$SERVICEDESC$" "$SERVICESTATE$" "$SERVICEOUTPUT$"
43 ################################################################################
44 # SAMPLE PERFORMANCE DATA COMMANDS
45 # These are sample performance data commands that can be used to send performance
46 # data output to two text files (one for hosts, another for services). If you
47 # plan on simply writing performance data out to a file, consider using the
48 # host_perfdata_file and service_perfdata_file options in the main config file.
49 ################################################################################
52 # 'process-host-perfdata' command definition
54 command_name process-host-perfdata
55 command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /var/cache/icinga/host-perfdata.out
59 # 'process-service-perfdata' command definition
61 command_name process-service-perfdata
62 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/cache/icinga/service-perfdata.out