Ad Widget

Collapse

lm_sensors not working with Zabbix in kernel 2.6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cybermage
    Junior Member
    • Oct 2005
    • 12

    #1

    lm_sensors not working with Zabbix in kernel 2.6

    because /proc/sys/dev/sensors are no more in 2.6 kernel

    Based on http://www2.lm-sensors.nu/~lm78/read...gi?ticket=2028

    new path is /sys/bus/i2c

    Just FYI
  • surftimer
    Junior Member
    • Apr 2007
    • 9

    #2
    lm-sensors and Kernel 2.6

    is there any solution or workaround ?

    thank your

    Comment

    • richlv
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Oct 2005
      • 3112

      #3
      a bit crude workaround would be userparameter parsing 'sensors' output
      Zabbix 3.0 Network Monitoring book

      Comment

      • rgg
        Junior Member
        Zabbix Certified Specialist
        • Nov 2009
        • 4

        #4
        Lmsensors and net-snmp

        An elegant solution to monitor lm_sensors with zabbix could be compile net-snmp with lmsensors support.

        Instructions at http://www.net-snmp.org/docs/README.solaris.html

        Lmsensors is under oid 1.3.6.1.4.1.2021.13.16

        Temperatures should be divided by 1000 to be correctly presented in zabbix.

        Table identifiers might be different on your computer. Take a look at mine:
        Code:
        snmptable localhost -c public -v 1 1.3.6.1.4.1.2021.13.16.2
        SNMP table: LM-SENSORS-MIB::lmTempSensorsTable
        
         lmTempSensorsIndex lmTempSensorsDevice lmTempSensorsValue
                          0               temp1              47000
                          1               temp2              40000
                          2               temp3              22000
        snmptable localhost -c public -v 1 1.3.6.1.4.1.2021.13.16.3
        SNMP table: LM-SENSORS-MIB::lmFanSensorsTable
        
         lmFanSensorsIndex lmFanSensorsDevice lmFanSensorsValue
                         0               fan1              2205
                         1               fan2              3901
                         2               fan3                 0
                         3               fan4                 0
        
        snmptable localhost -c public -v 1 1.3.6.1.4.1.2021.13.16.5
        SNMP table: LM-SENSORS-MIB::lmMiscSensorsTable
        
         lmMiscSensorsIndex lmMiscSensorsDevice lmMiscSensorsValue
                          0                 in0               1280
                          1                 in1               3295
                          2                 in2                  0
                          3                 in3               2959
                          4                 in4               2975
                          5                 in5                  0
                          6                 in6               1072
                          7                 in7               2927
                          8                 in8               3232
                          9                 vid               2049
                         10              alarms            9216000
                         11              Core 0              47000
                         12              Core 1              73000
                         13              Core 2              51000
                         14              Core 3              73000
        Another crude workaround could be extending zabbix agent like this

        Code:
        UserParameter=sensors[*],sensors | grep "$1" | head -$2 | tail -1 | awk '{print $"$3"}' | sed 's/[-!@#\$%^&*()°+a-zA-Z]//g'
        Example of usage
        sensors[fan2,1,2] – Would get the value in the first ocurrance of string fan2, with the value in the second column.

        sensors[Core,4,3] – Would get the value in the fourth ocurrance of string "Core", with the value in the third column. Another way to get the same data could be
        sensors[“Core 3”,1,3] – Would get the value in the first ocurrance of string "Core 3", with the value in the third column.

        sensors[String that identify the sensor, Nth ocurrance of the string that identify the sensor, Column]

        Obs: Columns are separated by one or more spaces.

        Sensors command output for this example:
        Code:
        it8718-isa-0290
        Adapter: ISA adapter
        in0:       +1.28 V  (min =  +0.00 V, max =  +4.08 V)
        in1:       +3.30 V  (min =  +0.00 V, max =  +4.08 V)
        in2:       +0.00 V  (min =  +0.00 V, max =  +4.08 V)   ALARM
        in3:       +2.96 V  (min =  +0.00 V, max =  +4.08 V)
        in4:       +2.98 V  (min =  +0.00 V, max =  +4.08 V)
        in5:       +0.00 V  (min =  +0.00 V, max =  +4.08 V)   ALARM
        in6:       +1.09 V  (min =  +0.00 V, max =  +4.08 V)
        in7:       +2.93 V  (min =  +0.00 V, max =  +4.08 V)
        in8:       +3.23 V
        fan1:     2265 RPM  (min =    0 RPM)
        fan2:     3879 RPM  (min =    0 RPM)
        fan3:        0 RPM  (min =    0 RPM)
        fan4:        0 RPM  (min =   -1 RPM)
        temp1:       +47 C  (low  =    -1 C, high =  +127 C)   sensor = diode
        temp2:       +40 C  (low  =    -1 C, high =  +127 C)   sensor = invalid
        temp3:       +22 C  (low  =    -1 C, high =  +127 C)   sensor = invalid
        vid:      +2.050 V
        
        coretemp-isa-0000
        Adapter: ISA adapter
        Core 0:      +47 C  (high =  +100 C)
        
        coretemp-isa-0001
        Adapter: ISA adapter
        Core 1:      +74 C  (high =  +100 C)
        
        coretemp-isa-0002
        Adapter: ISA adapter
        Core 2:      +53 C  (high =  +100 C)
        
        coretemp-isa-0003
        Adapter: ISA adapter
        Core 3:      +74 C  (high =  +100 C)
        Last edited by rgg; 24-02-2010, 22:27.

        Comment

        Working...