Thursday, December 17, 2015

hubot + hangups + dokuwiki + zabbix

Fast post!

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.



My shellscript template:

#!/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