Skip to content

Instantly share code, notes, and snippets.

@ryanhoskin
Created May 28, 2014 18:16
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/39d3661fc38d62db7fc1 to your computer and use it in GitHub Desktop.
Save ryanhoskin/39d3661fc38d62db7fc1 to your computer and use it in GitHub Desktop.
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 1ebf75f79c8d495ca90a64e18c3e93c5
}
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$"
}
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$"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment