ucd/net-SNMP lmSensors -- update November 11, 2010

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
orion
Posts: 7
Joined: Fri Jan 04, 2008 11:15 am

Post by orion »

Sounds like your missing LM_sensors support in snmp
what Linux distra are you using?
mhoogenbosch
Posts: 4
Joined: Thu Jan 17, 2008 8:21 am

Post by mhoogenbosch »

i'm getting my tems in the misc section of snmp, is there a way to read these values in cacti?

can this be done by a simple adjustment to the php script, or can i make snmp to reportback with the correct names?

Probaly the reason for my temps showing up in misc is the kernel patch i have to apply for my temps to show
orion
Posts: 7
Joined: Fri Jan 04, 2008 11:15 am

Post by orion »

I think all you need to do is relabel the temps correctly and then it should pick them up. I believe they have to be temp1,temp2.. etc

Not sure how to do tat though I think you just need to put them into the conf file /etc/sensors.conf but I could be wrong
mhoogenbosch
Posts: 4
Joined: Thu Jan 17, 2008 8:21 am

Post by mhoogenbosch »

orion wrote:I think all you need to do is relabel the temps correctly and then it should pick them up. I believe they have to be temp1,temp2.. etc

Not sure how to do tat though I think you just need to put them into the conf file /etc/sensors.conf but I could be wrong
that's the weird thing, in sensors.conf the sensors are named correctly :

chip "f71882fg-*"

# Temperature
label temp1 "CPU"
label temp2 "System"
ignore temp3

and if i check phpsysinfo the correct temps are beeing displayd
orion
Posts: 7
Joined: Fri Jan 04, 2008 11:15 am

Post by orion »

Well then thats beyond my knowledge but in saying that if you do find a solution please let me know cause I have the same issue with the voltages on one of my computers
skysurfer
Posts: 15
Joined: Tue Aug 07, 2007 7:26 am

Post by skysurfer »

orion wrote:Sounds like your missing LM_sensors support in snmp
what Linux distra are you using?
I have built net-snmp with lm_sensors support. I 'm using Arch Linux
tiger.tw
Posts: 6
Joined: Mon Jan 21, 2008 8:04 am

lmsensors via smpt and cacti 0.8.7a

Post by tiger.tw »

skysurfer wrote:lm_sensors not working since upgrade to cacti 0.8.7a

need help plz :)
I had some trouble to setup this plugin in cacti 0.8.7a, too.

I tried to get it working with snmp V3. But it looks like there are some changes in version 0.8.7 regarding snmp, so i had to alter some of the plugin scripts. Now they work fine (for me).

Does someone know who is maintaining this project?
Perhaps my changes will be usefull
tiger.tw
Posts: 6
Joined: Mon Jan 21, 2008 8:04 am

lmsensors via smpt and cacti 0.8.7a

Post by tiger.tw »

Find my modified version for cacti 0.8.7a attached to this post.
No guarantee that it is working for everyone. I am using it with snmp V3.

I have not made any changes to the templates.
Only files in "scripts" and "script_queries" directory were altered.

Happy testing...
Attachments
cacti-0.8.7a-netsnmp-lmsensors.zip
(26.41 KiB) Downloaded 1844 times
skysurfer
Posts: 15
Joined: Tue Aug 07, 2007 7:26 am

Post by skysurfer »

