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

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

Moderators: Developers, Moderators

Post Reply
john_d13
Posts: 41
Joined: Mon Mar 17, 2008 11:51 pm

Post by john_d13 »

does anyone know how to get this working on local linux host with snmp not enabled ?

I want it to work on my local linux box which is hosting cacti
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Re: FAILED -- no matching sensors were found

Post by ehall »

andyburns wrote:
ehall wrote:NetSNMP maintains four different tables of sensor types. Each row of each table represents a different sensor of that type. The rows within each table are keyed by OID starting at 1, while internal index numbers start at 0.

Can you post the output from your host
Sure, mine seem to base at 1 rather than 0, I get the same result whether I do the snmpwalk locally on the machine with the sensors, or across the network from my cacti machine. Same also true for Fan and Thermal tables

Code: Select all

# snmpwalk -v 2c -c public 192.168.1.232 .1.3.6.1.4.1.2021.13.16.4.1.1
LM-SENSORS-MIB::lmVoltSensorsIndex.1 = INTEGER: 1
LM-SENSORS-MIB::lmVoltSensorsIndex.2 = INTEGER: 2
LM-SENSORS-MIB::lmVoltSensorsIndex.3 = INTEGER: 3
LM-SENSORS-MIB::lmVoltSensorsIndex.4 = INTEGER: 4
LM-SENSORS-MIB::lmVoltSensorsIndex.5 = INTEGER: 5
LM-SENSORS-MIB::lmVoltSensorsIndex.6 = INTEGER: 6
LM-SENSORS-MIB::lmVoltSensorsIndex.7 = INTEGER: 7
LM-SENSORS-MIB::lmVoltSensorsIndex.8 = INTEGER: 8
LM-SENSORS-MIB::lmVoltSensorsIndex.9 = INTEGER: 9
LM-SENSORS-MIB::lmVoltSensorsIndex.17 = INTEGER: 17
I guess I need to figure out what versions of NetSNMP are different and issue another test query to adapt.
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Re: FAILED -- no matching sensors were found

Post by ehall »

andyburns wrote:
ehall wrote:NetSNMP maintains four different tables of sensor types. Each row of each table represents a different sensor of that type. The rows within each table are keyed by OID starting at 1, while internal index numbers start at 0.

Can you post the output from your host
Sure, mine seem to base at 1 rather than 0, I get the same result whether I do the snmpwalk locally on the machine with the sensors, or across the network from my cacti machine. Same also true for Fan and Thermal tables

Code: Select all

# snmpwalk -v 2c -c public 192.168.1.232 .1.3.6.1.4.1.2021.13.16.4.1.1
LM-SENSORS-MIB::lmVoltSensorsIndex.1 = INTEGER: 1
LM-SENSORS-MIB::lmVoltSensorsIndex.2 = INTEGER: 2
LM-SENSORS-MIB::lmVoltSensorsIndex.3 = INTEGER: 3
LM-SENSORS-MIB::lmVoltSensorsIndex.4 = INTEGER: 4
LM-SENSORS-MIB::lmVoltSensorsIndex.5 = INTEGER: 5
LM-SENSORS-MIB::lmVoltSensorsIndex.6 = INTEGER: 6
LM-SENSORS-MIB::lmVoltSensorsIndex.7 = INTEGER: 7
LM-SENSORS-MIB::lmVoltSensorsIndex.8 = INTEGER: 8
LM-SENSORS-MIB::lmVoltSensorsIndex.9 = INTEGER: 9
LM-SENSORS-MIB::lmVoltSensorsIndex.17 = INTEGER: 17
After looking at the code more, the test does not really serve a critical purpose any longer and so the problem code can be removed. I'll post an update in a bit.
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

john_d13 wrote:Im runing on an ubuntu box with latest version of lm sensors.

I get this output

giancarlo@Home-Server-Ubx64:/var/www/scripts$ snmpwalk -v 2c -c public 127.0.0.1 sensors
LM-SENSORS-MIB::lmSensors = No more variables left in this MIB View (It is past the end of the MIB tree)

hoever I do get a response when running sensors:
It does not appear that your copy of NetSNMP has been compiled with support for lmSensors.
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

john_d13 wrote:does anyone know how to get this working on local linux host with snmp not enabled ?

I want it to work on my local linux box which is hosting cacti
sorry the plugin requires snmp
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

skysurfer wrote:I have installed the latest version of the template following the instructions on the first post.

Single graphs are working like a charm :)

The problem is at the 8x templates:

Code: Select all

ERROR: the RRD does not contain an RRA matching the chosen CF
Any solution?

cacti 0.8.7d
Looks like a problem with the LAST consolidation function. I'll try exporting the 8x graph templates to use AVERAGE
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

