-
Notifications
You must be signed in to change notification settings - Fork 0
/
zenduty_nagios.cfg
24 lines (22 loc) · 1.49 KB
/
zenduty_nagios.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
define contact {
contact_name zenduty
alias Zenduty Pseudo-Contact
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-service-by-zenduty
host_notification_commands notify-host-by-zenduty
pager ENTER-YOUR-ZENDUTY-INTEGRATION-KEY-HERE
register 1
}
define command {
command_name notify-service-by-zenduty
command_line /usr/local/nagios/sbin/zenduty_nagios.py -n $CONTACTPAGER$ -e service -t "$NOTIFICATIONTYPE$" -f SERVICEDESC="$SERVICEDESC$" -f SERVICESTATE="$SERVICESTATE$" -f HOSTNAME="$HOSTNAME$" -f HOSTDISPLAYNAME="$HOSTDISPLAYNAME$" -f SERVICEDISPLAYNAME="$SERVICEDISPLAYNAME$" -f PROBLEMID="$SERVICEPROBLEMID$" -f LASTPROBLEMID="$LASTSERVICEPROBLEMID$" -f OUTPUT="$SERVICEOUTPUT$"
register 1
}
define command {
command_name notify-host-by-zenduty
command_line /usr/local/nagios/sbin/zenduty_nagios.py -n $CONTACTPAGER$ -e host -t "$NOTIFICATIONTYPE$" -f HOSTNAME="$HOSTNAME$" -f HOSTSTATE="$HOSTSTATE$" -f HOSTDISPLAYNAME="$HOSTDISPLAYNAME$" -f PROBLEMID="$HOSTPROBLEMID$" -f LASTPROBLEMID="$LASTHOSTPROBLEMID$" -f OUTPUT="$HOSTOUTPUT$"
register 1
}