Ad Widget

Collapse

Hardware Zabbix Agent with GSM module

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rbenea
    Member
    • Apr 2008
    • 35

    #1

    Hardware Zabbix Agent with GSM module

    Hi all,

    Everything started this Hardware Agent series with a modified board where we implemented the Zabbix protocol, then we created a special module for it and now I'm glad to announce that we put a GMS module on it too.



    The idea is simple, we have the same agent (2 ADC ports and 1 Digital port) but we can send SMS alerts too.

    I created a script: senssms.sh in /home/zabbix/bin folder:

    Code:
    #!/bin/bash
    
    wget -T 60 -t 3 -a /tmp/zabbix_smslog.txt -O - "http://10.57.96.58/sendsms.php?n=$1&m=$2&" >> /tmp/zabbix_smslog.txt
    echo "======================================" >> /tmp/zabbix_script_log.txt
    and also added the configuration in Administration->Media.

    As you can see we try 3 times waiting 60 seconds for the SMS to be sent. Also everything is logged on /tmp/zabbix_smslog.txt

    For each user we added a media entry (Type: sendsms.sh, SendTo: phone_number) and it works! You can receive the Alerts on your mobile phone.

    As you can see the SMS are sent via HTTP but you can also send them via SNMP or Telnet. You can find more info about this on Florin's blog http://www.microelemente.ro/2008/11/...smgprs-module/

    Rares
    Last edited by rbenea; 19-02-2009, 13:02.
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    I've managed to test one of these devices in the US and I can confirm it does work with the carrier T-Mobile. The unit is only tri-band so it may not work in every location within the US.

    The method I used for sending the data was not through the web but rather via SNMP. The device, like the other Zabbix Agent is able to speak SNMP. With this one there are a few variables which are read/write. You write the destination phone number in one variable, the message in another and "1" to the status variable to send.

    Overall the can send text messages prett quickly. There is one configuration "gotcha" with regards to US carriers. When you are putting in a number for the unit to send status messages to you must prepend a "1." The 10 digit number will not work.

    Overall a pretty neat little device, I hope to get an AT&T SIM and test it with that soon.
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    Working...