Created
May 30, 2017 20:59
-
-
Save DaisukeMiyamoto/bdb63951d094e573985e7a3536f10f04 to your computer and use it in GitHub Desktop.
send action message from zabbix to matrix.fm (alternative of https://github.com/ericoc/zabbix-slack-alertscript)
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 | |
| URL=SET_URL | |
| TOKEN=SET_TOKEN | |
| ROOM_ID=$1 | |
| MSG="\"$2: $3\"" | |
| curl -XPOST -d \ | |
| '{"msgtype":"m.text", "body":'"${MSG}"'}' \ | |
| "https://${URL}/_matrix/client/r0/rooms/${ROOM_ID}/send/m.room.message?access_token=${TOKEN}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment