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

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

Moderators: Developers, Moderators

Post Reply
tiger.tw
Posts: 6
Joined: Mon Jan 21, 2008 8:04 am

Post by tiger.tw »

cwahlin wrote: 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
If you are using the original version of the "ucd/net-SNMP lmSensors"-plugin, it will not work with cacti >= 0.8.7. In this case try my patched version ( find it some posts ago; dated 28.01.08 ).

Two posts later there are my versions of snmp and sensors which i has tested successfully. Could be that your snmpd-server or sensors is too old...

Good luck
cwahlin
Cacti User
Posts: 91
Joined: Fri Oct 10, 2003 7:23 am

Post by cwahlin »

tiger.tw,

works like a charm!

Thanks!

/Carl
tiger.tw
Posts: 6
Joined: Mon Jan 21, 2008 8:04 am

Post by tiger.tw »

nice to get positiv feedback.
hope it helps others, too..
E:S
Posts: 4
Joined: Sat Mar 15, 2008 10:09 pm

Post by E:S »

Hi,

this plugin is just great.. but I get some errors when using graph templates for multiple sources.. this is an example for voltage graph template ( 8 sources selected ).
CMDPHP: ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select data_input_fields.type_code, data_input_data.value from (data_input_fields,data_input_data) where data_input_fields.id=data_input_data.data_input_field_id and data_input_data.data_template_data_id= and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"
RRD also cannot be created in shell:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-14400 \
--end=-60 \
--title="firewall.kolp.at - Voltage Sensors" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=-15 \
--vertical-label="Volts" \
--slope-mode \
--font TITLE:10:/usr/share/fonts/truetype/msttcorefonts/verdana.ttf \
--font AXIS:7:/usr/share/fonts/truetype/msttcorefonts/verdana.ttf \
--font LEGEND:7:/usr/share/fonts/truetype/msttcorefonts/verdana.ttf \
--font UNIT:8:/usr/share/fonts/truetype/msttcorefonts/verdana.ttf \
DEF:a="/srv/www-monitor/rra/firewall_kolp_at_sensorreading_623.rrd":sensorReading:LAST \
DEF:b="/srv/www-monitor/rra/firewall_kolp_at_sensorreading_624.rrd":sensorReading:LAST \
DEF:c="/srv/www-monitor/rra/firewall_kolp_at_sensorreading_622.rrd":sensorReading:LAST \
DEF:d="/srv/www-monitor/rra/firewall_kolp_at_sensorreading_625.rrd":sensorReading:LAST \
DEF:e="/srv/www-monitor/rra/firewall_kolp_at_sensorreading_621.rrd":sensorReading:LAST \
DEF:f="/srv/www-monitor/rra/firewall_kolp_at_sensorreading_626.rrd":sensorReading:LAST \
DEF:g="/srv/www-monitor/rra/firewall_kolp_at_sensorreading_627.rrd":sensorReading:LAST \
DEF:h="/srv/www-monitor/rra/firewall_kolp_at_sensorreading_620.rrd":sensorReading:LAST \
LINE1:a#00FF00FF:"+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:b#0000FFFF:"-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:c#EA8F00FF:"+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:d#A150AAFF:"-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:"V5SB" \
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:"VBat" \
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"
ERROR: Could not parse line 'GPRINT::LAST: Current\:%8.2lf%s'
This happens for thermal and fan graph templates. Any hints?

Regards,
E:S
tdw
Posts: 3
Joined: Wed Dec 26, 2007 6:13 am

Post by tdw »

E:S wrote:Hi,

