Created
March 10, 2016 21:20
-
-
Save jcurreee/b8f4472659d7c2e402a6 to your computer and use it in GitHub Desktop.
Add PagerDuty Perl notification method for Check_MK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # PagerDuty (Perl) | |
| COMMAND="/usr/local/bin/pagerduty_nagios.pl" | |
| if [ "$NOTIFY_WHAT" = "SERVICE" ]; then | |
| $COMMAND enqueue -f pd_nagios_object=service -f CONTACTPAGER="$NOTIFY_PARAMETER_1" -f NOTIFICATIONTYPE="$NOTIFY_NOTIFICATIONTYPE" -f HOSTNAME="$NOTIFY_HOSTNAME" -f SERVICEDESC="$NOTIFY_SERVICEDESC" -f SERVICESTATE="$NOTIFY_SERVICESTATE" | |
| elif [ "$NOTIFY_WHAT" = "HOST" ]; then | |
| $COMMAND enqueue -f pd_nagios_object=host -f CONTACTPAGER="$NOTIFY_PARAMETER_1" -f NOTIFICATIONTYPE="$NOTIFY_NOTIFICATIONTYPE" -f HOSTNAME="$NOTIFY_HOSTNAME" -f HOSTSTATE="$NOTIFY_HOSTSTATE" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment