SNMP not working
Moderators: Developers, Moderators
SNMP not working
Hi!
Installed/configured and graphing avay with most of the predefined Data Sources execpt
I have a problem with SNMP and Cacti.
Snmpwalk and snmpget works as expected in console.
Data Source/Edit Data gives:
INTERNAL: [10.0.0.1/public] Interface: [1]
/usr/local/rrdtool-1.0.39/bin/rrdtool update /home/cacti/cacti/rra/c350.rrd --template c350 N:U
SNMP interfaces shows the host with the right info, while Refresh Interfaces produces nothing (expected behavior since this should update SQL table?)
View Gathered Interfaces shows no interfaces.
There are no error txt in the web interface. But when I try to run the same commands in console i get some numbers returned before the process exits (needs me to press enter to get exit process feedback.)
root@xxxx:/home/cacti/cacti-0.6.8a# php snmp_interfaces.php?id=1&PHPSESSID=074157d66ca292b3d2146ce568229c50
[1] 32376
root@xxxx:/home/cacti/cacti-0.6.8a# <Enter>
[1]+ Exit 255 php snmp_interfaces.php?id=1
(tried this as root, nobody(webuser) and cacti)
Cron printout shows no data for SNMP devices.
I've tried on several different boxes: Cisco 4000, Cisco 3500, Cisco 677, Cisco 350, Cisco 2600, HP 4000M, HP2424, HP2524 and a couple of more.
Now I'm really stuck. I don't know where to go and what looks like the most promising performance collector can't do anything for me
Using Slackware 8.1 but with compiled components (Apache, Php s.o)
php.log show nothing interesting when itry to run typically View Gathered Interfaces or Refresh interfaces
I'll be more than willing to test and post results and other information if anything else i needed to understand this behaviour.
Are there anyone out there that has experienced the same problems or can point me in the right direction? Is it cacti configuration, snmp-configuration, php compiling/configuration. Or anything else I can look into to solve this?
Mike
Installed/configured and graphing avay with most of the predefined Data Sources execpt
I have a problem with SNMP and Cacti.
Snmpwalk and snmpget works as expected in console.
Data Source/Edit Data gives:
INTERNAL: [10.0.0.1/public] Interface: [1]
/usr/local/rrdtool-1.0.39/bin/rrdtool update /home/cacti/cacti/rra/c350.rrd --template c350 N:U
SNMP interfaces shows the host with the right info, while Refresh Interfaces produces nothing (expected behavior since this should update SQL table?)
View Gathered Interfaces shows no interfaces.
There are no error txt in the web interface. But when I try to run the same commands in console i get some numbers returned before the process exits (needs me to press enter to get exit process feedback.)
root@xxxx:/home/cacti/cacti-0.6.8a# php snmp_interfaces.php?id=1&PHPSESSID=074157d66ca292b3d2146ce568229c50
[1] 32376
root@xxxx:/home/cacti/cacti-0.6.8a# <Enter>
[1]+ Exit 255 php snmp_interfaces.php?id=1
(tried this as root, nobody(webuser) and cacti)
Cron printout shows no data for SNMP devices.
I've tried on several different boxes: Cisco 4000, Cisco 3500, Cisco 677, Cisco 350, Cisco 2600, HP 4000M, HP2424, HP2524 and a couple of more.
Now I'm really stuck. I don't know where to go and what looks like the most promising performance collector can't do anything for me
Using Slackware 8.1 but with compiled components (Apache, Php s.o)
php.log show nothing interesting when itry to run typically View Gathered Interfaces or Refresh interfaces
I'll be more than willing to test and post results and other information if anything else i needed to understand this behaviour.
Are there anyone out there that has experienced the same problems or can point me in the right direction? Is it cacti configuration, snmp-configuration, php compiling/configuration. Or anything else I can look into to solve this?
Mike
This line:
Also, passing HTTP-like arguments to the PHP binary won't work, hence this command failing:
Assuming you have installed the ucd-snmp package, make sure cacti knows the full path to both of those binaries under 'cacti Settings'.
If you want to test your ucd-snmp installation, go to the console and type:
If everything is installed correctly, you should get back lots of stuff.
Tell me what you find.
-Ian
Tells me that cacti has the nessesary SNMP info (host, community, OID), but is not gathering the data./usr/local/rrdtool-1.0.39/bin/rrdtool update /home/cacti/cacti/rra/c350.rrd --template c350 N:U
Also, passing HTTP-like arguments to the PHP binary won't work, hence this command failing:
It sounds like cacti is not calling snmpwalk/snmpget correctly.php snmp_interfaces.php?id=1&PHPSESSID=074157d66ca292b3d2146ce568229c50
Assuming you have installed the ucd-snmp package, make sure cacti knows the full path to both of those binaries under 'cacti Settings'.
If you want to test your ucd-snmp installation, go to the console and type:
Code: Select all
snmpwalk 10.0.0.1 public .
Tell me what you find.
-Ian
Same problem here. I think I just fixed it.
Changed line 55 of include/snmp_functions.php from
to
No complaints from php cmd.php now, and the corrected syntax works on the command-line.
Changed line 55 of include/snmp_functions.php from
Code: Select all
$snmp_value = exec($config["path_snmpget"]["value"] . " $force_version $hostname '$community' $oid");
Code: Select all
$snmp_value = exec($config["path_snmpget"]["value"] . " -v 2c -c '$community' $hostname $oid");
Im getting a problem like this too...
When i try and get info from the eth0 this happens
--
Warning: No Response from 127.0.0.1 in /home/hostmaster/public_html/pingu.xilo.net/htdocs/cacti/include/snmp_functions.php on line 68
Warning: Variable passed to reset() is not an array or object in /home/hostmaster/public_html/pingu.xilo.net/htdocs/cacti/include/snmp_functions.php on line 71
Warning: Variable passed to key() is not an array or object in /home/hostmaster/public_html/pingu.xilo.net/htdocs/cacti/include/snmp_functions.php on line 71
Warning: No Response from 127.0.0.1 in /home/hostmaster/public_html/pingu.xilo.net/htdocs/cacti/include/snmp_functions.php on line 68
Warning: Variable passed to reset() is not an array or object in /home/hostmaster/public_html/pingu.xilo.net/htdocs/cacti/include/snmp_functions.php on line 71
Warning: Variable passed to key() is not an array or object in /home/hostmaster/public_html/pingu.xilo.net/htdocs/cacti/include/snmp_functions.php on line 71
Warning: Cannot add header information - headers already sent by (output started at /home/hostmaster/public_html/pingu.xilo.net/htdocs/cacti/include/snmp_functions.php:68) in /home/hostmaster/public_html/pingu.xilo.net/htdocs/cacti/snmp.php on line 64
When i try and get info from the eth0 this happens
--
Warning: No Response from 127.0.0.1 in /home/hostmaster/public_html/pingu.xilo.net/htdocs/cacti/include/snmp_functions.php on line 68
Warning: Variable passed to reset() is not an array or object in /home/hostmaster/public_html/pingu.xilo.net/htdocs/cacti/include/snmp_functions.php on line 71
Warning: Variable passed to key() is not an array or object in /home/hostmaster/public_html/pingu.xilo.net/htdocs/cacti/include/snmp_functions.php on line 71
Warning: No Response from 127.0.0.1 in /home/hostmaster/public_html/pingu.xilo.net/htdocs/cacti/include/snmp_functions.php on line 68
Warning: Variable passed to reset() is not an array or object in /home/hostmaster/public_html/pingu.xilo.net/htdocs/cacti/include/snmp_functions.php on line 71
Warning: Variable passed to key() is not an array or object in /home/hostmaster/public_html/pingu.xilo.net/htdocs/cacti/include/snmp_functions.php on line 71
Warning: Cannot add header information - headers already sent by (output started at /home/hostmaster/public_html/pingu.xilo.net/htdocs/cacti/include/snmp_functions.php:68) in /home/hostmaster/public_html/pingu.xilo.net/htdocs/cacti/snmp.php on line 64
That first hack only fixed polling a manually configured interface using "SNMP Data" instead of "SNMP network data".Mike- wrote:Tried the hack to snmp_interfaces.php but it still does not produce any output besides an empty list of interfaces.
No errors are produced when I choose View Interfaces or Refresh Interfaces.
Mike
However, since my first post, I believe I have fixed all issues with net-snmp v5.x. I'm going to clean up my patches, and respond back.
I started a new thread which contains a patch that should fix all net-snmp v5.x problems.
Blaine Kahle
blaine@binary.net
Blaine Kahle
blaine@binary.net
Who is online
Users browsing this forum: No registered users and 1 guest