define command {
command_name notify-by-email
command_line /usr/bin/printf "%b" "To: $CONTACTEMAIL$\r\nMime-Version: 1.0\r\nContent-Type: text/html\r\nContent-Base: http://nagiosbox\r\nSubject: $SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$\x21\r\n\r\n***** Nagios 1.1 *****
Notification Type: $NOTIFICATIONTYPE$
Host: $HOSTNAME$
Service: $SERVICEDESC$
State: $SERVICESTATE$
Address: $HOSTADDRESS$
Info: $OUTPUT$
Date/Time: $DATETIME$
Show availability report
Show service details
Locate on Map
Show services
" | /usr/sbin/sendmail -t
}
define command {
command_name host-notify-by-email
command_line /usr/bin/printf "%b" "To: $CONTACTEMAIL$\r\nMime-Version: 1.0\r\nContent-Type: text/html\r\nContent-Base: http://nagiosbox\r\nSubject: Host $HOSTSTATE$ alert for $HOSTNAME$\x21\r\n\r\n***** Nagios 1.1 *****
Notification Type: $NOTIFICATIONTYPE$
Host: $HOSTNAME$
State: $HOSTSTATE$
Address: $HOSTADDRESS$
Info: $OUTPUT$
Date/Time: $DATETIME$
Show availability report
Show host details
Locate on Map
Show services
" | /usr/sbin/sendmail -t
}