VMware Cloud Community
Ita613
Contributor
Contributor

SNMP problems

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

Reply
0 Kudos
10 Replies
satishgte
Enthusiast
Enthusiast

Hi

Please check your firewall setting snmpd is working or not use

netstat -v -p othewise check firewall and open port for snmp

thanks

Reply
0 Kudos
COdlk
Hot Shot
Hot Shot

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

Reply
0 Kudos
Ita613
Contributor
Contributor

when running the netstat -v -p the state shows "not connected"

Reply
0 Kudos
COdlk
Hot Shot
Hot Shot

If you run

netstat -na

Do you see anything listening on port 161?

david

Reply
0 Kudos
Ita613
Contributor
Contributor

can't see any ports whaen running this comand (only flags,type, state,I-node, PID)

Reply
0 Kudos
COdlk
Hot Shot
Hot Shot

Here is the command and the output i get

  1. 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

Reply
0 Kudos
Ita613
Contributor
Contributor

yes i get the same outpout

Reply
0 Kudos
COdlk
Hot Shot
Hot Shot

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

Reply
0 Kudos
Ita613
Contributor
Contributor

i already changed the snmp.conf to a difrent community name heres my snmp.conf look like:

    1. Sample snmpd.conf containing VMware MIB module entries.*

    1. This is a simple snmpd.conf that may help you test SNMP.*

    1. It is not recommended for production use. Consult the*

    1. 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

    1. VMware MIB modules. To enable/disable VMware MIB items*

    1. 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..?

Reply
0 Kudos
COdlk
Hot Shot
Hot Shot

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

Reply
0 Kudos