Answer the question
In order to leave comments, you need to log in
Zabbix3 notification script not working?
Hello. I made myself a telegram bot that would send notifications in case of problems:
#!/usr/local/bin/bash
TOKEN='something'
if [ $# -ne 3 ] ; then echo 'Error! You must define params' && exit 1 ; fi
CHAT_ID="$1"
SUBJECT="$2"
MESSAGE="$3"
/usr/local/bin/curl --header 'Content-Type: application/json' --request 'POST' --data "{\"chat_id\":\"${CHAT_ID}\",\"text":\"${SUBJECT}\n${MESSAGE}\"}" "https://api.telegram.org/bot$TOKEN/sendMessage"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question