this plugin is just great.. but I get some errors when using graph templates for multiple sources.. this is an example for voltage graph template ( 8 sources selected ).
CMDPHP: ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select data_input_fields.type_code, data_input_data.value from (data_input_fields,data_input_data) where data_input_fields.id=data_input_data.data_input_field_id and data_input_data.data_template_data_id= and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"
RRD also cannot be created in shell:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-14400 \
--end=-60 \
--title="firewall.kolp.at - Voltage Sensors" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=-15 \
--vertical-label="Volts" \
--slope-mode \
--font TITLE:10:/usr/share/fonts/truetype/msttcorefonts/verdana.ttf \
--font AXIS:7:/usr/share/fonts/truetype/msttcorefonts/verdana.ttf \
--font LEGEND:7:/usr/share/fonts/truetype/msttcorefonts/verdana.ttf \
--font UNIT:8:/usr/share/fonts/truetype/msttcorefonts/verdana.ttf \
DEF:a="/srv/www-monitor/rra/firewall_kolp_at_sensorreading_623.rrd":sensorReading:LAST \
DEF:b="/srv/www-monitor/rra/firewall_kolp_at_sensorreading_624.rrd":sensorReading:LAST \
DEF:c="/srv/www-monitor/rra/firewall_kolp_at_sensorreading_622.rrd":sensorReading:LAST \
DEF:d="/srv/www-monitor/rra/firewall_kolp_at_sensorreading_625.rrd":sensorReading:LAST \
DEF:e="/srv/www-monitor/rra/firewall_kolp_at_sensorreading_621.rrd":sensorReading:LAST \
DEF:f="/srv/www-monitor/rra/firewall_kolp_at_sensorreading_626.rrd":sensorReading:LAST \
DEF:g="/srv/www-monitor/rra/firewall_kolp_at_sensorreading_627.rrd":sensorReading:LAST \
DEF:h="/srv/www-monitor/rra/firewall_kolp_at_sensorreading_620.rrd":sensorReading:LAST \
LINE1:a#00FF00FF:"+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:b#0000FFFF:"-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:c#EA8F00FF:"+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:d#A150AAFF:"-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:"V5SB" \
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:"VBat" \
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"
ERROR: Could not parse line 'GPRINT::LAST: Current\:%8.2lf%s'
This happens for thermal and fan graph templates. Any hints?

