Cacti sensors not working :(

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
CactiProblem
Posts: 9
Joined: Tue Feb 19, 2008 4:23 am

Cacti sensors not working :(

Post by CactiProblem »

I receive the following error:
02/19/2008 11:35:04 AM - SPINE: Poller[0] Host[31] DS[977] WARNING: Result from SNMP not valid. Partial Result: ...
Warning: Missing ar...
On the same host, I receive graph, with the exception of fan sensors and thermal sensors.

How can I solve that? I must say that on the host machine I have installed lmsensors and it's working...snmp also...
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

can you display the poller cache for that device ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
CactiProblem
Posts: 9
Joined: Tue Feb 19, 2008 4:23 am

Post by CactiProblem »

fmangeant wrote:Hi

can you display the poller cache for that device ?
Hello fmangeant,

What exactly would you like to see from poller cache?What should I paste in here?
Can you show me a pattern in here please?

Thank you.
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Go to system utilities -> view poller cache, and display the entries for that host.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
CactiProblem
Posts: 9
Joined: Tue Feb 19, 2008 4:23 am

Post by CactiProblem »

fmangeant wrote:Go to system utilities -> view poller cache, and display the entries for that host.
what.host.com - Fan Sensor - Case Fan Script: /usr/bin/php -q /var/www/cacti.anotherhost.com/htdocs/scripts/netsnmp_lmsensors.php fan what.host.com, littlebig, 1, , , 161, 400 get sensorReading 1
RRD: /var/www/cacti.anotherhost.com/htdocs/rra/what_host_com_sensorreading_605.rrd
what.host.com - Fan Sensor - CPU Fan Script: /usr/bin/php -q /var/www/cacti.anotherhost.com/htdocs/scripts/netsnmp_lmsensors.php fan what.host.com, littlebig, 1, , , 161, 400 get sensorReading 2
RRD: /var/www/cacti.anotherhost.com/htdocs/rra/what_host_com_sensorreading_606.rrd
what.host.com - Fan Sensor - fan3 Script: /usr/bin/php -q /var/www/cacti.anotherhost.com/htdocs/scripts/netsnmp_lmsensors.php fan what.host.com, littlebig, 1, , , 161, 400 get sensorReading 3
RRD: /var/www/cacti.anotherhost.com/htdocs/rra/what_host_com_sensorreading_607.rrd
what.host.com - Fan Sensor - fan5 Script: /usr/bin/php -q /var/www/cacti.anotherhost.com/htdocs/scripts/netsnmp_lmsensors.php fan what.host.com, littlebig, 1, , , 161, 400 get sensorReading 4
There is the poller cache from the sensor that's not working..
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Can you these commands by hand ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
CactiProblem
Posts: 9
Joined: Tue Feb 19, 2008 4:23 am

Post by CactiProblem »

Exactly, what commands are you talking about?

Tried like that:
# /usr/bin/php -q /var/www/cacti.hostname.com/htdocs/scripts/netsnmp_lmsensors.php fan cam.lib.com, community, 1, , , 161, 500 get sensorReading 1

Warning: Missing argument 9 for cacti_snmp_get(), called in /var/www/cacti.hostname.com/htdocs/scripts/netsnmp_lmsensors.php on line 304 and defined in /var/www/cacti.hostname.com/htdocs/lib/snmp.php on line 39

Warning: Missing argument 10 for cacti_snmp_get(), called in /var/www/cacti.hostname.com/htdocs/scripts/netsnmp_lmsensors.php on line 304 and defined in /var/www/cacti.hostname.com/htdocs/lib/snmp.php on line 39

Fatal error: Call to undefined function read_config_option() in /var/www/cacti.hostname.com/htdocs/lib/snmp.php on line 44
Last edited by CactiProblem on Tue Feb 19, 2008 9:12 am, edited 2 times in total.
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Code: Select all

/usr/bin/php -q /var/www/cacti.anotherhost.com/htdocs/scripts/netsnmp_lmsensors.php fan what.host.com, littlebig, 1, , , 161, 400 get sensorReading 1 
for example
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
CactiProblem
Posts: 9
Joined: Tue Feb 19, 2008 4:23 am

Post by CactiProblem »

fmangeant wrote:

Code: Select all

/usr/bin/php -q /var/www/cacti.anotherhost.com/htdocs/scripts/netsnmp_lmsensors.php fan what.host.com, littlebig, 1, , , 161, 400 get sensorReading 1 
for example
Yes, the output is upper...
CactiProblem
Posts: 9
Joined: Tue Feb 19, 2008 4:23 am

Post by CactiProblem »

Any ideas...?
sykosoft
Posts: 8
Joined: Tue Nov 06, 2007 6:26 pm
Contact:

Post by sykosoft »

CactiProblem wrote:Exactly, what commands are you talking about?

Tried like that:
# /usr/bin/php -q /var/www/cacti.hostname.com/htdocs/scripts/netsnmp_lmsensors.php fan cam.lib.com, community, 1, , , 161, 500 get sensorReading 1

Warning: Missing argument 9 for cacti_snmp_get(), called in /var/www/cacti.hostname.com/htdocs/scripts/netsnmp_lmsensors.php on line 304 and defined in /var/www/cacti.hostname.com/htdocs/lib/snmp.php on line 39

Warning: Missing argument 10 for cacti_snmp_get(), called in /var/www/cacti.hostname.com/htdocs/scripts/netsnmp_lmsensors.php on line 304 and defined in /var/www/cacti.hostname.com/htdocs/lib/snmp.php on line 39

Fatal error: Call to undefined function read_config_option() in /var/www/cacti.hostname.com/htdocs/lib/snmp.php on line 44
The fix:

Change lines 61, 62 (may be 62, 63) to this:

Code: Select all

        $arr_index = reindex(cacti_snmp_walk($hostname, $snmp_community, $oids["index"], $snmp_version, "", "", 161, 500, 0, SNMP_POLLER));
        $arr = reindex(cacti_snmp_walk($hostname, $snmp_community, $oids[$arg], $snmp_version, "", "", 161, 500, 0, SNMP_POLLER));
Also, add this as an include, under snmp.php at the top of the file::

Code: Select all

include_once(dirname(__FILE__) . "/../include/global.php");
Michael
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests