Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


ucd/net-SNMP lmSensors -- update Feb 10, 2007
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
ehall
Cacti User


Joined: 09 Dec 2005
Posts: 160

PostPosted: Wed Feb 01, 2006 1:36 pm    Post subject: Reply with quote

Well apparently the data queries weren't included

I've uploaded a new tar.gz file which has the data query exports (and which include the one-off graphs as dependencies), the 8x graphs as separate exports, and the needed script.

Import the XML files, copy the script to cacti/scripts/, add the data queries to the target device and you should be good.
Back to top
Cornfed



Joined: 24 Feb 2005
Posts: 12
Location: MA

PostPosted: Wed Feb 01, 2006 2:27 pm    Post subject: Reply with quote

The queries show up, but I'm getting this:

Code:


+ Running data query [11].
+ Found type = '4 '[script query].
+ Could not find data query XML file at '/data/cacti/resource/script_queries/lmsensors_fan.xml'
+ Error parsing XML file into an array.
+ Could not find data query XML file at '/data/cacti/resource/script_queries/lmsensors_fan.xml'
+ Could not find data query XML file at '/data/cacti/resource/script_queries/lmsensors_fan.xml'
+ Could not find data query XML file at '/data/cacti/resource/script_queries/lmsensors_fan.xml'



Clicking on the data query for more info gives me the screenshot



xml-error.jpg
 Description:
 Filesize:  19.02 KB
 Viewed:  11357 Time(s)

xml-error.jpg


Back to top
ehall
Cacti User


Joined: 09 Dec 2005
Posts: 160

PostPosted: Wed Feb 01, 2006 4:05 pm    Post subject: Reply with quote

Okay I updated the archive again

1) use the "Import Templates" menu to import the XML files in the
templates directory

2) manually copy the XML files in the script_queries directory to
$cacti/resource/script_queries/

3) manualy copy the php scripts in the scripts directory to
$cacti/scripts/
Back to top
Cornfed



Joined: 24 Feb 2005
Posts: 12
Location: MA

PostPosted: Wed Feb 01, 2006 4:50 pm    Post subject: Reply with quote

Perfect!! I'm in!

Thank you!!
Back to top
Instigater
Cacti User


Joined: 13 Dec 2004
Posts: 94
Location: Jurmala, Latvia

PostPosted: Tue Feb 21, 2006 7:34 am    Post subject: Reply with quote

I have tested lm_sensors on IBM x306. Some voltages and all fans are totaly incorrect.
Code:
testinstall ~ # sensors
smsc47m1-isa-0500
Adapter: ISA adapter

adt7463-i2c-4-2e
Adapter: SMBus I801 adapter at 1440
V1.5:      +3.099 V  (min =  +0.00 V, max =  +3.32 V)
VCore:     +1.298 V  (min =  +1.10 V, max =  +1.47 V)
V3.3:      +3.313 V  (min =  +3.15 V, max =  +3.49 V)
V5:       +5.117 V  (min =  +0.00 V, max =  +6.64 V)
V12:      +0.156 V  (min =  +0.00 V, max = +15.94 V)
CPU_Fan:   9215 RPM  (min =  875 RPM)
fan2:      8837 RPM  (min =  875 RPM)
fan3:      2410 RPM  (min =  875 RPM)
fan4:      9608 RPM  (min =  875 RPM)
CPU:      +25.00 C  (low  =    +0 C, high =   +45 C)
Board:    +20.50 C  (low  =    +0 C, high =   +70 C)
Remote:   +49.00 C  (low  =    +0 C, high =   +70 C)
CPU_PWM:    87
Fan2_PWM:   88
Fan3_PWM:   88
vid:      +1.387 V  (VRM Version 10.0)
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12604
Location: Muenster, Germany

PostPosted: Tue Feb 21, 2006 8:33 am    Post subject: Reply with quote

Instigater wrote:
I have tested lm_sensors on IBM x306. Some voltages and all fans are totaly incorrect.
Code:
testinstall ~ # sensors
smsc47m1-isa-0500
Adapter: ISA adapter