Regards,
E:S
I have the exact same error :(
noflies
Cacti User
Posts: 83
Joined: Sun Dec 18, 2005 9:30 am

Post by noflies »

None of the GPRINT statements have an associated DEF with them.
The correct format would be similar to:

Code: Select all

LINE1:a#00FF00FF:"+12V" \ 
GPRINT:a:LAST:" Current\:%8.2lf%s" \ 
GPRINT:a:AVERAGE:"Average\:%8.2lf%s" \ 
Note the ":a:" immediately after the GPRINT.
Change each of the four GPRINTs for each variable, a through h and the graph can be tested through the shell.

I suspect the associated graph template has "no task" for each of the graph template items. Change the "no task" to the correct variables; +12V, -12V, +5V, etc.
tdw
Posts: 3
Joined: Wed Dec 26, 2007 6:13 am

Post by tdw »

noflies wrote:None of the GPRINT statements have an associated DEF with them.
The correct format would be similar to:

Code: Select all

LINE1:a#00FF00FF:"+12V" \ 
GPRINT:a:LAST:" Current\:%8.2lf%s" \ 
GPRINT:a:AVERAGE:"Average\:%8.2lf%s" \ 
Note the ":a:" immediately after the GPRINT.
Change each of the four GPRINTs for each variable, a through h and the graph can be tested through the shell.

I suspect the associated graph template has "no task" for each of the graph template items. Change the "no task" to the correct variables; +12V, -12V, +5V, etc.
I'm sorry, but I don't really understand how I'm supposed to do that. Can you please explain that?
E:S
Posts: 4
Joined: Sat Mar 15, 2008 10:09 pm

Post by E:S »

noflies wrote:None of the GPRINT statements have an associated DEF with them.
I suspect the associated graph template has "no task" for each of the graph template items. Change the "no task" to the correct variables; +12V, -12V, +5V, etc.
Yes. You are right. After looking at the graph template, there is "no task". But when I create this graph ( which should contain multiple sources ), I can select 8 sources that should be graphed ( in graph management ). After selecting the sources, I save the settings for the graph, and the RRD command still has no ":a:" ( task ). Is there something wrong with the sources selection? I have other multiple graphs ( hddtemp for example ) that work without problems.

Could this be caused by 0.8.7b version? I recall this graph working for me on an older version of Cacti.

Regards,
E:S
elafargue
Posts: 1
Joined: Wed Apr 09, 2008 3:34 pm

Doing the same without a script...

Post by elafargue »

Hi all,

I am wondering why this lm-sensors template uses a fairly complex php script to graph lm-sensors values ?

I have put in place graphs of any sort of lm-sensors value queried through snmp using a simple Data Query using a XML definition, and ad-hoc graph templates, it works fine... Is there something I am missing in the use of data input methods, data queries, etc? I have to admit that Cacti's many interrelated templates and methods are a bit confusing to me...

Anyway, the xml below enables you to get the values of any sensor in the "misc" category, and you can then use those values to create graphs.

Ed

The data query I use to get the list of sensors - and then draw them on graphs- is the following (put it in the snmp_queries directory):

Code: Select all

<interface>
        <name>LM Sensors Misc sensors Information</name>
        <index_order_type>numeric</index_order_type>
        <oid_index>.1.3.6.1.4.1.2021.13.16.5.1.1</oid_index>

        <fields>
                <lmsMiscIndex>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2021.13.16.5.1.1</oid>
                </lmsMiscIndex>
                <lmsMiscDescr>
                        <name>Description</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2021.13.16.5.1.2</oid>
                </lmsMiscDescr>
                <lmsMiscValue>
                        <name>Value</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.2021.13.16.5.1.3</oid>
                </lmsMiscValue>
        </fields>
</interface>
srowe
Posts: 2
Joined: Thu Apr 10, 2008 4:49 pm

Post by srowe »

Could someone explain how to get the 8x graph templates to work? My individual graphs of the fans is working fine but importing the graph template gave the following errors:
+ 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)
I only have two fans so I deleted the extra entries from the template and created a graph. Nothing ever gets displayed, debugging the graph I get
ERROR: parameter '#00FF00' does not represent a number in line LINE1:#00FF00:|query_sensorName|
I'm running 0.8.6j, the most recent available with my distro.
srowe
Posts: 2
Joined: Thu Apr 10, 2008 4:49 pm

Post by srowe »

OK, so I've wiped 0.8.6j and installed 0.8.7b and I still can't get this template working.

The problem is slightly different now, the graph debug shows:
RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Eden - Fan Sensors" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="RPMs" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/lib/cacti/eden_sensorreading_28.rrd":sensorReading:LAST \
DEF:b="/var/lib/cacti/eden_sensorreading_29.rrd":sensorReading:LAST \
LINE1:a#00FF00FF:"CPU Fan" \
GPRINT::LAST:"Current\:%8.0lf" \
GPRINT::AVERAGE:"Average\:%8.0lf" \
GPRINT::MIN:"Minimum\:%8.0lf" \
GPRINT::MAX:"Maximum\:%8.0lf\n" \
LINE1:b#0000FFFF:"P/S Fan" \
GPRINT::LAST:"Current\:%8.0lf" \
GPRINT::AVERAGE:"Average\:%8.0lf" \
GPRINT::MIN:"Minimum\:%8.0lf" \
GPRINT::MAX:"Maximum\:%8.0lf\n"
RRDTool Says:

ERROR: Could not parse line 'GPRINT::LAST:Current\:%8.0lf'
There seems some problem getting the values from the rra and inserting them into the template.

Any ideas?
sneaker
Posts: 1
Joined: Wed May 07, 2008 3:38 pm

Post by sneaker »

I am also getting the
# snmpwalk -v2c -c public localhost lmSensors
LM-SENSORS-MIB::lmSensors = No Such Object available on this agent at this OID

