Ad Widget

Collapse

Need Help monitoring a web device

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Harris
    Junior Member
    • Jan 2007
    • 24

    #1

    Need Help monitoring a web device

    Hello,

    I'm trying to figure out wich would be the best way of monitoring an Websensor EM01B.

    This is a very simple device that only answer to ping and to http requests (where you can get the information about the sensors).

    Here's an example:



    Outputs:
    rM701668TC: 21.7HU:35.2%IL: 32.4
    (temperature, humidity and illumination)


    This is what i where planing:

    On zabbix server machine, i would create a shell script running on cron
    with the follow content:

    Code:
    #!/bin/bash
    SENDER="/usr/local/sbin/zabbix_sender -z 127.0.0.1 -p 10051"
    
    wget http://xxx.xxx.xxx.xxx/index.html?em --output-document=websensor.tmp -q
    
    TC=`cat websensor.tmp |grep body |cut -f 2 -d : |cut -f 1 -d H`
    HU=`cat websensor.tmp |grep body |cut -f 3 -d : |cut -f 1 -d %`
    IL=`cat websensor.tmp |grep body |cut -f 4 -d : |cut -f 2 -d ' '`
    
    # Only for debug purposes
    echo $TC
    echo $HU
    echo $IL
    
    $SENDER -k ?????? -o $TC
    $SENDER -k ?????? -o $HU
    $SENDER -k ?????? -o $IL

    Now i'm facing 2 problems:
    1) no idea of what to insert on the -k option
    2) no idea of how to create the items for this host on zabbix

    Btw, is this the correct way of monitoring this kind of device?

    Thanks in advance
  • Niels
    Senior Member
    • May 2007
    • 239

    #2
    1) -k is for the item's key.
    2) Make an item with type Zabbix trapper.

    Try the sender command manually, and you'll see if it fails.

    I think this method is fine.

    Comment

    • Harris
      Junior Member
      • Jan 2007
      • 24

      #3
      Originally posted by Niels
      1) -k is for the item's key.
      2) Make an item with type Zabbix trapper.

      Try the sender command manually, and you'll see if it fails.

      I think this method is fine.
      Ok, but this is my main question, when i'm creating an item of type zabbix trapper, it asks for the key, the pre-built ones are for zabbix agent, internal, aggregated or simple check, i believe that none of those satisfy what i need, so i think that i need to insert a custom value there, but i dont know what i have to insert.

      Thanks!

      Comment

      • Niels
        Senior Member
        • May 2007
        • 239

        #4
        You can use whatever you like. It just has to be unique.

        Comment

        • Harris
          Junior Member
          • Jan 2007
          • 24

          #5
          Thanks Niels, it worked very well!

          Comment

          Working...