Ad Widget

Collapse

How to send SMS ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Z4Gai
    Junior Member
    • Dec 2005
    • 2

    #1

    How to send SMS ?

    Is it possible to send SMS in addition to the email notifications?
    If so what script is used? with what software?
    I have an external cell phone connected to the zabbix machine via cable

    Any help will be appreciated
  • Db0
    Junior Member
    • May 2006
    • 14

    #2
    Check my sig

    Comment

    • iceman
      Junior Member
      • May 2006
      • 4

      #3
      We achieved a solution with an internal ISDN Card but it should work with a Cellphone too.

      We are using YAPS (Yet another Pager Software) Version 0.96. We installed it as RPM on a SuSE Linux Enterprise 9 System, but the sources are available too

      Configuration is done with the file /etc/yaps.rc (There are various Examples availabe on the net)

      You have to configure the Service sections, and -important- in the standard Section which Modem is going to be used.

      Try out if it is working from the commandline (i.e /usr/bin/yaps recipient 'message'). Everything is logged to the Console and/or to the logfile defined in yaps.rc, depending on the verbose level.

      IMPORTANT : It has to be run as root, i could not get it working as the zabbix user. So you have to to with sudo.

      When sending SMS from the console works, doing it from Zabbix is easy.
      Create a new Media of type script and use the attached perl script.

      HTH
      Attached Files

      Comment

      • DiedX
        Senior Member
        • Oct 2004
        • 106

        #4




        (latter is Dutch)
        https://www.diederik.nl

        Comment

        • RohrbaGe
          Senior Member
          • Aug 2005
          • 167

          #5
          SMS with yaps

          I´m using also yaps for sending SMS with an internal ISDN card.
          But not within zabbix yet, only for UPS monitoring.
          But I plan to use it soon.
          I do not hope to get too much SMS. If it does there is the the gnokii project.
          It works with a serial connected mobile phone, and can save some money.

          One bad effect with yaps might be, that you have to make sure,
          that only one instance of yaps can start.

          I have scripted for that a sort of message queue.
          yaps will run from cron every minute and works at this queue.
          So it does not matter how many sms are in the queue.
          And sometimes, yaps does not send on the first try, because the provider is too busy.


          Gerald

          Comment

          • Philippe
            Member
            • Oct 2004
            • 77

            #6
            hello,

            i configured everything in yaps and for "phone" in "services" i added the phone number of the sms centre of the provider.

            i added also a pagerid named "ikke" with my mobile phone number.
            So, yaps should call the provider and passthru my number ?
            Does it works like that ?

            i tried it but i don't get an sms, i changed the number from "phone" into my number just to be sure that it calls and i got my mobile phone ringing.
            what is wrong ?

            (in example here, i change my number here for the forum)
            0475 16 16 22 is the sms centre number, worked fine with other software so i am sure of it.


            secsquid:~# yaps -C /data/yaps-0.96/yaps.rc ikke "test"
            Found service proximus for 123456
            Sending following message:
            ikke (proximus, 123456): test (It's me!)
            Trying to open /dev/ttyS0 for modem standard
            [Hangup]
            [Send] <cr>
            [Cmd Mdzz 200]
            [Send] ATZ<cr>
            [Expect] <cr>ATZ<cr><cr><lf>OK got OK
            [Send] ATE0Q0V1<cr>
            [Expect] <cr><lf>ATE0Q0V1<cr><cr><lf>OK got OK
            Using modem standard at 38400 bps, 8n1 over /dev/ttyS0
            Trying do dial 0475161622
            [Send] ATD0475161622<cr>
            [Expect] <cr><lf><cr><lf>CONNECT got CONNECT
            Dial successful
            [Drain] 33600/ARQ/V34/LAPM/V42BIS<cr><lf><cr><lf>connected<cr><lf>
            [Send] <cr>
            [Expect] timeout
            [Send] <cr>
            [Expect] <cr><lf>NO CARRIER<cr><lf> timeout
            [Send] <cr>
            [Expect] timeout
            Didn't got initial response
            [Drain]
            [Hangup]
            [Send] ATZ<cr>
            [Expect] <cr><lf>OK got OK
            secsquid:~#


            grtz,
            Phil.

            Comment

            • oddo
              Junior Member
              • Jul 2006
              • 1

              #7
              where do i get the &quot;clickatell.sms&quot; file ?

              i whant to setup SMS notification under zabbix
              i follow your instructions on http://www.dbzer0.com/the-penguin-migration/zabbix/sms/

              i cannot find the file "clickatell.sms" or "clickatell"

              i have tried with smssend (version 3.4 on debian) and smssend (version 3.2 on redhat)

              where do i get the "clickatell.sms" file

              Comment

              • ddrager
                Junior Member
                • Aug 2006
                • 13

                #8
                In case anyone needs clickatell.sms, it is not available on the original website any more. However, I did get it from Google Cache

                Code:
                ## SkySMS provider file - http://www.clickatell.com 
                ## # Version 0.1 
                # by Steve Herrell 
                # Error codes : 
                # 1 -> General failure 
                
                NbParams 6
                %Login : Your Login 
                %Password Hidden : Your Password 
                %ApiID Hidden : Your API ID 
                %Sender : API Sender Name 
                %Tel : Where To Send Message To 
                %Message Size=160 Convert : Your message 
                
                GetURL https://api.clickatell.com/http/sendmsg
                Params from=\%Sender%&user=\%Login%&password=\%Password%&api_id=\%ApiID%&to=\%Tel%&text=\%Message%
                Search ID:
                PrintMsg message sent
                Else
                ErrorMsg 1 error sending message
                GO
                Just to clarify, you do not need to enter your information into this script. It is passed by command line by smssend.

                Comment

                • leon1977
                  Junior Member
                  • Aug 2007
                  • 2

                  #9
                  The best is to use a GSM modem, connecting a phone is not a good idea because the battery needs to be recharged all the time.

                  For a list of supported GSM modems look here:



                  Leon

                  Comment

                  Working...