Undefined variable: snmp_value in /usr/src/cacti/lib/snmp.ph
Moderators: Developers, Moderators
Undefined variable: snmp_value in /usr/src/cacti/lib/snmp.ph
Hi,
Looking for some help here.
I installed this on: FreeBSD 4.7-RELEASE-p24
I have cacti running, but when I add a polling host I cant seem to get SNMP data returned.
On the top of the "Polling Hosts" page for the specific host I see
Notice: Undefined variable: snmp_value in /usr/src/cacti/lib/snmp.php on line 225
SNMP error
Also when I do a verbose query I get
+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/src/cacti/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
I have MRTG installed and if I do a simple "cfgmaker community@host" I get the correct data returned.
When I look at line 225 in /usr/src/cacti/lib/snmp.php I see that $snmp_value is the undefined value. Before I did some short order digging, but I thought it was prudent to ask here before I chase my tail to much
Oh, snmp versions on the FreeBSD machine are
# snmpget -V
NET-SNMP version: 5.0.9
# snmpwalk -V
NET-SNMP version: 5.0.9
Thank you in advance for any help
-bh
Looking for some help here.
I installed this on: FreeBSD 4.7-RELEASE-p24
I have cacti running, but when I add a polling host I cant seem to get SNMP data returned.
On the top of the "Polling Hosts" page for the specific host I see
Notice: Undefined variable: snmp_value in /usr/src/cacti/lib/snmp.php on line 225
SNMP error
Also when I do a verbose query I get
+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/src/cacti/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
I have MRTG installed and if I do a simple "cfgmaker community@host" I get the correct data returned.
When I look at line 225 in /usr/src/cacti/lib/snmp.php I see that $snmp_value is the undefined value. Before I did some short order digging, but I thought it was prudent to ask here before I chase my tail to much
Oh, snmp versions on the FreeBSD machine are
# snmpget -V
NET-SNMP version: 5.0.9
# snmpwalk -V
NET-SNMP version: 5.0.9
Thank you in advance for any help
-bh
-
- Posts: 22
- Joined: Fri Jan 17, 2003 1:24 am
You might have better results using PHP's SNMP module under Windows then trying to call snmpwalk or snmpget directly. I am pretty sure that you can compile net-snmp for Windows, but I have yet to test this. You can enable PHP's SNMP module by uncommenting 'extension=php_snmp.dll' in your php.ini file.
-Ian
-Ian
-
- Posts: 22
- Joined: Fri Jan 17, 2003 1:24 am
Where can you get a hold of snmpwalk/snmpget binaries for Windows by the way? I'll test Cacti with these binaries when I get the chance. Also, you can get around the 64-bit issue for a little while by increasing the polling interval of cmd.php. You can poll a max of about 113 mbit in 5 minutes using 32-bit counters, and can almost double this by increasing the interval to 3 minutes.
-Ian
-Ian
-
- Posts: 22
- Joined: Fri Jan 17, 2003 1:24 am
i got my binaries here a while ago......always worked perfect.
http://src.teras.net.id/?hid=snmp
used the ucd binaries ofcourse
problem is that at work i need the 64-bit counters for polling stm-1,stm-4 and gigabit interfaces. That worked great always. Problem is that we don't have a free unix-machine at the moment so windows always did the trick.
I always test the new cacti at home first at my windows server and got the snmp problems there so i didn't upgrade at work yet.
R.
http://src.teras.net.id/?hid=snmp
used the ucd binaries ofcourse
problem is that at work i need the 64-bit counters for polling stm-1,stm-4 and gigabit interfaces. That worked great always. Problem is that we don't have a free unix-machine at the moment so windows always did the trick.
I always test the new cacti at home first at my windows server and got the snmp problems there so i didn't upgrade at work yet.
R.
It seems that a change I made a while back (bug#102 - escaping community strings with apostrophes) is causing problems under Windows. It appears that the Windows ucd-snmp binary sees the apostrohpe as a regaular character rather than an escape character.
Can you try the following pre-patched file and see if it helps?
http://www.raxnet.net/downloads/cacti/p ... mp.php.txt
-Ian
Can you try the following pre-patched file and see if it helps?
http://www.raxnet.net/downloads/cacti/p ... mp.php.txt
-Ian
-
- Posts: 22
- Joined: Fri Jan 17, 2003 1:24 am
-
- Posts: 22
- Joined: Fri Jan 17, 2003 1:24 am
Who is online
Users browsing this forum: No registered users and 3 guests