Last active
March 29, 2017 20:27
-
-
Save gkspranger/137acaff3f77cb6060b782767ac2c431 to your computer and use it in GitHub Desktop.
This file contains 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
# status link = <a href=\"https://{{ inventory_hostname }}/nagios/cgi-bin/extinfo.cgi?type=2&host=$HOSTNAME$&service=$$(echo $SERVICEDESC$ | sed -e 's/ /%20/g')\">Status Link</a> | |
# ack link = <a href=\"https://{{ inventory_hostname }}/nagios/cgi-bin/cmd.cgi?cmd_typ=34&host=$HOSTNAME$&service=$$(echo $SERVICEDESC$ | sed -e 's/ /%20/g')\">Acknowledgement Link</a> | |
# appended to the "$SERVICEOUTPUT$" | |
# see below | |
define command { | |
command_name notify-service-by-hipchat | |
command_line hipsaint --token={{ hipchat_token }} --room={{ hipchat_redrum_id }} --type=service --inputs="$SERVICEDESC$|$HOSTALIAS$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$SERVICESTATE$|$SERVICEOUTPUT$<br><br><a href=\"https://{{ inventory_hostname }}/nagios/cgi-bin/extinfo.cgi?type=2&host=$HOSTNAME$&service=$$(echo $SERVICEDESC$ | sed -e 's/ /%20/g')\">Status Link</a><br><a href=\"https://{{ inventory_hostname }}/nagios/cgi-bin/cmd.cgi?cmd_typ=34&host=$HOSTNAME$&service=$$(echo $SERVICEDESC$ | sed -e 's/ /%20/g')\">Acknowledgement Link</a>" -n | |
} | |
define contact { | |
use generic-contact | |
contact_name hipchat_redrum | |
contactgroups hipchat_redrum | |
service_notification_commands notify-service-by-hipchat | |
email /dev/null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment