Ad Widget

Collapse

Zabbix 1.1 SMS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • johanpre44
    Member
    • Apr 2006
    • 40

    #1

    Zabbix 1.1 SMS

    I got Zabbix V1.1 to send an SMS with the builtin script. When I look at the History Actions screen it says "Read something unexpected from GSM modem", but the SMS is actually delivered.

    I'm using a Teltonika TModemCOM (it uses a Nokia engine and uses a serial connection).

    How can I fix this?

    PS: For those who are struggling getting the SMS to work remember that "Error open(/dev/ttySx) [Success]" probably means that you need to change the permissions so that zabbix can use the serial port --> "chown zabbix.zabbix /dev/ttySx"
  • johanpre44
    Member
    • Apr 2006
    • 40

    #2
    The SMS is actually sent twice when zabbix reports "Read something unexpected from GSM modem"

    Comment

    • maxlock
      Member
      • Mar 2005
      • 32

      #3
      Yep, having the same issue here, I have a Telular SX4e gsm gateway. I can send SMS's successfully using the following AT commands (number obscured)

      I get a "+CMGS: 17" response which seems ok, the code in src/libs/zbxsms/sms.c looks fine?!

      AT
      OK
      AT+CMGF=1
      OK
      AT+CMGS="xxxyyyzzzz"
      > testing123
      >
      +CMGS: 17
      AT
      OK

      Comment

      • maxlock
        Member
        • Mar 2005
        • 32

        #4
        just to note, many gsm modems don't automatically have the sms service centre number set, and sending an SMS will fail with a '500' error. it would be wise to check this is set when trying to send an SMS with the AT+CSCA? command, and maybe having the sms service centre number as part of the SMS setup?

        so I'll display mine, then unset it, and try and send an SMS

        AT
        OK
        AT+CSCA?
        +CSCA: "+6421600600",145

        OK
        AT+CSCA=""
        OK
        AT+CSCA?
        +CSCA: "",129

        OK
        AT+CMGF=1
        OK
        AT+CMGS="xxxyyyzzzz"
        > this should fail
        >
        +CMS ERROR: 500

        Comment

        • johanpre44
          Member
          • Apr 2006
          • 40

          #5
          Originally posted by maxlock
          Yep, having the same issue here, I have a Telular SX4e gsm gateway. I can send SMS's successfully using the following AT commands (number obscured)

          I get a "+CMGS: 17" response which seems ok, the code in src/libs/zbxsms/sms.c looks fine?!

          AT
          OK
          AT+CMGF=1
          OK
          AT+CMGS="xxxyyyzzzz"
          > testing123
          >
          +CMGS: 17
          AT
          OK
          I'm using minicom to do the commands, but when I get the typing the actual message I do not know how to get it to actually send.

          Comment

          • Alexei
            Founder, CEO
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2004
            • 5654

            #6
            Originally posted by johanpre44
            I'm using minicom to do the commands, but when I get the typing the actual message I do not know how to get it to actually send.
            Ctrl+Z after the message?
            Alexei Vladishev
            Creator of Zabbix, Product manager
            New York | Tokyo | Riga
            My Twitter

            Comment

            • johanpre44
              Member
              • Apr 2006
              • 40

              #7
              OK, so I got minicom to do whatever, but it doesn't even send an SMS now. Can this possibly be an issue with minicom. is there any other application that I can use, or maybe do it directly to the com port

              Comment

              • Alexei
                Founder, CEO
                Zabbix Certified Trainer
                Zabbix Certified SpecialistZabbix Certified Professional
                • Sep 2004
                • 5654

                #8
                I used minicom for debugging and manual sending of SMS without any issues.
                Alexei Vladishev
                Creator of Zabbix, Product manager
                New York | Tokyo | Riga
                My Twitter

                Comment

                • johanpre44
                  Member
                  • Apr 2006
                  • 40

                  #9
                  OK, I can send a test message with the AT commands, but is simply give the following output:

                  AT+CMGF=1
                  OK
                  AT+CMGS="0831234567"
                  > testing
                  >
                  OK
                  AT
                  OK

                  Is minicom supposed to return the "+CMGS: " that the sms.c program expects?

                  Comment

                  • johanpre44
                    Member
                    • Apr 2006
                    • 40

                    #10
                    Can I possibly change the sms.c program not to expect the "+CMGS: 17" but simply to expect an "OK"?

                    How can I then recompile only this program?

                    Comment

                    • dadyo
                      Junior Member
                      • Sep 2006
                      • 1

                      #11
                      Things I did to get my old 6210 with a serial DLR-3 cable on comport 1 work with Zabbix after puzzling together the bits from this topic. It might help someone saying YES!, IT WORKS.

                      First of all I did a reboot with no mouse attached previously to com port 1. (ttyS0). I don't know if it makes a difference, but it didn't work before and was my first guess of errorcause. The nokia 6210 was on and plugged in teh serial port at boot time.

                      I did need to change the permissions, but didn't have a group zabbix, so "chown zabbix /dev/ttySx" was enough.

                      The hint that the sms service center was not there was another good one. I needed to start minicom and if you get an OK after you type
                      AT
                      then you can talk with the phone. At first that didn't work but after the previously mentioned reboot it did.
                      Then I did type
                      AT+CSCA?
                      and got the empty responce
                      +CSCA: "",129
                      But hey, sending an SMS directly from the phone works...
                      So I typed
                      AT+CSCA: "+31653131314"
                      This number is the same as what already was in the phone. (use your own! This one probably only works for KPN in the Netherlands).
                      Now the important thing is to leave minicom or your terminal programm without resetting the phone. Resseting the phone resets the servicecentre number to nothing.

                      Finaly make sure you have made an SMS media entry in Zabbix and have a SMS media item connected to a user.

                      The only thing is that Zabbix is still telling me "Read something unexpected from GSM modem". But it has send the message one at a time. (And at the moment it worked it did send the old messages witch at first did not work again... There goes the SMS money...)
                      Edit: It actualy sends an sms 3 times(!) when trigger goes on or off. If I discover why I will post my findings here. I did not update Zabbix to a new version yet, but found nothing relating to this in the list of changes.

                      Thanks y'all for hinting me to the solution!

                      Somethings left to wish:
                      -Getting rid of the error-message.
                      -Only sending sms when trigger goes to on-state. Not when it goes to off-state.
                      Last edited by dadyo; 14-09-2006, 22:33. Reason: Addition (in Italics)

                      Comment

                      • Umair
                        Member
                        • Feb 2007
                        • 86

                        #12
                        Hello,

                        Now, i am also having the same problem.
                        1). The error message
                        2). The sending of sms 3 times.

                        Were you able to solve this problem.
                        I would be glad if you could help me out.

                        Comment

                        • Alexei
                          Founder, CEO
                          Zabbix Certified Trainer
                          Zabbix Certified SpecialistZabbix Certified Professional
                          • Sep 2004
                          • 5654

                          #13
                          What version of ZABBIX you're running?
                          Alexei Vladishev
                          Creator of Zabbix, Product manager
                          New York | Tokyo | Riga
                          My Twitter

                          Comment

                          • Umair
                            Member
                            • Feb 2007
                            • 86

                            #14
                            I just upgraded from 1.4 to 1.4.1
                            and still having the same problem.

                            This is the output from the log file :


                            6673:20070712:100222 Returning NOTSUPPORTED
                            6687:20070712:100239 Write [
                            ]
                            6687:20070712:100320 Write [
                            ]
                            ] 6687:20070712:100330 Write [AT
                            ] 6687:20070712:100330 Write [AT+CMGF=1
                            6687:20070712:100330 Write [AT+CMGS="]
                            6687:20070712:100330 Write [0709534907]
                            ] 6687:20070712:100330 Write ["
                            6687:20070712:100340 Write [HOST:NOC_Inkfish
                            MediationOUT
                            TIME:10:02:22
                            Severity:High
                            Cause:NOK! - inkfish_outmediation.jar is not running now. STOPPED]
                            6687:20070712:100340 Write []
                            6687:20070712:100424 Write [
                            ]
                            ] 6687:20070712:100434 Write [AT
                            ] 6687:20070712:100434 Write [AT+CMGF=1
                            6687:20070712:100434 Write [AT+CMGS="]
                            6687:20070712:100434 Write [0709534907]
                            ] 6687:20070712:100434 Write ["
                            6687:20070712:100444 Write [HOST:NOC_Inkfish
                            MediationOUT
                            TIME:10:02:22
                            Severity:High
                            Cause:NOK! - inkfish_outmediation.jar is not running now. STOPPED]
                            6687:20070712:100444 Write []

                            Last edited by Umair; 12-07-2007, 10:14.

                            Comment

                            • Umair
                              Member
                              • Feb 2007
                              • 86

                              #15
                              The problem persists...
                              Last edited by Umair; 17-07-2007, 11:30.

                              Comment

                              Working...