I have integrated dokuwiki and zabbix with hubot using hanhgups. This is a hell because you need to make a concrete calls with the hangups adapter.
I am using hungups api REST in hubot to receive the notifications. So we need to integrate that calls.
- For dokuwiki, i created a repo to adapt its calls to hangups: https://github.com/vicendominguez/dokuwiki-hubothangups.
- For Zabbix, you will need a shellscript as External Script and create a new "Action".
My shellscript template:
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 | |
URL="http://gw.url.net:40001/proxy/" | |
ID="$1" | |
MESSAGE="$2" | |
if [ -z "$ID" ] | |
then | |
echo 'ID param not found' | |
exit 1 | |
fi | |
if [ -z "$MESSAGE" ] | |
then | |
echo 'MESSAGE param not found!' | |
exit 1 | |
fi | |
MESSAGE="Hey!: $2" | |
curl -vvvv -H "Accept: application/json" -H "Content-type: application/json" -X POST -d "{\"conversationId\":\"$ID\",\"message\":\"$MESSAGE\"}" $URL |
My Action:
No comments:
Post a Comment