- Copy
sms.sh
to the path specified by thealertscriptspath
field in yourzabbix-server.conf
. - Ensure that
zabbix
has execute permissions forsms.sh
. - Go into the script and edit in your Twilio account SID and authentication token.
- Create a new Media Type.
- Set the type to
Script
. - Set the script name to
sms.sh
. - Create 3 parameters with the following values:
{ALERT.SENDTO}
<your_twilio_number>
{ALERT.MESSAGE}
In the Media tab of a user's settings, add a new media item with the newly created Media Type from the above section. Set the Send to
field to be the user's phone number (in international format).
Create a new action. The message field is what will be sent through sms. Take into consideration the length of the message, as a long message will result in it being split into multiple parts. This results in higher Twilio charges since they bill per message, not per request.