Ad Widget

Collapse

sensor[temp2] isn't supported

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • just2blue4u
    Senior Member
    • Apr 2006
    • 347

    #1

    sensor[temp2] isn't supported

    Hi there,

    it's me again!
    I am monitoring a fedora core 3 server with Zabbix V1.1beta8.

    It has lm_sensors installed and configured.

    sensor[temp1], sensor[temp2], sensor[temp3] aren't supported.
    My UserParameter
    UserParameter=sensor.temp1,sensors | grep CPU: | cut -c12-16
    works fine.

    Is there an explaination for this behaviour?
    Big ZABBIX is watching you!
    (... and my 48 hosts, 4513 items, 1280 triggers via zabbix v1.6 on CentOS 5.0)
  • xaitax
    Member
    • Apr 2006
    • 39

    #2
    Hi,

    if u name the trigger `sensor[temp1]' it must be same in config.

    Code:
    UserParameter=sensor[temp1],sensors | grep CPU: | cut -c12-16
    Or otherway:
    Trigger: sensor.temp1
    Code:
    UserParameter=sensor.temp1,sensors | grep CPU: | cut -c12-16


    - xai

    Comment

    • just2blue4u
      Senior Member
      • Apr 2006
      • 347

      #3
      sensor[temp1] is an item which i found in standard template "host.unix". It is supported by the agentd, i think.

      sensor.temp1 is my personal UserParameter, that i defined in agentd.conf. It's a workaround for me, until i get sensor[temp1] to work.


      Question: is net-snmp required for sensor[temp1] ? Because that's not installed...


      thx,
      J2B4U
      Big ZABBIX is watching you!
      (... and my 48 hosts, 4513 items, 1280 triggers via zabbix v1.6 on CentOS 5.0)

      Comment

      • paultorben
        Junior Member
        • Apr 2007
        • 10

        #4
        Hello,

        I was having the same issue monitoring temperature on my Gentoo box. I've installed lm_sensors and it was returning data but i couldn't see anything coming into the Zabbix Server for monitoring sensor[temp1]

        So, I tried your method, and I was getting a result from

        # zabbix_get -s 192.168.100.34 -k 'sensor.temp1'
        +46



        But still nothing came up in the server - then I remembered reading somewhere that spaces in the result would cause issues - so I made your check into :

        UserParameter=sensor.temp1,sensors | grep "M/B" | cut -c14-16
        UserParameter=sensor.temp2,sensors | grep CPU | cut -c14-16

        Which returned the "plus" sign as well. I checked the Zabbix server log and saw this in it:


        013917:20070416:114627 Type of received value [+46] is not sutable for [[email protected]] having type [0]
        013917:20070416:114627 Returning NOTSUPPORTED
        013917:20070416:114627 Type of received value [+31] is not sutable for [[email protected]] having type [0]
        013917:20070416:114627 Returning NOTSUPPORTED


        So, I figured time to get rid of the plus sign.

        UserParameter=sensor.temp1,sensors | grep "M/B" | cut -c15-16
        UserParameter=sensor.temp2,sensors | grep CPU | cut -c15-16


        And finally - temperature results !

        Hope this helps someone. Also, would be nice for someone at Zabbix to put together a guide on how to get temperature working out of the box - seems like lots of folks have trouble getting this going.

        Comment

        • street_style
          Junior Member
          • Feb 2007
          • 3

          #5
          Hello! I'm using Debian lenny/sid with zabbix agent 1.1.7 and latest server. But still have problems and I can't view information about temperature of M/B and CPU of machines. They are also on Debian lenny/sid. I've done all posted above but the server doesn't receive data. Sensors are working fine. Any ideas?

          Comment

          • paultorben
            Junior Member
            • Apr 2007
            • 10

            #6
            What result did you get from this - this is the easiest way to test any sensor to ses if its returning a good result:

            # zabbix_get -s 192.168.100.34 -k 'sensor.temp1'

            change the IP to the IP of the comp you want temperature data from, and 'sensor.temp1' to the full and complete name of your temperature sensor. Run this command on the main Zabbix Server ...


            Generally - when posting to a forum asking for help - provide as much detail as you can, and as much information as you can - like your 'UserParameter', the results from the 'sensor' command, etc. Help us help you.

            Comment

            • street_style
              Junior Member
              • Feb 2007
              • 3

              #7
              Hello paultorben,
              Result of zabbix_get -s 192.168.100.34 -k 'sensor.temp1' is ZBX_NOTSUPPORTED. I've changed IP and sensor.temp1 to sensor[temp1] as it is at server. When I type sensor at bash there seems to be all needed information. CPU and M/B temperature are correct. I think I'm missing something at correct form of user parameter. Thank you in advanced.

              Comment

              • paultorben
                Junior Member
                • Apr 2007
                • 10

                #8
                Hi - not sure if you fixed this but the userparameter being wrong is only one option ...

                Make sure that zabbix is using the right config file and that the userparameter name (sensor.temp1) matches on both client and server

                maybe post the results from "sensor" and from running the userparameter command on the client's command line.

                also, permissions for the "sensor" command could be an issue - can you run the "sensor" command as the zabbix user (assuming you use one)?

                Comment

                • RNHurt
                  Junior Member
                  • Dec 2007
                  • 7

                  #9
                  Sensors not working on Linux 2.6.x

                  I have two updates on this problem. The first is another post in the Zabbix forums talking about the changes in the Linux kernel from 2.4 to 2.6. Basically it looks like the Zabbix sensors code is pointing at the wrong place on the filesystem to read the sensor data.

                  Also, I wanted to put in my $.02 on the workaround for this problem. My sensors command returns the temp but with extra information wrapped around the number. For example:

                  Code:
                  temp1:       +34°C  (high =   +79°C, hyst =   +61°C)   sensor = thermistor           
                  temp2:     +24.0°C  (high =   +50°C, hyst =   +45°C)   sensor = diode           
                  temp3:     +37.5°C  (high =   +50°C, hyst =   +45°C)   sensor = thermistor           (beep)
                  Notice that temp3 is "+37.5°C" and not just 37.5. Zabbix doesn't like the extra info (+ sign) so I cleaned it up with awk. Here is my UserParameter for these three readings:

                  Code:
                  UserParameter=sensor.temp1,sensors | grep "temp1" | awk '{ print $2+0 }'
                  UserParameter=sensor.temp2,sensors | grep "temp2" | awk '{ print $2+0 }' 
                  UserParameter=sensor.temp3,sensors | grep "temp3" | awk '{ print $2+0 }'
                  This command is similar to the ones above but uses awk instead of cut. I don't know if it's the best way to do it but it seems to work.

                  Later...
                  Richard

                  Comment

                  • RNHurt
                    Junior Member
                    • Dec 2007
                    • 7

                    #10
                    P.S. I've opened a ticket for this problem (ZBX-282) so hopefully we'll have a resolution at some point.

                    Comment

                    • ufocek
                      Senior Member
                      • Aug 2006
                      • 161

                      #11
                      Hi

                      I using zabbix 1.4.4 and on ubuntu server 7.10. I put this to zabbix_agentd.conf

                      UserParameter=sensor.temp1,sensors | grep "M/B" | awk '{ print $3+0 }'
                      UserParametr=sensor.tempcpu,sensors | grep "CPU Temp:" | awk '{ print $3+0 }'
                      UserParametr=sensor.temp3,sensors | grep "temp3:" | awk '{ print $2+0 }'

                      Works only the first UserParametr sensor.temp1 but second and third it's not supported. Why? zabbix user can run shell command sensor.

                      Any ideas?

                      Albert

                      Comment

                      • RNHurt
                        Junior Member
                        • Dec 2007
                        • 7

                        #12
                        Originally posted by ufocek
                        UserParameter=sensor.temp1,sensors | grep "M/B" | awk '{ print $3+0 }'
                        UserParametr=sensor.tempcpu,sensors | grep "CPU Temp:" | awk '{ print $3+0 }'
                        UserParametr=sensor.temp3,sensors | grep "temp3:" | awk '{ print $2+0 }'
                        Albert,

                        What is the output of the raw sensors command?
                        If I had to guess I would say that grep might be choking on the : or there is something wrong with the input. Post your full sensors output and I'll take a look.

                        Later...
                        Richard

                        Comment

                        • ufocek
                          Senior Member
                          • Aug 2006
                          • 161

                          #13
                          Hi
                          I now what's wrong you see below I wrong write:


                          UserParametr=sensor.tempcpu,sensors | grep "CPU Temp:" | awk '{ print $3+0 }'

                          UserParametr=sensor.temp3,sensors | grep "temp3:" | awk '{ print $2+0 }'

                          but must be not UserParametr only UserParameter

                          Now it's working everytjing

                          Albert

                          Comment

                          • RNHurt
                            Junior Member
                            • Dec 2007
                            • 7

                            #14
                            Aww man, I should have seen that!

                            Glad you got it fixed. Now if we can just get native support working so we don't have to rely on this workaround.

                            Later...
                            Richard

                            Comment

                            Working...