|
|
| Author |
Message |
tbushnel
Joined: 21 Mar 2003 Posts: 15 Location: San Francisco
|
Posted: Fri Mar 21, 2003 11:04 am Post subject: Problems with snmp and cacti |
|
|
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 |
|
| Back to top |
|
 |
bulek Cacti Pro User
Joined: 20 May 2002 Posts: 852 Location: Poland
|
|
| Back to top |
|
 |
tbushnel
Joined: 21 Mar 2003 Posts: 15 Location: San Francisco
|
Posted: Fri Mar 21, 2003 2:25 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
bulek Cacti Pro User
Joined: 20 May 2002 Posts: 852 Location: Poland
|
Posted: Fri Mar 21, 2003 2:51 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
tbushnel
Joined: 21 Mar 2003 Posts: 15 Location: San Francisco
|
Posted: Fri Mar 21, 2003 10:18 pm Post subject: |
|
|
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.php?t=1332&highlight=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!! |
|
| Back to top |
|
 |
|