error (and an snmpwalk with a grep for the sensor data also fails).
The output of /usr/bin/sensors is correct, /etc/sensors.conf is linked to /etc/sensors3.conf. This is a ubuntu 8.04 machine, upgraded from 7.10, and it stopped working after this upgrade (snmpd.conf might've been overwritten). I dont remember changing anything to the snmpd.conf or recompiling snmpd to support lmsensors (it should be compiled in by default on ubuntu), any hints on how I can persuade my snmpd to show the sensor data again? :)
krolingo
Posts: 4
Joined: Wed May 07, 2008 6:27 pm

Post by krolingo »

1. Cacti 0.8.7 Running on Leopard Server 10.5.2, with defaults (Apache2.2 + PHP 5.2.5 + Mysql5.0.45)
2. snmpwalk works:

Code: Select all

octagon:~ user$ snmpwalk -v 2c -c public 192.168.1.8 lmsensors

LM-SENSORS-MIB::lmTempSensorsIndex.1 = INTEGER: 1
LM-SENSORS-MIB::lmTempSensorsIndex.2 = INTEGER: 2
LM-SENSORS-MIB::lmTempSensorsIndex.3 = INTEGER: 3
LM-SENSORS-MIB::lmTempSensorsIndex.4 = INTEGER: 4
LM-SENSORS-MIB::lmTempSensorsIndex.5 = INTEGER: 5
LM-SENSORS-MIB::lmTempSensorsIndex.6 = INTEGER: 6
LM-SENSORS-MIB::lmTempSensorsIndex.7 = INTEGER: 7
LM-SENSORS-MIB::lmTempSensorsIndex.8 = INTEGER: 8
LM-SENSORS-MIB::lmTempSensorsIndex.9 = INTEGER: 9
LM-SENSORS-MIB::lmTempSensorsIndex.10 = INTEGER: 10
LM-SENSORS-MIB::lmTempSensorsIndex.11 = INTEGER: 11
LM-SENSORS-MIB::lmTempSensorsIndex.12 = INTEGER: 12
LM-SENSORS-MIB::lmTempSensorsIndex.13 = INTEGER: 13
LM-SENSORS-MIB::lmTempSensorsIndex.14 = INTEGER: 14
LM-SENSORS-MIB::lmTempSensorsDevice.1 = STRING: PSU1 Secondary Component
LM-SENSORS-MIB::lmTempSensorsDevice.2 = STRING: CPU B Core 0
LM-SENSORS-MIB::lmTempSensorsDevice.3 = STRING: Ambient temp
LM-SENSORS-MIB::lmTempSensorsDevice.4 = STRING: CPU A Core 0
LM-SENSORS-MIB::lmTempSensorsDevice.5 = STRING: MCH HeatSink
LM-SENSORS-MIB::lmTempSensorsDevice.6 = STRING: Drive Bay 1
LM-SENSORS-MIB::lmTempSensorsDevice.7 = STRING: PSU1 Inlet Ambient
LM-SENSORS-MIB::lmTempSensorsDevice.8 = STRING: CPU B Core 1
LM-SENSORS-MIB::lmTempSensorsDevice.9 = STRING: CPU A HeatSink
LM-SENSORS-MIB::lmTempSensorsDevice.10 = STRING: Drive Bay 0
LM-SENSORS-MIB::lmTempSensorsDevice.11 = STRING: CPU B HeatSink
LM-SENSORS-MIB::lmTempSensorsDevice.12 = STRING: CPU A Core 1
LM-SENSORS-MIB::lmTempSensorsDevice.13 = STRING: Drive Bay 3
LM-SENSORS-MIB::lmTempSensorsDevice.14 = STRING: Drive Bay 2
LM-SENSORS-MIB::lmTempSensorsValue.1 = Gauge32: 60000
LM-SENSORS-MIB::lmTempSensorsValue.2 = Gauge32: 38000
LM-SENSORS-MIB::lmTempSensorsValue.3 = Gauge32: 26500
LM-SENSORS-MIB::lmTempSensorsValue.4 = Gauge32: 35000
LM-SENSORS-MIB::lmTempSensorsValue.5 = Gauge32: 84000
LM-SENSORS-MIB::lmTempSensorsValue.6 = Gauge32: 33625
LM-SENSORS-MIB::lmTempSensorsValue.7 = Gauge32: 57000
LM-SENSORS-MIB::lmTempSensorsValue.8 = Gauge32: 0
LM-SENSORS-MIB::lmTempSensorsValue.9 = Gauge32: 49000
LM-SENSORS-MIB::lmTempSensorsValue.10 = Gauge32: 35125
LM-SENSORS-MIB::lmTempSensorsValue.11 = Gauge32: 48500
LM-SENSORS-MIB::lmTempSensorsValue.12 = Gauge32: 0
LM-SENSORS-MIB::lmTempSensorsValue.13 = Gauge32: 34500
LM-SENSORS-MIB::lmTempSensorsValue.14 = Gauge32: 35625
LM-SENSORS-MIB::lmFanSensorsIndex.15 = INTEGER: 15
LM-SENSORS-MIB::lmFanSensorsDevice.15 = STRING: ????
LM-SENSORS-MIB::lmFanSensorsValue.15 = Gauge32: 1998
LM-SENSORS-MIB::lmVoltSensorsIndex.16 = INTEGER: 16
LM-SENSORS-MIB::lmVoltSensorsIndex.17 = INTEGER: 17
LM-SENSORS-MIB::lmVoltSensorsIndex.18 = INTEGER: 18
LM-SENSORS-MIB::lmVoltSensorsIndex.19 = INTEGER: 19
LM-SENSORS-MIB::lmVoltSensorsIndex.20 = INTEGER: 20
LM-SENSORS-MIB::lmVoltSensorsDevice.16 = STRING: MCH voltage cooked
LM-SENSORS-MIB::lmVoltSensorsDevice.17 = STRING: CPU B core voltage
LM-SENSORS-MIB::lmVoltSensorsDevice.18 = STRING: DIMM Riser A cooked voltage
LM-SENSORS-MIB::lmVoltSensorsDevice.19 = STRING: DIMM Riser B cooked voltage
LM-SENSORS-MIB::lmVoltSensorsDevice.20 = STRING: CPU A core voltage
LM-SENSORS-MIB::lmVoltSensorsValue.16 = Gauge32: 1484
LM-SENSORS-MIB::lmVoltSensorsValue.17 = Gauge32: 1234
LM-SENSORS-MIB::lmVoltSensorsValue.18 = Gauge32: 11925
LM-SENSORS-MIB::lmVoltSensorsValue.19 = Gauge32: 11863

3. Data Query Debug Information

Code: Select all

+ Running data query [11].
+ Found type = '4 '[script query].
+ Found data query XML file at '/Library/WebServer/Documents/cacti-0.8.7b/resource/script_queries/lmsensors_temp.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /Library/WebServer/Documents/cacti-0.8.7b/scripts/netsnmp_lmsensors.php temperature 127.0.0.1, foobar, 3, foobar, pass***, MD5, pass***, DES, , 161, 5000 index'
+ Executing script query '/usr/bin/php -q /Library/WebServer/Documents/cacti-0.8.7b/scripts/netsnmp_lmsensors.php temperature 127.0.0.1, foobar, 3, foobar, pass***, MD5, pass***, DES, , 161, 5000 query sensorDevice'
+ Found item [sensorDevice='1'] index: 1
+ Found item [sensorDevice='2'] index: 2
+ Found item [sensorDevice='3'] index: 3
+ Found item [sensorDevice='4'] index: 4
+ Found item [sensorDevice='5'] index: 5
+ Found item [sensorDevice='6'] index: 6
+ Found item [sensorDevice='7'] index: 7
+ Found item [sensorDevice='8'] index: 8
+ Found item [sensorDevice='9'] index: 9
+ Found item [sensorDevice='10'] index: 10
+ Found item [sensorDevice='11'] index: 11
+ Found item [sensorDevice='12'] index: 12
+ Found item [sensorDevice='13'] index: 13
+ Found item [sensorDevice='14'] index: 14
+ Executing script query '/usr/bin/php -q /Library/WebServer/Documents/cacti-0.8.7b/scripts/netsnmp_lmsensors.php temperature 127.0.0.1, foobar, 3, foobar, pass***, MD5, pass***, DES, , 161, 5000 query sensorName'
+ Found item [sensorName='PSU1'] index: 1
+ Found item [sensorName='CPU B'] index: 2
+ Found item [sensorName='Ambient'] index: 3
+ Found item [sensorName='CPU A'] index: 4
+ Found item [sensorName='MCH'] index: 5
+ Found item [sensorName='Drive Bay'] index: 6
+ Found item [sensorName='PSU1'] index: 7
+ Found item [sensorName='CPU B'] index: 8
+ Found item [sensorName='CPU A'] index: 9
+ Found item [sensorName='Drive Bay'] index: 10
+ Found item [sensorName='CPU B'] index: 11
+ Found item [sensorName='CPU A'] index: 12
+ Found item [sensorName='Drive Bay'] index: 13
+ Found item [sensorName='Drive Bay'] index: 14
+ Found data query XML file at '/Library/WebServer/Documents/cacti-0.8.7b/resource/script_queries/lmsensors_temp.xml'
+ Found data query XML file at '/Library/WebServer/Documents/cacti-0.8.7b/resource/script_queries/lmsensors_temp.xml'
+ Found data query XML file at '/Library/WebServer/Documents/cacti-0.8.7b/resource/script_queries/lmsensors_temp.xml'
+ Found data query XML file at '/Library/WebServer/Documents/cacti-0.8.7b/resource/script_queries/lmsensors_temp.xml'
4. Error:

Code: Select all

/usr/bin/php -q /Library/WebServer/Documents/cacti-0.8.7b/scripts/netsnmp_lmsensors.php temperature 127.0.0.1, foobar, 3, foobar, pass***, MD5, pass***, DES, , 161, 5000 get sensorReading 1
FAILED -- no matching sensors were found
5. I am using tiger.tw's latest scripts:
Posted: Mon Jan 28, 2008 8:31 am Post subject: lmsensors via smpt and cacti 0.8.7a
So, data queries work, graphs are created, but "get sensorReading #" fails in netsnmp_lmsensors.php. what am I doing wrong? Can I please haz help, I am pulling my hairs here :D
chr05210084
Posts: 1
Joined: Thu May 08, 2008 8:38 pm

Help importing file:///home/sysad/Desktop/cacti-0.8.7a-netsn

Post by chr05210084 »

Please help I having error importing this file cacti_graph_template_sensors_ucdnet_lmsensors_fan_sensors_8x.xml, please check the error below. What do I need to do to fix the error? Please help. Im using cacti-0.8.7b, Debian etch, apache 2, php5.2.0.

Code: Select all

Import Results

Cacti has imported the following items:

GPRINT Preset
[success] Exact Numbers [update]

Graph Template
[success] Sensors - ucd/net - lmSensors - Fan Sensors (8x) [update]
   + Found 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) 
Thanks.
chewbacca156
Posts: 24
Joined: Tue Apr 04, 2006 7:17 am

Post by chewbacca156 »

Here is the solution to get multiple sources graph working (such as 8x -or less- thermals, voltages and fans) :
- In graph templates, select the template (8x thermals for exemple)
- In each Graph Item Input (Thermal Sensor 1, 2, etc...), tick the line AND gprints associated
- save and now smile watching your graphs ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest