Skip to content

Instantly share code, notes, and snippets.

@vanch
Last active October 29, 2017 04:52
Show Gist options
  • Save vanch/7a79ce24b03761e7c549 to your computer and use it in GitHub Desktop.
Save vanch/7a79ce24b03761e7c549 to your computer and use it in GitHub Desktop.
zabbix telegram alertscript
#!/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