Skip to content

Instantly share code, notes, and snippets.

@ultragtx
Forked from vanch/tg-send2chat
Created October 29, 2017 04:52
Show Gist options
  • Save ultragtx/2b78a78c2b3f8537b175aeb8238941f0 to your computer and use it in GitHub Desktop.
Save ultragtx/2b78a78c2b3f8537b175aeb8238941f0 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