adt7463-i2c-4-2e
Adapter: SMBus I801 adapter at 1440
V1.5:      +3.099 V  (min =  +0.00 V, max =  +3.32 V)
VCore:     +1.298 V  (min =  +1.10 V, max =  +1.47 V)
V3.3:      +3.313 V  (min =  +3.15 V, max =  +3.49 V)
V5:       +5.117 V  (min =  +0.00 V, max =  +6.64 V)
V12:      +0.156 V  (min =  +0.00 V, max = +15.94 V)
CPU_Fan:   9215 RPM  (min =  875 RPM)
fan2:      8837 RPM  (min =  875 RPM)
fan3:      2410 RPM  (min =  875 RPM)
fan4:      9608 RPM  (min =  875 RPM)
CPU:      +25.00 C  (low  =    +0 C, high =   +45 C)
Board:    +20.50 C  (low  =    +0 C, high =   +70 C)
Remote:   +49.00 C  (low  =    +0 C, high =   +70 C)
CPU_PWM:    87
Fan2_PWM:   88
Fan3_PWM:   88
vid:      +1.387 V  (VRM Version 10.0)
How did you get this running on an IBM system? My lmsensors refuse working on IBMs due to some BIOS overwrite "feature" somw years ago ...
Reinhard
Back to top
Instigater
Cacti User


Joined: 13 Dec 2004
Posts: 94
Location: Jurmala, Latvia

PostPosted: Wed Feb 22, 2006 3:23 am    Post subject: Reply with quote

It's on Gentoo Linux.

Basic emerge lm_sensors did the trick.
Support for all possible hardware monitoring chips was compiled as kernel modules. Also don't forget to compile I2C support too.

I believe that quite recent version of kernel and lm_sensors will work on other distros too.
Back to top
Azoff



Joined: 13 Dec 2003
Posts: 5

PostPosted: Sat Mar 11, 2006 12:37 pm    Post subject: Reply with quote

I got some trouble importing cacti_graph_template_ucdnet_lmsensors_fan_sensors_8x.xml

This is the error I get:
Code:
Import Results

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)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)
   + Unmet Dependency: (Data Template Item)



What's wrong?
Back to top
YoannQ



Joined: 12 Mar 2006
Posts: 7

PostPosted: Wed Mar 15, 2006 1:27 pm    Post subject: Reply with quote

Hi,
I have a problem with all (8x) sensors graph. (each simple graph are Ok)

For exemple, Fan Sensor :
Quote:

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Marianne - Fan Sensors" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="RPMs" \
DEF:a="/data1/vhosts/admin.xxx.net/html/cacti/rra/marianne_sensorreading_15.rrd":sensorReading:LAST \
DEF:b="/data1/vhosts/admin.xxx.net/html/cacti/rra/marianne_sensorreading_16.rrd":sensorReading:LAST \
DEF:c="/data1/vhosts/admin.xxx.net/html/cacti/rra/marianne_sensorreading_17.rrd":sensorReading:LAST \
LINE1:a#00FF00:"fan1" \
GPRINT::LAST:"Current\:" \
GPRINT::AVERAGE:"Average\:" \
GPRINT::MIN:"Minimum\:" \
GPRINT::MAX:"Maximum\:\n" \
LINE1:b#0000FF:"fan2" \
GPRINT::LAST:"Current\:" \
GPRINT::AVERAGE:"Average\:" \
GPRINT::MIN:"Minimum\:" \
GPRINT::MAX:"Maximum\:\n" \
LINE1:c#EA8F00:"fan3" \
GPRINT::LAST:"Current\:" \
GPRINT::AVERAGE:"Average\:" \
GPRINT::MIN:"Minimum\:" \
GPRINT::MAX:"Maximum\:\n" \
LINE1:#A150AA:"|query_sensorName|" \
GPRINT::LAST:"Current\:" \
GPRINT::AVERAGE:"Average\:" \
GPRINT::MIN:"Minimum\:" \
GPRINT::MAX:"Maximum\:\n" \
LINE1:#74C366:"|query_sensorName|" \
GPRINT::LAST:"Current\:" \
GPRINT::AVERAGE:"Average\:" \
GPRINT::MIN:"Minimum\:" \
GPRINT::MAX:"Maximum\:\n" \
LINE1:#9FA4EE:"|query_sensorName|" \
GPRINT::LAST:"Current\:" \
GPRINT::AVERAGE:"Average\:" \
GPRINT::MIN:"Minimum\:" \
GPRINT::MAX:"Maximum\:\n" \
LINE1:#CCBB00:"|query_sensorName|" \
GPRINT::LAST:"Current\:" \
GPRINT::AVERAGE:"Average\:" \
GPRINT::MIN:"Minimum\:" \
GPRINT::MAX:"Maximum\:\n" \
LINE1:#DA4725:"|query_sensorName|" \
GPRINT::LAST:"Current\:" \
GPRINT::AVERAGE:"Average\:" \
GPRINT::MIN:"Minimum\:" \
GPRINT::MAX:"Maximum\:\n"

