Skip to content

Instantly share code, notes, and snippets.

@ryanhoskin
Created December 4, 2014 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanhoskin/07fd438b7903a1310412 to your computer and use it in GitHub Desktop.
Save ryanhoskin/07fd438b7903a1310412 to your computer and use it in GitHub Desktop.
Check_MK PagerDuty Integration
define contact {
contact_name pagerduty
alias PagerDuty 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-pagerduty
host_notification_commands notify-host-by-pagerduty
pager YOUR-SERVICE-KEY-HERE
}
define command {
command_name notify-service-by-pagerduty
command_line /usr/share/pdagent-integrations/bin/pd-nagios -n service -k $CONTACTPAGER$ -t "$NOTIFICATIONTYPE$" -f SERVICEDESC="$SERVICEDESC$" -f SERVICESTATE="$SERVICESTATE$" -f HOSTNAME="$HOSTNAME$" -f SERVICEOUTPUT="$SERVICEOUTPUT$"
}
define command {
command_name notify-host-by-pagerduty
command_line /usr/share/pdagent-integrations/bin/pd-nagios -n host -k $CONTACTPAGER$ -t "$NOTIFICATIONTYPE$" -f HOSTNAME="$HOSTNAME$" -f HOSTSTATE="$HOSTSTATE$"
}
@bbhenry
Copy link

bbhenry commented Sep 4, 2015

Here is a easier way to do with Flexible Notification on Check_MK.
http://blog.unicsolution.com/2015/09/omd-checkmk-alert-notification.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment