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

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

Moderators: Developers, Moderators

Post Reply
Yzo
Posts: 3
Joined: Tue May 16, 2006 4:26 pm

Post by Yzo »

Ugh!

Days of frustration to figure out I needed to put a check mark in the Associated Data Templates section of the Associated Graphs Templates of the Data Query entries for the sensor types.

It's all good now.
Fluor
Posts: 1
Joined: Tue Jun 27, 2006 9:26 am
Location: Utrecht, NL
Contact:

Problems importing 8x templates

Post by Fluor »

Hello!

Thanks for this cooltemplate package. I imported the XML files, all went okay, except for the 8x ones. They all have unmet dependencies. What did I do wrong?

The other templates (seem to) work perfectly. I'm running them for just a few minutes now, waiting for the first data to come through :P

I'll be happy to hear what i can do to import the 8x templates! Couldn't find it on this thread, though...
superdave913
Posts: 28
Joined: Fri Jan 14, 2005 7:10 pm
Contact:

More detail?

Post by superdave913 »

Yzo wrote:Ugh!

Days of frustration to figure out I needed to put a check mark in the Associated Data Templates section of the Associated Graphs Templates of the Data Query entries for the sensor types.

It's all good now.
I am confused about which check-mark you are referring too... I'm still having this problem.
Could you outline in a little more detail?
Thanks,
Dave
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Re: what about libsnmp on Ubuntu?

Post by ehall »

/usr/local/dick wrote:I just installed lmsensors on Ubuntu-6.0.6 and the sensors command works fine, I get all sort of temperatures and voltages back. Now I also have snmpd running on the machine, but if I snmpwalk I don't get lm-sensors values back... There is no mention of any LMSENSORS mib in the result :(
You probably need to recompile net-snmp. Ask around in the Ubuntu forums if they compiled in lmSensors support or not.
wintech2003
Posts: 12
Joined: Tue May 17, 2005 5:29 am

Re: More detail?

Post by wintech2003 »

superdave913 wrote:
Yzo wrote:Ugh!

Days of frustration to figure out I needed to put a check mark in the Associated Data Templates section of the Associated Graphs Templates of the Data Query entries for the sensor types.

It's all good now.
I am confused about which check-mark you are referring too... I'm still having this problem.
Could you outline in a little more detail?
Thanks,
Dave
I'm also having exactly the same problem...
darkeye
Posts: 3
Joined: Tue Aug 22, 2006 4:51 pm

Unmet Dependency: (GPRINT Preset) Normal

Post by darkeye »

when trying to import some of the 8x templates, I get the following:

Code: Select all

Unmet Dependency: (GPRINT Preset) Normal
what am I doing wrong? how could I fulfill this dependency?
plouj
Posts: 7
Joined: Thu Aug 31, 2006 6:04 pm

Re: More detail?

Post by plouj »

wintech2003 wrote:
superdave913 wrote:
Yzo wrote:Ugh!

Days of frustration to figure out I needed to put a check mark in the Associated Data Templates section of the Associated Graphs Templates of the Data Query entries for the sensor types.

It's all good now.
I am confused about which check-mark you are referring too... I'm still having this problem.
Could you outline in a little more detail?
Thanks,
Dave
I'm also having exactly the same problem...
Open the ucd/net - lmSensors - Get Fan Sensors (for example) data query
Go to that query's "Associated Graph Templates" (ucd/net - lmSensors - Fan Sensor in this example)
Put a checkmark in the "Associated Data Templates" section beside "Data Source: sensorReading"
plouj
Posts: 7
Joined: Thu Aug 31, 2006 6:04 pm

Post by plouj »

I duplicated the lm_sensors 8x template to create a 3x graph template. I removed the unneeded graph items. Then I applied this graph template to my cacti device. Then in graph management, I added appropriate data sources for all three graph items. However, the graph doesn't get drawn because the RRDTool Command is wrong:

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Localhost - Fan Sensors" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="RPMs" \
--slope-mode \
DEF:a="/var/www/localhost/htdocs/c/rra/localhost_sensorreading_33.rrd":sensorReading:LAST \
DEF:b="/var/www/localhost/htdocs/c/rra/localhost_sensorreading_35.rrd":sensorReading:LAST \
DEF:c="/var/www/localhost/htdocs/c/rra/localhost_sensorreading_34.rrd":sensorReading:LAST \
LINE1:a#00FF00:"CPU fan"  \
GPRINT::LAST:"  Current\:"  \
GPRINT::AVERAGE:"  Average\:"  \
GPRINT::MIN:"  Minimum\:"  \
GPRINT::MAX:"  Maximum\:\n"  \
LINE1:b#0000FF:"Front fan"  \
GPRINT::LAST:"Current\:"  \
GPRINT::AVERAGE:"Average\:"  \
GPRINT::MIN:"Minimum\:"  \
GPRINT::MAX:"Maximum\:\n"  \
LINE1:c#EA8F00:"Rear fan"  \
GPRINT::LAST:" Current\:"  \
GPRINT::AVERAGE:" Average\:"  \
GPRINT::MIN:" Minimum\:"  \
GPRINT::MAX:" Maximum\:\n"
RRDTool Says:

ERROR: Could not parse line 'GPRINT::LAST:  Current\:' 
I wonder if this is related to the fact that when I try to import the 8x graphs I see an error about unmet dependencies:

Code: Select all

Cacti has imported the following items:

Graph Template
[success] ucd/net - lmSensors - Fan Sensors (8x) [update]
   + Unmet Dependency: (GPRINT Preset) Exact Numbers
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
...
plouj
Posts: 7
Joined: Thu Aug 31, 2006 6:04 pm

Post by plouj »

I manually re-created my own x3 and x4 graphs and they seem to work fine. I'm wondering if there is something wrong with the XML files in the archive.
Blueroot
Posts: 3
Joined: Sun Jun 19, 2005 4:17 pm

Import

Post by Blueroot »

He,

the import of the xml files with cacti templateimport don't work by me.
I always get "Error: XML: Generated with a newer version of Cacti."
I use Cacti 0.8.6g.

Did anyboady knows how to fix it?
plouj
Posts: 7
Joined: Thu Aug 31, 2006 6:04 pm

Re: Import

Post by plouj »

Blueroot wrote:He,

the import of the xml files with cacti templateimport don't work by me.
I always get "Error: XML: Generated with a newer version of Cacti."
I use Cacti 0.8.6g.

Did anyboady knows how to fix it?
Yes, upgrade cacti! "The latest stable version is 0.8.6h, released 01/03/06."
darkeye
Posts: 3
Joined: Tue Aug 22, 2006 4:51 pm

Re: More detail?

Post by darkeye »

plouj wrote: Open the ucd/net - lmSensors - Get Fan Sensors (for example) data query
Go to that query's "Associated Graph Templates" (ucd/net - lmSensors - Fan Sensor in this example)
Put a checkmark in the "Associated Data Templates" section beside "Data Source: sensorReading"
I did the same, but I still don't get any readings :(
proddy
Posts: 1
Joined: Wed Sep 20, 2006 3:57 pm

Post by proddy »

I have the same problem as darkeye.

lm_sensors and snmp are working correctly. Data query in Cacti is capturing the results when run manually in debug, but the graph is not being created (even with checkbox in Data Queries -> (Edit) -> Associated Graph Templates).

Poller is not picking up the new data source. And I noticed in the log a SQL error:

09/20/2006 11:04:38 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select snmp_query_graph_rrd.snmp_field_name, data_template_rrd.id as data_template_rrd_id from (snmp_query_graph_rrd,data_template_rrd) where snmp_query_graph_rrd.data_template_rrd_id=data_template_rrd.local_data_template_rrd_id and snmp_query_graph_rrd.snmp_query_graph_id= and snmp_query_graph_rrd.data_template_id=50 and data_template_rrd.local_data_id=8"

note the missing graph_id. Any ideas?

Note this is version 0.8.6h_p20060108-r2 with all the patches (gentoo ebuild) including the fix in graph.php
Icarium
Posts: 6
Joined: Wed Dec 06, 2006 4:32 pm

Post by Icarium »

Code: Select all

+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/lmsensors_fan.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/localhost/htdocs/cacti/scripts/netsnmp_lmsensors.php fan 127.0.0.1, , 1, , , 161, 500 index'
+ Executing script query '/usr/bin/php -q /var/www/localhost/htdocs/cacti/scripts/netsnmp_lmsensors.php fan 127.0.0.1, , 1, , , 161, 500 query sensorDevice'
+ Found item [sensorDevice=' /var/www/localhost/htdocs/cacti/scripts/netsnmp_lmsensors.php (FAN|TEMPERATURE|VOLTAGE)'] index: syntax
+ Executing script query '/usr/bin/php -q /var/www/localhost/htdocs/cacti/scripts/netsnmp_lmsensors.php fan 127.0.0.1, , 1, , , 161, 500 query sensorName'
+ Found item [sensorName=' /var/www/localhost/htdocs/cacti/scripts/netsnmp_lmsensors.php (FAN|TEMPERATURE|VOLTAGE)'] index: syntax
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/lmsensors_fan.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/lmsensors_fan.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/lmsensors_fan.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/lmsensors_fan.xml'
that's what i get when i click "verbose query" on the device page for localhost under associated data queries

could somebody explain to me what the problem is here?
sithgunner
Posts: 5
Joined: Thu Feb 08, 2007 2:16 am

Post by sithgunner »

I kept getting errors about making the graph to merge, so I messed around a bit and finally got it working. And here's my templates, for someone might save time I used to click several hundred times and increase about 100 page views on cacti web :lol:

Somehow I didn't have 8 data sources for voltage, namely -5V, and ended up having 3 fan readings, 3 thermal readings and 7 voltage readings.

These are the templates I used to work on *mine*.

As for the fans, I lost the 2 sensor readings (since I didn't have them turned on and deleted the entries) and never could pull it back, so I set 3 readings all on CPU fan... so, you have to fix that to suit yourself to read the other fan readings if you have them.
Attachments
cacti-lmsensors-template-updated.zip
3 sensors updated template, use import function in cacti.
(9.65 KiB) Downloaded 2031 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests