i am trying to set my snmp settings on my esx 3.5 boxes and gettting the eror after entering the following command:
snmpwalk -v 1 -c communitiy name hostname
the error is - Unknown Object Identifier (Sub-id not found: (top) -> gcdvvpvms01)
looking for the correct KB to configure my snmp.conf and commands
tx
Hi
Please check your firewall setting snmpd is working or not use
netstat -v -p othewise check firewall and open port for snmp
thanks
Have you started snmpd? I would first try to do the snmpwalk from the ESX host itself. If that works try from another host. If that fails it is most likely the firewall on the ESX server.
david
when running the netstat -v -p the state shows "not connected"
If you run
netstat -na
Do you see anything listening on port 161?
david
can't see any ports whaen running this comand (only flags,type, state,I-node, PID)
Here is the command and the output i get
netstat -na | grep 161
udp 0 0 0.0.0.0:161 0.0.0.0:*
Do you get that? If not you need to start SNMP.
service snmpd start
david
yes i get the same outpout
from the ESX host if you run the following command do you get any output? The below command is assuming you community string is set to public
snmpwalk -v 1 -c public localhost
If you do get a bunch of output then its probably your firewall. you could turn off your ESX firewall temporarily to test.
david
i already changed the snmp.conf to a difrent community name heres my snmp.conf look like:
Sample snmpd.conf containing VMware MIB module entries.*
This is a simple snmpd.conf that may help you test SNMP.*
It is not recommended for production use. Consult the*
snmpd.conf(5) man pages to set up a secure installation.*
syscontact root@localhost (edit snmpd.conf)
syslocation room1 (edit snmpd.conf)
rocommunity GCDV Servers
trapcommunity GCDV Servers
trapsink 10.195.202.60
VMware MIB modules. To enable/disable VMware MIB items*
add/remove the following entries.*
dlmod SNMPESX /usr/lib/vmware/snmp/libSNMPESX.so
also i noticed there is a snmpd.conf.esx file , but on vmware document they are saying to change the snmpd.conf and not the snmpd.conf.esx
also when running the snmpwalk -v 1 -c public localhost i am getting ' No responce from local host. already restarted snmpd twich and it is coming o.k.
not sure what is goin on..?
Usually that error means that you are community string is incorrect. Is that a space in your rocommunity? If it is that may be causing problems. Try removing the space and restart snmpd. here is my snmpd.conf
syscontact root@localhost
syslocation room1
rocommunity public
trapcommunity public
trapsink localhost
dlmod SNMPESX /usr/lib/vmware/snmp/libSNMPESX.so
when i run
snmpwalk -v 1 -c public localhost
it works great.
david