uploaded a new version that should fix the script and 8x graph errors
skysurfer
Posts: 15
Joined: Tue Aug 07, 2007 7:26 am

Post by skysurfer »

ehall wrote:uploaded a new version that should fix the script and 8x graph errors
With the new version, only the thumbnail is shown correctly. When i click on it to see the graphs theres is nothing there.

Debug message:

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="ovelix.skysurfer.twmn - Voltage Sensors" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Volts" \
--slope-mode \
--font TITLE:9:/usr/share/fonts/TTF/times.ttf \
--font AXIS:7:/usr/share/fonts/TTF/times.ttf \
--font LEGEND:7:/usr/share/fonts/TTF/times.ttf \
--font UNIT:7:/usr/share/fonts/TTF/times.ttf \
DEF:a="/srv/http/cacti/rra/ovelix_skysurfer_twmn_sensorreading_272.rrd":sensorReading:AVERAGE \
DEF:b="/srv/http/cacti/rra/ovelix_skysurfer_twmn_sensorreading_273.rrd":sensorReading:AVERAGE \
DEF:c="/srv/http/cacti/rra/ovelix_skysurfer_twmn_sensorreading_270.rrd":sensorReading:AVERAGE \
DEF:d="/srv/http/cacti/rra/ovelix_skysurfer_twmn_sensorreading_266.rrd":sensorReading:AVERAGE \
DEF:e="/srv/http/cacti/rra/ovelix_skysurfer_twmn_sensorreading_268.rrd":sensorReading:AVERAGE \
DEF:f="/srv/http/cacti/rra/ovelix_skysurfer_twmn_sensorreading_269.rrd":sensorReading:AVERAGE \
DEF:g="/srv/http/cacti/rra/ovelix_skysurfer_twmn_sensorreading_271.rrd":sensorReading:AVERAGE \
DEF:h="/srv/http/cacti/rra/ovelix_skysurfer_twmn_sensorreading_267.rrd":sensorReading:AVERAGE \
LINE1:a#00FF00FF:"+1.5V"  \
GPRINT::LAST:"Current\:%8.2lf%s"  \
GPRINT::AVERAGE:"Average\:%8.2lf%s"  \
GPRINT::MIN:"Minimum\:%8.2lf%s"  \
GPRINT::MAX:"Maximum\:%8.2lf%s\n"  \
LINE1:b#0000FFFF:"+1.8V"  \
GPRINT::LAST:"Current\:%8.2lf%s"  \
GPRINT::AVERAGE:"Average\:%8.2lf%s"  \
GPRINT::MIN:"Minimum\:%8.2lf%s"  \
GPRINT::MAX:"Maximum\:%8.2lf%s\n"  \
LINE1:c#EA8F00FF:"+12V"  \
GPRINT::LAST:" Current\:%8.2lf%s"  \
GPRINT::AVERAGE:"Average\:%8.2lf%s"  \
GPRINT::MIN:"Minimum\:%8.2lf%s"  \
GPRINT::MAX:"Maximum\:%8.2lf%s\n"  \
LINE1:d#A150AAFF:"+2.5V"  \
GPRINT::LAST:"Current\:%8.2lf%s"  \
GPRINT::AVERAGE:"Average\:%8.2lf%s"  \
GPRINT::MIN:"Minimum\:%8.2lf%s"  \
GPRINT::MAX:"Maximum\:%8.2lf%s\n"  \
LINE1:e#74C366FF:"+3.3V"  \
GPRINT::LAST:"Current\:%8.2lf%s"  \
GPRINT::AVERAGE:"Average\:%8.2lf%s"  \
GPRINT::MIN:"Minimum\:%8.2lf%s"  \
GPRINT::MAX:"Maximum\:%8.2lf%s\n"  \
LINE1:f#9FA4EEFF:"+5V"  \
GPRINT::LAST:"  Current\:%8.2lf%s"  \
GPRINT::AVERAGE:"Average\:%8.2lf%s"  \
GPRINT::MIN:"Minimum\:%8.2lf%s"  \
GPRINT::MAX:"Maximum\:%8.2lf%s\n"  \
LINE1:g#CCBB00FF:"VCC"  \
GPRINT::LAST:"  Current\:%8.2lf%s"  \
GPRINT::AVERAGE:"Average\:%8.2lf%s"  \
GPRINT::MIN:"Minimum\:%8.2lf%s"  \
GPRINT::MAX:"Maximum\:%8.2lf%s\n"  \
LINE1:h#DA4725FF:"VCore"  \
GPRINT::LAST:"Current\:%8.2lf%s"  \
GPRINT::AVERAGE:"Average\:%8.2lf%s"  \
GPRINT::MIN:"Minimum\:%8.2lf%s"  \
GPRINT::MAX:"Maximum\:%8.2lf%s\n" 

RRDTool Says:

ERROR: Could not parse line 'GPRINT::LAST:Current\:%8.2lf%s'
Thanks in advance for your help :)
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

skysurfer wrote:With the new version, only the thumbnail is shown correctly. When i click on it to see the graphs theres is nothing there.

Debug message:

Code: Select all

ERROR: Could not parse line 'GPRINT::LAST:Current\:%8.2lf%s'
Thanks in advance for your help :)
Looks like you are having more problems with LAST. You could try recreating the graph templates and seeing if you get anywhere, but I've seen other posts about problems with 0.8.7d and LAST so who knows
skysurfer
Posts: 15
Joined: Tue Aug 07, 2007 7:26 am

Post by skysurfer »

ehall wrote:
skysurfer wrote:With the new version, only the thumbnail is shown correctly. When i click on it to see the graphs theres is nothing there.

Debug message:

Code: Select all

ERROR: Could not parse line 'GPRINT::LAST:Current\:%8.2lf%s'
Thanks in advance for your help :)
Looks like you are having more problems with LAST. You could try recreating the graph templates and seeing if you get anywhere, but I've seen other posts about problems with 0.8.7d and LAST so who knows
Thanks for your help :)
john_d13
Posts: 41
Joined: Mon Mar 17, 2008 11:51 pm

Post by john_d13 »

K i have snmpd setup on my linux box, i can get mibs for system and all but im having issues with the lm-sensors module

root@Home-Server-Ubx64:/tmp/net-snmp-5.4.2.1# snmpwalk -v2c -c public localhost 1.3.6.1.4.1.2021.13.16
LM-SENSORS-MIB::lmSensors = No more variables left in this MIB View (It is past the end of the MIB tree)

Im running ubuntu so I installed snmpd via apt-get install snmpd and apt-get install snmp

Im abit confused, I also installed net-snmp source package with the lm sensors option:
./configure --with-mib-modules="ucd-snmp/lmSensors"

no errors everything installed right but what am i doing wrong ?
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

john_d13 wrote:K i have snmpd setup on my linux box, i can get mibs for system and all but im having issues with the lm-sensors module

root@Home-Server-Ubx64:/tmp/net-snmp-5.4.2.1# snmpwalk -v2c -c public localhost 1.3.6.1.4.1.2021.13.16
LM-SENSORS-MIB::lmSensors = No more variables left in this MIB View (It is past the end of the MIB tree)

Im running ubuntu so I installed snmpd via apt-get install snmpd and apt-get install snmp

Im abit confused, I also installed net-snmp source package with the lm sensors option:
./configure --with-mib-modules="ucd-snmp/lmSensors"

no errors everything installed right but what am i doing wrong ?
it sounds like you are still running the prepackaged netsnmp so I'm guessing that you still need to compile netsnmp and install the resulting program files. this is a fairly large task--netsnmp is a complex piece of software--so you might be better off looking for a premade package that has the options enabled
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

skysurfer wrote:ERROR: Could not parse line 'GPRINT::LAST:Current\:%8.2lf%s'[/code]
I ran into this on my own tests and it appears that the data source associations in some of the 8x graph templates are broken when they get imported (dunno why). This is seen from the "GPRINT::" where there should be a data source reference between the ":" marks.

This is pretty simple to fix, just load up the graph template, and scroll down to the "Graph Item Inputs" section. Click each eantry, and make sure that they reference the relevant items on the graph. IE, the 8x Fan template should have a "Fan Sensor 1" input, which is linked to the first five graph items (the are the line on the graph, as well as the current, average, min and max readings). Update all of the entries, and then save the graph template. If the graph works now you're done, otherwise you may need to go into the Graph Management section, and delete and recreate the graph for the changes to the template to be recognized.
skysurfer
Posts: 15
Joined: Tue Aug 07, 2007 7:26 am

Post by skysurfer »

ehall wrote:
skysurfer wrote:ERROR: Could not parse line 'GPRINT::LAST:Current\:%8.2lf%s'[/code]
I ran into this on my own tests and it appears that the data source associations in some of the 8x graph templates are broken when they get imported (dunno why). This is seen from the "GPRINT::" where there should be a data source reference between the ":" marks.

This is pretty simple to fix, just load up the graph template, and scroll down to the "Graph Item Inputs" section. Click each eantry, and make sure that they reference the relevant items on the graph. IE, the 8x Fan template should have a "Fan Sensor 1" input, which is linked to the first five graph items (the are the line on the graph, as well as the current, average, min and max readings). Update all of the entries, and then save the graph template. If the graph works now you're done, otherwise you may need to go into the Graph Management section, and delete and recreate the graph for the changes to the template to be recognized.
That was the problem! Now everything works fine.

Once more, thanks a lot for your help! :D
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

Corrected some minor bugs in the SNMPv3 handling
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests