If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to REGISTER before you can post. To start viewing messages, select the forum that you want to visit from the selection below.
We previously had a perl script working with clickatell and nagios so I have been searching through all the previous scripts I could find and trying various ways of getting clickatell to work with Zabbix 3.0.3. None of them worked so I decided to have a go at it myself.
Set up a rest api in clickatell to get your authtoken then create the attached script in /usr/lib/zabbix/alertscripts/
Comments detail what is required in zabbix frontend
sms.sh works fine from command line, given the parameters (for example ./sms.sh +30999999999 TestMessage MoreInfoMoreInfo), but does not work when used from notification (Media script Clickatel).
Action Log says it is sent ok but no sms message arrives on the phone.
The following is an extract from the zabbix server log file when the Clickatel script is fired.
1661:20160812:193928.678 In zbx_popen() command:'/usr/lib/zabbix/alertscripts/sms.sh '+3069xxxxxxxx' 'PROBLEM: Viva is Down' 'Trigger: Viva is Down
I do not know how the server interprets the command but it seems that there is something wrong with the ' character.
The command seems to have an ' that is not matched and the last parameter passed does not match the ' either.
The parameters passed are:
{ALERT.SENDTO}='+3069xxxxxxxx'
{ALERT.SUBJECT}='PROBLEM: Viva is Down'
{ALERT.MESSAGE}='Trigger: Viva is Down (missing one ' character)
Is this a bug or just an erroneous log record.
Comment