RRDTool Says:

ERROR: can't parse ':LAST:Current\:'


Have you an idea to solve the problem ?

THk
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12604
Location: Muenster, Germany

PostPosted: Thu Mar 16, 2006 2:12 pm    Post subject: Reply with quote

You have an 8x Template but only three data sources ...
Reinhard
Back to top
sumsum
Cacti User


Joined: 26 Apr 2004
Posts: 60
Location: Switzerland

PostPosted: Sat May 06, 2006 5:13 pm    Post subject: Reply with quote

hello cool script !

i have a problem after importing the templates and doing everything in place as you mentioned in the readme

the verbose data querry shows for example

+ Running data query [12].
+ Found type = '4 '[script query].
+ Found data query XML file at '/home/dmd2www/public_html/cacti-0.8.6h/resource/script_queries/lmsensors_fan.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /home/dmd2www/public_html/cacti-0.8.6h/scripts/netsnmp_lmsensors.php fan localhost, cacti, 2, , , 161, 500 index'
+ Executing script query '/usr/bin/php -q /home/dmd2www/public_html/cacti-0.8.6h/scripts/netsnmp_lmsensors.php fan localhost, cacti, 2, , , 161, 500 query sensorDevice'
+ Executing script query '/usr/bin/php -q /home/dmd2www/public_html/cacti-0.8.6h/scripts/netsnmp_lmsensors.php fan localhost, cacti, 2, , , 161, 500 query sensorName'
+ Found data query XML file at '/home/dmd2www/public_html/cacti-0.8.6h/resource/script_queries/lmsensors_fan.xml'
+ Found data query XML file at '/home/dmd2www/public_html/cacti-0.8.6h/resource/script_queries/lmsensors_fan.xml'
+ Found data query XML file at '/home/dmd2www/public_html/cacti-0.8.6h/resource/script_queries/lmsensors_fan.xml'

but the status shows : Success [0 Items, 0 Rows]

did i lost something ?
regards
tom
Back to top
skaag



Joined: 06 May 2006
Posts: 2

PostPosted: Sat May 06, 2006 5:17 pm    Post subject: Problem importing templates Reply with quote

I'm running version "0.8.6c-7sarge3" (Debian)
I keep getting this message whenever I try to import templates:

Error: XML: Hash version does not exist.

I really need to monitor lm-sensors... my colo has heating problems and I want to show them facts.

Is there a way to get around this?

Thanks!
Back to top
sumsum
Cacti User


Joined: 26 Apr 2004
Posts: 60
Location: Switzerland

PostPosted: Sat May 06, 2006 5:18 pm    Post subject: Reply with quote

you need to upgrade your cacti installation to version cacti-0.8.6h then the import of the templates will work.
cheers
tom
Back to top
skaag



Joined: 06 May 2006
Posts: 2

PostPosted: Sun May 07, 2006 5:50 pm    Post subject: Upgraded to 0.8.6h Reply with quote

Ok now I am using 0.8.6h and i've copied the files again, and now i've managed to import all the templates, except for the 8x templates. I can't import the 8x templates, and i'm getting the same errors as Azoff is getting (Unmet dependencies while importing).

The simple graphs are working great now, I get all the data I need, but it would indeed be nice to have them consolidated into one graph.

Is there a solution for those dependencies?

Are the dependencies an issue of me not having all the data sources required by the graph? Or is it something else?

Skaag
Back to top
Yzo



Joined: 16 May 2006
Posts: 3

PostPosted: Tue May 16, 2006 5:48 pm    Post subject: Reply with quote

I'm a new Cacti user and a net-snmp lightweight. I've been spending the last two days banging my head against the wall, trying to figure out how to get this working. My apologies if this post is excessively large, I'm striving to be as detailed as possible.

For some reason I haven't been able to figure out, no RRD files are being generated when I try to get these graphs working. I'll limit my examples to the thermal sensors, but the same problem is affecting voltage and fan readings as well.

The server in question is running Gentoo. lm_sensors, net-snmp, and Cacti were all emerged in. Cacti version is 0.8.6h_p20060108-r2, lm_sensors version is 2.10.0, and net-snmp is 5.2.1.2-r1.

Cacti is polling snmp via the lo or eth0 interface. With either interface, the Cacti standard graphs in the Linux host template work, but the lmSensors graphs do not.

CLI lm_sensors works. Here's the snipped output of sensors:
Code:
temp1:       +53 C  (high =   +66 C, hyst =   +16 C)   sensor = thermistor     
temp2:     +52.0 C  (high =   +85 C, hyst =   +80 C)   sensor = diode           (beep)
temp3:     +41.0 C  (high =   +85 C, hyst =   +80 C)   sensor = thermistor     


