I'm running Debian 8 and Zabbix 3.2.
I've made a custom alert script, which runs fine when I run in terminal:
/bin/sh /usr/lib/zabbix/alertscripts/send_sms.sh 4483222740 Hello
This send a SMS via Twilio, works fine.
In my zabbix_server.conf I have:
AlertScriptsPath=/usr/lib/zabbix/alertscripts
I've created a custom media type following https://www.zabbix.com/documentation/3.2/manual/config/notifications/media/script
But the script is not being called. I have a general media type for e-mail which are being triggered correctly.
My permissions for the script is:
ls -alh
total 12K
drwxr-xr-x 2 root root 4.0K Mar 9 09:04 .
drwxr-xr-x 4 root root 4.0K Feb 3 13:36 ..
-rwxr--r-- 1 root root 165 Mar 9 09:12 send_sms.sh
I've tried to grep for "send_sms" in the /var/log/ directory to see if any errors occurred. Nothing.
I'm ending my script with
exit 0
How to debug?