Last active
October 29, 2017 04:52
-
-
Save vanch/7a79ce24b03761e7c549 to your computer and use it in GitHub Desktop.
zabbix telegram alertscript
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 | |
to=$1 | |
subject=$2 | |
body=$3 | |
/usr/bin/telegram-cli --bot \ | |
--profile bot \ | |
--disable-names \ | |
--disable-output \ | |
--disable-readline \ | |
--rsa-key /var/lib/zabbix/.telegram-cli/server.pub \ | |
--username zabbix \ | |
--exec "msg $to $subject" | grep FAIL && exit 1 | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment