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
#!/bin/bash | |
WEBHOST_NAGIOS="<Host that nagios is runing on>" | |
SLACK_CHANNEL="#<Channel name>" | |
SLACK_BOTNAME="<Bot Name>" | |
WEBHOOK_URL="<Webhook URL>" #Get it from Slack Incoming WebHooks setup instruction | |
#Set the message icon based on Nagios service state | |
# supported emoji table available at http://unicodey.com/emoji-data/table.htm | |
if [ "$NAGIOS_SERVICESTATE" = "OK" ] |