Ad Widget

Collapse

How to setup SMS with clickatell

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mark.chan
    Member
    • Mar 2016
    • 35

    #1

    How to setup SMS with clickatell

    Since I found that the wiki page for setup clickatell is removed.
    Could anyone teach me how to setup a SMS with clickatell http api?
  • mw-dts
    Junior Member
    • Jun 2016
    • 1

    #2
    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
    Attached Files

    Comment

    • tstav
      Junior Member
      • Aug 2016
      • 6

      #3
      Help with sms.sh

      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.

      Comment

      • tstav
        Junior Member
        • Aug 2016
        • 6

        #4
        More info on sms.sh scipt problem

        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

        Working...