Ad Widget

Collapse

Zabbix Remote Commands + SMS send

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pengu1n
    Junior Member
    • Jun 2011
    • 8

    #1

    Zabbix Remote Commands + SMS send

    Hello, all

    Here is a deal - I have a Zabbix server, Python installed and GSM modem - IRZ MC55iT connected via /dev/ttyS0 to my server. On Python I've wrote a script to generate SMS message and to deliver it to predefined address. So the thing is - can Zabbix run this script via Remote commands (on Zabbix server itself) and what do I need for it?

    As I understand, I will need zabbix agent installed (or not?), and sudo + write permissions on /dev/ttyS0, python script?

    Thx in advance.
  • HullZabbix
    Senior Member
    • Feb 2011
    • 104

    #2
    I have Zabbix installed on CentOS, which has a USB GSM modem installed under /dev/ttyUSB0

    We have a bash script which takes in the parameters from zabbix when an alert needs to be sent.

    In zabbix itself, we have a media type defined as follows:

    Description: smssend
    Type: script
    Script Name: smssendscript.sh

    The bash script is located in /etc/zabbix/alertscripts/
    This location is defined in your zabbix server conf.

    Hope this helps.

    Comment

    • pengu1n
      Junior Member
      • Jun 2011
      • 8

      #3
      It is simple

      Hello,

      Well, my bad. Zabbix can work with few GSM modems, plus IRZ MC55iT, which I have. So this info can be add to the Zabbix manual.

      All you need to do is:
      • Create necessary Media type -> SMS, name it and specify right device. In my case /dev/ttyS0
      • Add this media to necessary users with phone numbers - in my case starting with 8 + %PhoneNumber%
      • Give write access to necessary device for user, from which Zabbix is started. In my case - user: zabbix, console command:


      Code:
      #>chown zabbix /dev/ttyS0
      #>chmod 0600 /dev/ttyS0
      So, that's all. After this Zabbix can send SMS successfully to the mentioned users, when necessary trigger will start a specified action.

      Comment

      • HullZabbix
        Senior Member
        • Feb 2011
        • 104

        #4
        That's good news. Our modem works like that but for some reason sends 3 x sms messages, so unfortunately we needed to go the external script route.

        Comment

        Working...