Ad Widget

Collapse

Room temperature monitoring with Sensormetrix device

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Michael0
    Member
    • Jan 2013
    • 70

    #1

    Room temperature monitoring with Sensormetrix device

    Hi!

    I´m trying to get my sensormetrix EM01b-STN working with zabbix to monitor the server room temperature via snmp.
    I´m able to reach the device from the zabbix server, the monitoring device gives the following entries back:

    bN028095TC: 23.1HU:34.6%IL: 1.9

    TC: temperature
    HU: humidity
    IL: light

    I just need a check if the temp, is higher than XX celsius

    Which item key and SNMP OID I have to use for this?

    Thanks for input!
  • Colttt
    Senior Member
    Zabbix Certified Specialist
    • Mar 2009
    • 878

    #2
    soory i dont know.. but try this:

    Code:
    snmpwalk -v2c -c public IP
    Debian-User

    Sorry for my bad english

    Comment

    • Michael0
      Member
      • Jan 2013
      • 70

      #3
      Thanks for your tipp!

      But I only get a timeout back...

      On the manufacturer site I found good how to´s for Nagios&Cacti:



      When I access it via HTTP I get this infos back:

      hN028095TC: 23.2HU:34.6%IL: 6.9

      So maybe I could just read the output for TC: xxx celcius and set a trigger for it >30° ...?

      Comment

      • Michael0
        Member
        • Jan 2013
        • 70

        #4
        ok, looks like the temp. device is not really good to answer via snmp...

        How could I just setup a http webcheck to grep for the temperature which the device gives me back:

        hN028095TC: 23.2HU:34.6%IL: 6.9

        I just want to get an alert when "TC: xx.x" is >30°C

        Could I just setup an item which grep´s for it?

        Comment

        • Colttt
          Senior Member
          Zabbix Certified Specialist
          • Mar 2009
          • 878

          #5
          you can try this as a userparameter:

          wget -q -O - http://YOU-IP/ | grep -A TEMPERATUR| cut -d : -f2 |cut -b 2-5
          Debian-User

          Sorry for my bad english

          Comment

          • Michael0
            Member
            • Jan 2013
            • 70

            #6
            Thanks for you hint!

            I have created an external script for this with the curl command:

            curl -s IP_ADDRESS | grep TC* | cut -c 27-30

            output: 23.1

            The check would perfectly work now, but the problem is that the temperature device does not always returns a value back....

            When I manually run the script on the zabbix server I get 7 from 10 values back from the temperature device
            So, the item with this external script, became always "unsupported" when no value returns :/

            Is there any chance to do a work around for this?

            Comment

            • Colttt
              Senior Member
              Zabbix Certified Specialist
              • Mar 2009
              • 878

              #7
              hmmm i think you must check why you get not a response..

              otherwise you can use somthing like this:
              Code:
              curl -s IP_ADDRESS | grep TC* | cut -c 27-30 || echo "fake_TEMP"
              Debian-User

              Sorry for my bad english

              Comment

              • Heilig
                Senior Member
                Zabbix Certified Trainer
                Zabbix Certified SpecialistZabbix Certified Professional
                • Mar 2013
                • 366

                #8
                How long does it take to get results (execute "time script_name")?
                If your script takes more than 3 seconds to finish, try to increase the timeout parameter in zabbix_server.conf (default value is 3 seconds) or use zabbix_sender (script works, gathers the data and pushes it to Zabbix using the zabbix_sender).

                Comment

                • Michael0
                  Member
                  • Jan 2013
                  • 70

                  #9
                  the script response is fast maybe 0.5 sec until the value is displayed...

                  How can I combine the script to give me back the value (which works already) and if no value returns then use just the "fake" temp, I´m really new to scripting :/

                  currently its working, because I adjusted the "check the not supported items" value in the zabbix admin GUI to 9mins.
                  So if the item became "not supported" status, zabbix will automatically enable it after 9mins again.
                  But thats a really dirty solution for me

                  Comment

                  • Colttt
                    Senior Member
                    Zabbix Certified Specialist
                    • Mar 2009
                    • 878

                    #10
                    How can I combine the script to give me back the value (which works already) and if no value returns then use just the "fake" temp, I´m really new to scripting :/

                    Originally posted by Colttt
                    hmmm i think you must check why you get not a response..

                    otherwise you can use somthing like this:
                    Code:
                    curl -s IP_ADDRESS | grep TC* | cut -c 27-30 || echo "fake_TEMP"
                    i think this work
                    Debian-User

                    Sorry for my bad english

                    Comment

                    • Michael0
                      Member
                      • Jan 2013
                      • 70

                      #11
                      ok just to be sure...

                      Code:
                      curl -s IP_ADDRESS | grep TC* | cut -c 27-30 || echo "fake_TEMP"

                      I have tried this and when I execute the script several times until I get no value back, what should I get back? the "fake_temp"?

                      Because I get no value back also not the "fake_temp" when I dont get the real temp. back either

                      Comment

                      • c.mammoli
                        Member
                        Zabbix Certified Specialist
                        • Feb 2012
                        • 48

                        #12
                        Not to be harsh but the only task a temperature sensor should do is "report the temperature". And this device not only doesn't support SNMP, but it even fails 30% of http gets?
                        I would return it.

                        Comment

                        • Michael0
                          Member
                          • Jan 2013
                          • 70

                          #13
                          Yes, you are 100% right!

                          I´m also not very happy with this "flapping" device.

                          So we decided to replace it against some other device from e.g. watchdog, which is also communicating via snmp

                          Comment

                          • Colttt
                            Senior Member
                            Zabbix Certified Specialist
                            • Mar 2009
                            • 878

                            #14
                            you can use this one:


                            or this one (for laboratorys and data center)
                            Debian-User

                            Sorry for my bad english

                            Comment

                            Working...