Skip to content

Instantly share code, notes, and snippets.

@ryanhoskin
Created April 15, 2013 23:32
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/5392173 to your computer and use it in GitHub Desktop.
Save ryanhoskin/5392173 to your computer and use it in GitHub Desktop.
Icinga Command w/ Environment Variables
define command {
command_name notify-service-by-pagerduty
command_line /usr/local/bin/pagerduty_icinga.pl enqueue -f pd_nagios_object=service -f CONTACTPAGER="$CONTACTPAGER$" -f NOTIFICATIONTYPE="$NOTIFICATIONTYPE$" -f HOSTNAME="$HOSTNAME$" -f SERVICEDESC="$SERVICEDESC$" -f SERVICESTATE="$SERVICESTATE$"
}
define command {
command_name notify-host-by-pagerduty
command_line /usr/local/bin/pagerduty_icinga.pl enqueue -f pd_nagios_object=host -f CONTACTPAGER="$CONTACTPAGER$" -f NOTIFICATIONTYPE="$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