CLI snmpwalk returns sensors readings. Here's that snipped output:
Code:
$snmpwalk -c sakura -v1 localhost tempsensors
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: temp1
LM-SENSORS-MIB::lmTempSensorsDevice.2 = STRING: temp2
LM-SENSORS-MIB::lmTempSensorsDevice.3 = STRING: temp3
LM-SENSORS-MIB::lmTempSensorsValue.1 = Gauge32: 53000
LM-SENSORS-MIB::lmTempSensorsValue.2 = Gauge32: 53000
LM-SENSORS-MIB::lmTempSensorsValue.3 = Gauge32: 41000


I've got the requisite XML files and php scripts where they need to be according to the README. I import the thermal sensor data query template and the single sensor graph template. So far, so good.

I add the lmSensor data query to the device. Seems to be working. The status says "Success [6 Items, 3 Rows]". Here's the output of verbose query:
Code:
+ Running data query [14].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/lmsensors_temp.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/localhost/htdocs/cacti/scripts/netsnmp_lmsensors.php temperature 10.0.0.2, sakura, 1, , , 161, 500 index'
+ Executing script query '/usr/bin/php -q /var/www/localhost/htdocs/cacti/scripts/netsnmp_lmsensors.php temperature 10.0.0.2, sakura, 1, , , 161, 500 query sensorDevice'
+ Found item [sensorDevice='1'] index: 1
+ Found item [sensorDevice='2'] index: 2
+ Found item [sensorDevice='3'] index: 3
+ Executing script query '/usr/bin/php -q /var/www/localhost/htdocs/cacti/scripts/netsnmp_lmsensors.php temperature 10.0.0.2, sakura, 1, , , 161, 500 query sensorName'
+ Found item [sensorName='temp1'] index: 1
+ Found item [sensorName='temp2'] index: 2
+ Found item [sensorName='temp3'] index: 3
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/lmsensors_temp.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/lmsensors_temp.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/lmsensors_temp.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/lmsensors_temp.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/lmsensors_temp.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/lmsensors_temp.xml'


I interpret that to mean it found the thermal sensors. So I go to create graphs for the host.



So now I've got three thermal sensor entries in the data sources tab, and three thermal sensor entries in graph management. Up to this point, I'm assuming everything is setup the way it supposed to be.

At this point though, I hit trouble. None of the rrd files listed in the data sources ever get generated. Here's the debug output for the temp1 sensor:
Code:
/usr/bin/rrdtool create \
/var/www/localhost/htdocs/cacti/rra/hostnet_sensorreading_65.rrd \
--step 300  \
DS:sensorReading:GAUGE:600:0:150 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775 \
RRA:MIN:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \


Obviously, if no rrd file is created, I'll get no graph output as indicated by the temp1 graph debug:
Code:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="host-net - Thermal Sensor - temp1" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Celsius" \
--slope-mode \
DEF:a="/var/www/localhost/htdocs/cacti/rra/hostnet_sensorreading_65.rrd":sensorReading:AVERAGE \
LINE2:a#0000FF:"temp1"  \
GPRINT:a:LAST:"Current\:%8.2lf%s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:a:MIN:"Minimum\:%8.2lf%s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf%s\n"

RRDTool Says:

ERROR: opening '/var/www/localhost/htdocs/cacti/rra/hostnet_sensorreading_65.rrd': No such file or directory


If I manually su to the apache user account and run the "rrdtool create" command above, I'll get an rrd file which when graphed results in a graph with no data. The values will be reported as "nan".

It looks for the world like cmd.php isn't even polling the information like it should. I created a device entry that contained only the lmSensors data queries and the associated graphs. Cmd.php logs the following (This is with logging set to HIGH and with poller logging Errors, Warnings, and Statistics):
Code:
apache$ /usr/bin/php /var/www/localhost/htdocs/cacti/poller.php

05/16/2006 03:30:46 PM - CMDPHP: Poller[0] ERROR: Either there are no items in the cache or polling is disabled
05/16/2006 03:30:47 PM - SYSTEM STATS: Time:1.0535 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0


Quite honestly, I'm a little out of my league when it comes to rrdtool and snmp. As far as I can see, it looks for the world like it should be working.

It's not a permissions problem, as I said, there's no problem with the data for memory usage, interface statistics, etc being written out and graphed.

Can anyone help?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 2 of 7

 



Powered by phpBB © 2001, 2005 phpBB Group