No luck here :(
tiger.tw
Posts: 6
Joined: Mon Jan 21, 2008 8:04 am

Post by tiger.tw »

skysurfer wrote:No luck here :(
I had compiled net-snmp-5.2.4 (got other problems with newer versions, so i used the older one) myself on SuSE Linux 9.3, SuSe Linux 10.0 and Debian Etch with the following compile-string.

Code: Select all

./configure  '--prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--with-sys-contact=root@localhost' '--with-mib-modules=host ucd-snmp/pass_persist misc/ipfwacc smux ucd-snmp/diskio tunnel disman/event-mib ucd-snmp/lmSensors' '--with-persistent-directory=/var/lib/net-snmp' '--with-libwrap=/usr' '--with-libs=-lsensors' '--sysconfdir=/etc'
 
Using lmsensors 2.9.1 on SuSE and lmsensors 2.10.1 on Debian

Cannot say more on this.

Does this patch work for other downloaders?
mhoogenbosch
Posts: 4
Joined: Thu Jan 17, 2008 8:21 am

Post by mhoogenbosch »

orion wrote:Well then thats beyond my knowledge but in saying that if you do find a solution please let me know cause I have the same issue with the voltages on one of my computers
well, it actually was quite simple. Once i've changed snmp query in netsnmp_lmsensors.php it just worked.

This can be done with the fans aswell, in my case they're in the misc categroy aswell.
skysurfer
Posts: 15
Joined: Tue Aug 07, 2007 7:26 am

Post by skysurfer »

well... i am stupid! :P

the problem was that lm_sensors 3.x wasn't compatible with my net-snmp version.

a downgrade did the job. everything's fine now

thank u all for the help! :)
cwahlin
Cacti User
Posts: 91
Joined: Fri Oct 10, 2003 7:23 am

Post by cwahlin »

I am getting Success [0 Items, 0 Rows] from the Verbose Query, but when I do an SNMP walk everything is fine:
snmpwalk -v 2c -c *** *.*.*.* sensors
LM-SENSORS-MIB::lmTempSensorsIndex.1 = INTEGER: 0
LM-SENSORS-MIB::lmTempSensorsIndex.2 = INTEGER: 1
LM-SENSORS-MIB::lmTempSensorsIndex.3 = INTEGER: 2
LM-SENSORS-MIB::lmTempSensorsDevice.1 = STRING: Chip Temp
LM-SENSORS-MIB::lmTempSensorsDevice.2 = STRING: CPU Temp
LM-SENSORS-MIB::lmTempSensorsDevice.3 = STRING: Sys Temp
LM-SENSORS-MIB::lmTempSensorsValue.1 = Gauge32: 53000
LM-SENSORS-MIB::lmTempSensorsValue.2 = Gauge32: 86000
LM-SENSORS-MIB::lmTempSensorsValue.3 = Gauge32: 52000
LM-SENSORS-MIB::lmVoltSensorsIndex.1 = INTEGER: 0
LM-SENSORS-MIB::lmVoltSensorsIndex.2 = INTEGER: 1
LM-SENSORS-MIB::lmVoltSensorsIndex.3 = INTEGER: 2
LM-SENSORS-MIB::lmVoltSensorsIndex.4 = INTEGER: 3
LM-SENSORS-MIB::lmVoltSensorsIndex.5 = INTEGER: 4
LM-SENSORS-MIB::lmVoltSensorsIndex.6 = INTEGER: 5
LM-SENSORS-MIB::lmVoltSensorsIndex.7 = INTEGER: 6
LM-SENSORS-MIB::lmVoltSensorsDevice.1 = STRING: +2.5V
LM-SENSORS-MIB::lmVoltSensorsDevice.2 = STRING: VCore
LM-SENSORS-MIB::lmVoltSensorsDevice.3 = STRING: +3.3V
LM-SENSORS-MIB::lmVoltSensorsDevice.4 = STRING: +5V
LM-SENSORS-MIB::lmVoltSensorsDevice.5 = STRING: VCC
LM-SENSORS-MIB::lmVoltSensorsDevice.6 = STRING: +1.5V
LM-SENSORS-MIB::lmVoltSensorsDevice.7 = STRING: +1.8V
LM-SENSORS-MIB::lmVoltSensorsValue.1 = Gauge32: 2500
LM-SENSORS-MIB::lmVoltSensorsValue.2 = Gauge32: 1723
LM-SENSORS-MIB::lmVoltSensorsValue.3 = Gauge32: 3334
LM-SENSORS-MIB::lmVoltSensorsValue.4 = Gauge32: 5155
LM-SENSORS-MIB::lmVoltSensorsValue.5 = Gauge32: 3334
LM-SENSORS-MIB::lmVoltSensorsValue.6 = Gauge32: 1516
LM-SENSORS-MIB::lmVoltSensorsValue.7 = Gauge32: 1808
LM-SENSORS-MIB::lmMiscSensorsIndex.1 = INTEGER: 0
LM-SENSORS-MIB::lmMiscSensorsIndex.2 = INTEGER: 1
LM-SENSORS-MIB::lmMiscSensorsDevice.1 = STRING: vid
LM-SENSORS-MIB::lmMiscSensorsDevice.2 = STRING: vrm
LM-SENSORS-MIB::lmMiscSensorsValue.1 = Gauge32: 1750
LM-SENSORS-MIB::lmMiscSensorsValue.2 = Gauge32: 9000
Do I have to change anything in sensors.conf? I checked the file, and it seems like everything is labeled with temp1 etc?

This is from the Verbose Query:
+ Running data query [27].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/html/resource/script_queries/lmsensors_temp.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/html/scripts/netsnmp_lmsensors.php temperature *.*.*.*, ***, 2, , , 161, 500 index'
+ Executing script query '/usr/bin/php -q /var/www/html/scripts/netsnmp_lmsensors.php temperature *.*.*.*, ***, 2, , , 161, 500 query sensorDevice'
+ Executing script query '/usr/bin/php -q /var/www/html/scripts/netsnmp_lmsensors.php temperature *.*.*.*, ***, 2, , , 161, 500 query sensorName'
+ Found data query XML file at '/var/www/html/resource/script_queries/lmsensors_temp.xml'
+ Found data query XML file at '/var/www/html/resource/script_queries/lmsensors_temp.xml'
+ Found data query XML file at '/var/www/html/resource/script_queries/lmsensors_temp.xml'
/Carl
tiger.tw
Posts: 6
Joined: Mon Jan 21, 2008 8:04 am

Post by tiger.tw »

cwahlin wrote:I am getting Success [0 Items, 0 Rows] from the Verbose Query, but when I do an SNMP walk everything is fine:

Do I have to change anything in sensors.conf? I checked the file, and it seems like everything is labeled with temp1 etc?

This is from the Verbose Query:
+ Running data query [27].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/html/resource/script_queries/lmsensors_temp.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/html/scripts/netsnmp_lmsensors.php temperature *.*.*.*, ***, 2, , , 161, 500 index'
+ Executing script query '/usr/bin/php -q /var/www/html/scripts/netsnmp_lmsensors.php temperature *.*.*.*, ***, 2, , , 161, 500 query sensorDevice'
+ Executing script query '/usr/bin/php -q /var/www/html/scripts/netsnmp_lmsensors.php temperature *.*.*.*, ***, 2, , , 161, 500 query sensorName'
+ Found data query XML file at '/var/www/html/resource/script_queries/lmsensors_temp.xml'
+ Found data query XML file at '/var/www/html/resource/script_queries/lmsensors_temp.xml'
+ Found data query XML file at '/var/www/html/resource/script_queries/lmsensors_temp.xml'
/Carl

Some informations about your system like OS and versionnumbers of sensors, snmp, cacti, plugin, etc. could be helpful to help you ;-)
cwahlin
Cacti User
Posts: 91
Joined: Fri Oct 10, 2003 7:23 am

Post by cwahlin »

tiger.tw wrote:
cwahlin wrote:I am getting Success [0 Items, 0 Rows] from the Verbose Query, but when I do an SNMP walk everything is fine:

Do I have to change anything in sensors.conf? I checked the file, and it seems like everything is labeled with temp1 etc?

This is from the Verbose Query:
+ Running data query [27].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/html/resource/script_queries/lmsensors_temp.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/html/scripts/netsnmp_lmsensors.php temperature *.*.*.*, ***, 2, , , 161, 500 index'
+ Executing script query '/usr/bin/php -q /var/www/html/scripts/netsnmp_lmsensors.php temperature *.*.*.*, ***, 2, , , 161, 500 query sensorDevice'
+ Executing script query '/usr/bin/php -q /var/www/html/scripts/netsnmp_lmsensors.php temperature *.*.*.*, ***, 2, , , 161, 500 query sensorName'
+ Found data query XML file at '/var/www/html/resource/script_queries/lmsensors_temp.xml'
+ Found data query XML file at '/var/www/html/resource/script_queries/lmsensors_temp.xml'
+ Found data query XML file at '/var/www/html/resource/script_queries/lmsensors_temp.xml'
/Carl

Some informations about your system like OS and versionnumbers of sensors, snmp, cacti, plugin, etc. could be helpful to help you ;-)
Ah, ok :)

I am running a Fedora 6 machine with a recently upgraded 0.8.7b Cacti.
RRD 1.2.x, net-snmp 5.3.1

I am trying to poll another FC6 box running net-snmp 5.0.1 ans sensors 2.6.3. As I wrote before, the snmp walk works fine, but not the query...

/Carl
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests