-
-
Save ultragtx/2b78a78c2b3f8537b175aeb8238941f0 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