I've been unable to get snmp to work with cacti. If I try to pull an OID from a remote server via snmpwalk I have no problems, but via cmd.php I get no response from the server. I suspect something to do with php's snmp vs net-snmp, but I can't figure it out.
I'm using UCD-snmp version: 4.2.5 and PHP 4.3.0. Unfortunately, I don't know much about php's snmp so I don't even know where to begin. Is it configured separately from net-snmp? Any assistance would be greatly appreciated even if it's reference to another posting - I did dig around before posting this message so as not to waste anyone's time, but I've had no luck thus far. thanxx in advance....
~tmb
Problems with snmp and cacti
Moderators: Developers, Moderators
Cacti can use both built-in and external snmp support (with ucd-snmp). Here you can read how to change it:
http://www.raxnet.net/board/viewtopic.p ... ernal+snmp
Also standard cacti installation has problems with php 4.3.x. More info on fixing them here:
http://www.raxnet.net/board/viewtopic.php?t=1228
- bulek
http://www.raxnet.net/board/viewtopic.p ... ernal+snmp
Also standard cacti installation has problems with php 4.3.x. More info on fixing them here:
http://www.raxnet.net/board/viewtopic.php?t=1228
- bulek
Thanks for the suggestions - Unfortunately, I made the suggested changes, but no change.
The complete failure of snmp within this app makes me wonder if I've configured something incorrectly. To get things up and running I have cacti running under the webserver user which is NOBODY. Because of this I'm unable to test how things work from that user's perspective because nobody does not have a shell. I was able to do sudo -u nobody snmpget -c community .1.3.6.1.4.1.2021.10.1.5.1 and get the cpu utilization from the server. No such luck through cacti though.
Redirecting the crontab output to a file yields:
Timeout: No Response from sfodtiapp001.demandtec.net.
This is usually indicative of an incorrect oid or community string, but I've verified everything via command line so I'm lost. Any suggestions would be appreciated.
The complete failure of snmp within this app makes me wonder if I've configured something incorrectly. To get things up and running I have cacti running under the webserver user which is NOBODY. Because of this I'm unable to test how things work from that user's perspective because nobody does not have a shell. I was able to do sudo -u nobody snmpget -c community .1.3.6.1.4.1.2021.10.1.5.1 and get the cpu utilization from the server. No such luck through cacti though.
Redirecting the crontab output to a file yields:
Timeout: No Response from sfodtiapp001.demandtec.net.
This is usually indicative of an incorrect oid or community string, but I've verified everything via command line so I'm lost. Any suggestions would be appreciated.
You may want to check your real snmp package version. Looking at your test I can see you are using "-c community" to specify community. In your initial post you mention net-snmp package which requires this form. Cacti however defaults to use ucd-snmp form like: "snmpget IP community OID". Anyway it does not work with net-snmp without some changes.
You can also check apache error_log file for some messages coresponding to your problem.
- bulek
You can also check apache error_log file for some messages coresponding to your problem.
- bulek
You're definitely on to something. I tried snmpget using the same format that cacti uses (no -c for community) and it did NOT work. I specifically avoided net-snmp, opting instead for the version that still said ucd-snmp, to avoid such a problem, but I guess to no avail.
Anyway, I tried applying the net-snmp patch to resolve the problem. I followed the instructions provided (http://www.raxnet.net/board/viewtopic.p ... ht=netsnmp)
Unfortunately, I couldn't get it to work. I dug in a bit and noticed that the if/then statement in the snmp_functions that I was supposed to change checked to see if version was net-snmp 5, which mine is NOT so it continued to use the old snmpwalk syntax. I ammended it so it ran the new syntax regardless and now it's collecting data. I really appreciate you putting me in the right direction on this!!
Anyway, I tried applying the net-snmp patch to resolve the problem. I followed the instructions provided (http://www.raxnet.net/board/viewtopic.p ... ht=netsnmp)
Unfortunately, I couldn't get it to work. I dug in a bit and noticed that the if/then statement in the snmp_functions that I was supposed to change checked to see if version was net-snmp 5, which mine is NOT so it continued to use the old snmpwalk syntax. I ammended it so it ran the new syntax regardless and now it's collecting data. I really appreciate you putting me in the right direction on this!!
Who is online
Users browsing this forum: No registered users and 0 guests