lm_sensors & cacti 0.8.7a help

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

Moderators: Developers, Moderators

Post Reply
metalik
Posts: 8
Joined: Sat Dec 29, 2007 9:53 am

lm_sensors & cacti 0.8.7a help

Post by metalik »

I'm posting this because after some nights of trials & errors I didn't get the graphs to work. I followed the instructions found on this post here.
My actual problem is that I get
3) ucd/net - lmSensors - Fan Sensors (Verbose Query) Uptime Goes Backwards Success [0 Items, 0 Rows]
in the Associated Data Queries tab.

running manualy
php -q netsnmp_lmsensors.php <arguments> gets me all kind of errors ... begining with
PHP Notice: Undefined variable: config in /usr/share/cacti/lib/snmp.php on line 33. If I comment out that declaration then the errors continue through snmp.php and so on ...

my guess is that there are some code diferences and references that need fine tunning. I'm not so good with php coding so I'd like someone with greater experience to tune those scripts.

BTW: very very useful addons those lm_sensors scripts :)

edit:
my system: fedora 8,
cacti 0.8.7a
php-5.2.4-3
httpd-2.2.6-3
mysql-5.0.45-6.fc8
Turnipator
Posts: 4
Joined: Sun Dec 30, 2007 7:52 pm

Post by Turnipator »

I am getting this same thing, have not tried hacking the snmp.php though...
gartner
Posts: 1
Joined: Tue Jan 01, 2008 5:21 pm

Fixed

Post by gartner »

I've fixed the netsnmp_lmsensors.php to work with cacti 0.8.7
This is just a quick fix, mayby it's not correctly done, but it works for me :-)

It will, however, not work with anything less than cacti-0.8.7
Attachments
netsnmp_lmsensors.php.tar.gz
Works with 0.8.7
(2.65 KiB) Downloaded 334 times
Turnipator
Posts: 4
Joined: Sun Dec 30, 2007 7:52 pm

Post by Turnipator »

It did not work for me unfortunately.
Turnipator
Posts: 4
Joined: Sun Dec 30, 2007 7:52 pm

Post by Turnipator »

Ok after a few hours of refamiliarising myself with PHP I have managed to get the script working for me.

What I changed
- added include for include/global.php
- removed include for include/config.php (should not be needed)
- changed calls to 'cacti_snmp_get' (3 instances)
+ added 4 empty variables for - $auth_proto, $priv_pass, $priv_proto, $context

I think gartner's fix was correct, just not completed for all of the instances. So thanks Gartner.

I hope this helps.
Attachments
netsnmp_lmsensors.php.tgz
Fix for lmSensors
(2.65 KiB) Downloaded 521 times
metalik
Posts: 8
Joined: Sat Dec 29, 2007 9:53 am

Post by metalik »

CPU Fan results are awsome ! :) .. thanks a lot guys !

I'll work tomorrow on the voltage and temps graphs. Hope for the best :).
Turnipator
Posts: 4
Joined: Sun Dec 30, 2007 7:52 pm

Post by Turnipator »

Well I only graph the CPU and MB temp... both are working well again (yah!)
skysurfer
Posts: 15
Joined: Tue Aug 07, 2007 7:26 am

Post by skysurfer »

lm_sensors not working here too...

any suggestions? i tried both files and still no sensors found.
nightwisher
Posts: 12
Joined: Fri Sep 05, 2008 9:14 am
Location: Bosnia
Contact:

Post by nightwisher »

Also not work to me !

Error massage is :

Code: Select all

Error in data query.
Fixed this error data !

Right now i have this errors :

Code: Select all

Data Query [ucd/net - lmSensors - Fan Sensors]  	 Reload Associated Query
Fan Sensor Device 	Fan Sensor Name 	
Call to undefined function read_config_option() in /var/www/localhost/htdocs/cacti/lib/snmp.php on line 234	Call to undefined function read_config_option() in /var/www/localhost/htdocs/cacti/lib/snmp.php on line 234	
Missing argument 10 for cacti_snmp_walk(), called in /var/www/localhost/htdocs/cacti/scripts/netsnmp_lmsensors.php on line 259 and defined in /var/www/localhost/htdocs/cacti/lib/snmp.php on line 225	Missing argument 10 for cacti_snmp_walk(), called in /var/www/localhost/htdocs/cacti/scripts/netsnmp_lmsensors.php on line 259 and defined in /var/www/localhost/htdocs/cacti/lib/snmp.php on line 225	

Code: Select all

Data Query [ucd/net - lmSensors - Thermal Sensors] 	Reload Associated Query
Thermal Sensor Device 	Thermal Sensor Name 	
Call to undefined function read_config_option() in /var/www/localhost/htdocs/cacti/lib/snmp.php on line 234	Call to undefined function read_config_option() in /var/www/localhost/htdocs/cacti/lib/snmp.php on line 234	
Missing argument 10 for cacti_snmp_walk(), called in /var/www/localhost/htdocs/cacti/scripts/netsnmp_lmsensors.php on line 259 and defined in /var/www/localhost/htdocs/cacti/lib/snmp.php on line 225	Missing argument 10 for cacti_snmp_walk(), called in /var/www/localhost/htdocs/cacti/scripts/netsnmp_lmsensors.php on line 259 and defined in /var/www/localhost/htdocs/cacti/lib/snmp.php on line 225	

Code: Select all

Data Query [ucd/net - lmSensors - Voltage Sensors] 	Reload Associated Query
Voltage Sensor Device 	Voltage Sensor Name 	
Call to undefined function read_config_option() in /var/www/localhost/htdocs/cacti/lib/snmp.php on line 234	Call to undefined function read_config_option() in /var/www/localhost/htdocs/cacti/lib/snmp.php on line 234	
Missing argument 10 for cacti_snmp_walk(), called in /var/www/localhost/htdocs/cacti/scripts/netsnmp_lmsensors.php on line 259 and defined in /var/www/localhost/htdocs/cacti/lib/snmp.php on line 225	Missing argument 10 for cacti_snmp_walk(), called in /var/www/localhost/htdocs/cacti/scripts/netsnmp_lmsensors.php on line 259 and defined in /var/www/localhost/htdocs/cacti/lib/snmp.php on line 225
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests