PDA

View Full Version : lm_sensors not working with Zabbix in kernel 2.6


cybermage
20-11-2005, 16:52
because /proc/sys/dev/sensors are no more in 2.6 kernel

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

new path is /sys/bus/i2c

Just FYI

surftimer
26-02-2009, 15:12
is there any solution or workaround ?

thank your

richlv
28-02-2009, 00:51
a bit crude workaround would be userparameter parsing 'sensors' output

rgg
22-11-2009, 05:03
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:

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


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:

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)