I've got a script for sending SMSes with Nexmo.com, called sms.sh.
This is my zabbix_server.conf parameter:
AlertScriptsPath=/usr/lib/zabbix/alertscripts
This is my /usr/lib/zabbix/alertscripts/sms.sh:
#!/usr/bin/env bash
/usr/bin/curl -X POST https://rest.nexmo.com/sms/json \
-d api_key=$1 \
-d api_secret=$2 \
-d to=$3 \
-d from=$4 \
--data-urlencode "text=$5"
This script works when manually calling it.
I've done chown root:zabbix sms.sh and chmod 750 sms.sh on sms.sh.
In Zabbix Dashboard I've updated the SMS Media Type to type "Script" with script name "/usr/lib/zabbix/alertscripts/sms.sh" (also tried simply sms.sh), and have the 5 parameters.
Also added the Media Type to my user.
But... No SMSes are send on alerts.
I've run:
grep -r -i "sms" *
in /var/log/zabbix, but there aren't found anything.
What to do?
This is my zabbix_server.conf parameter:
AlertScriptsPath=/usr/lib/zabbix/alertscripts
This is my /usr/lib/zabbix/alertscripts/sms.sh:
#!/usr/bin/env bash
/usr/bin/curl -X POST https://rest.nexmo.com/sms/json \
-d api_key=$1 \
-d api_secret=$2 \
-d to=$3 \
-d from=$4 \
--data-urlencode "text=$5"
This script works when manually calling it.
I've done chown root:zabbix sms.sh and chmod 750 sms.sh on sms.sh.
In Zabbix Dashboard I've updated the SMS Media Type to type "Script" with script name "/usr/lib/zabbix/alertscripts/sms.sh" (also tried simply sms.sh), and have the 5 parameters.
Also added the Media Type to my user.
But... No SMSes are send on alerts.
I've run:
grep -r -i "sms" *
in /var/log/zabbix, but there aren't found anything.
What to do?
Comment