Created
March 10, 2016 18:14
-
-
Save jcurreee/b21938f316f92dd3fadf to your computer and use it in GitHub Desktop.
Add PagerDuty Agent 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 Agent | |
COMMAND="/usr/share/pdagent-integrations/bin/pd-nagios" | |
if [ "$NOTIFY_WHAT" = "SERVICE" ]; then | |
$COMMAND -n service -k $NOTIFY_PARAMETER_1 -t $NOTIFY_NOTIFICATIONTYPE -f SERVICEDESC="$NOTIFY_SERVICEDESC" -f SERVICESTATE="$NOTIFY_SERVICESTATE" -f HOSTNAME="$NOTIFY_HOSTNAME" | |
elif [ "$NOTIFY_WHAT" = "HOST" ]; then | |
$COMMAND -n host -k $NOTIFY_PARAMETER_1 -t $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