VMware Cloud Community
joeyzhang
Contributor
Contributor

No trap in VMWARE-TRAPS-MIB.mib is sent by ESX Server 3.5

Hello, having some problems on enabling snmp trap in VMWARE-TRAPS-MIB.mib on my ESX Server 3.5.

Installed Software:

VMWare Virtual Center Version 2.5.0 Build 104215

VMWare ESX Server 3.5.0.82663

net-snmp-libs-5.0.9-2.30E.23

net-snmp-utils-5.0.9-2.30E.23

net-snmp-5.0.9-2.30E.23

I had followed the Basic System Administration Guide to enable the snmp service on my ESX Server 3.5.

The VMware MIB modules had been add into the snmpd.conf as below:

"dlmod SNMPESX /usr/lib/vmware/snmp/libSNMPESX.so"

The firewall also had been opened for the snmpd as below:

"esxcfg-firewall -e snmpd"

And then I restarted the snmp service: "service snmpd start", the log looks fine:

OCt 6 23:37:13 abesxit01 snmpd: snmpd startup succeeded

Oct 6 23:37:14 abesxit01 snmpd[5223]: SNMPVMInfo: Initialized.

Oct 6 23:37:14 abesxit01 snmpd[5223]: SNMPVMNet: Initialized.

Oct 6 23:37:14 abesxit01 snmpd[5223]: SNMPVMDisk: Initialized.

Oct 6 23:37:14 abesxit01 snmpd[5223]: SNMPVMFloppyCD: Initialized.

Oct 6 23:37:14 abesxit01 snmpd[5223]: SNMPResMem: Initialized.

Oct 6 23:37:14 abesxit01 snmpd[5223]: SNMPResCPU: Initialized.

Oct 6 23:37:14 abesxit01 snmpd[5223]: SNMPResDisk: Initialized.

Oct 6 23:37:14 abesxit01 snmpd[5223]: SNMPResNet: Initialized.

Oct 6 23:37:14 abesxit01 snmpd[5223]: SNMPESX: Initialized.

Oct 6 23:37:14 abesxit01 snmpd[5223]: SNMPSystem: Initialized.

Oct 6 23:37:15 abesxit01 snmpd[5223]: SNMPVmodl: Initialized

Oct 6 23:37:15 abesxit01 snmpd[5223]: NET-SNMP version 5.0.9

Oct 6 23:44:45 abesxit01 snmpd[5223]: SNMPVmodl: start refreshing cache...

Oct 6 23:44:45 abesxit01 snmpd[5223]: SNMPVmodlRefreshCache: Examining 6 VMs found.

Oct 6 23:44:47 abesxit01 snmpd[5223]: SNMPVmodl: refreshing cache completed.

And then I can receive the snmp cold start trap:

Agent Up with Possible Changes (coldStart Trap)

enterprise:.1.3.6.1.4.1.8072.3.2.10 (.1.3.6.1.4.1.8072.3.2.10) args(1):.1.3.6.1.6.3.1.1.4.3.0=".1.3.6.1.4.1.8072.3.2.10"

And I can also use "snmpwalk" to get the SNMP data about the VM mib:

SNMPv2-SMI::enterprises.6876.1.1.0 = STRING: "VMware ESX Server"

SNMPv2-SMI::enterprises.6876.1.2.0 = STRING: "3.5.0"

SNMPv2-SMI::enterprises.6876.1.3.0 = OID: SNMPv2-SMI::enterprises.6876.60.1.3.5.0

SNMPv2-SMI::enterprises.6876.1.4.0 = STRING: "82663"

.......

But tried to: power on, power off, suspend a linux VM host that is running on this ESX Server 3.5 from my VMWare Virtual Center Version 2.5.0.

And no trap is sent by EXS server 3.5, even though I use tcpdump to listen to the port and no trap package is caught.

Also there is no snmpd information in the log file.

Where to check further?

Thanks,

Joey

Tags (1)
0 Kudos
5 Replies
java_cat33
Virtuoso
Virtuoso

Have you compiled the mibs on your SNMP management server (HP SIM or whatever you use?). There are also a couple of mibs for VirtualCenter. The traps are sent from your VirtualCenter server, not from the ESX server.

Have you configured the SNMP settings within VC and set snmp trap based alarms?

The only traps sent from the ESX host are hardware related etc.

0 Kudos
joeyzhang
Contributor
Contributor

As I know, there are 6 types of trap in the VMWARE-TRAPS-MIB.mib.

vmPoweredOn, vmPoweredOff,vmHBLost,vmHBDetected,vmSuspended, these 5 types of trap are ESX Server Traps, and they will be sent from the ESX server.

vpxdTrap, Only this type of trap is Virtual Center Server trap. Only this trap is sent by the Virtual Center Server.

Right now I want to test the vmPoweredOn,vmPoweredOff from the ESX Server.

But when I powered on/off a linux VM host that is running on this ESX Server 3.5. There is no trap sent from the EXS server 3.5.

And also we use OpenNMS to receive the trap. I don't think this is the business of our SNMP management server.

Because I use tcpdump to listen to the port on my ESX server. But we can't catch any trap when we powered off/on a linux VM host on the ESX server.

0 Kudos
java_cat33
Virtuoso
Virtuoso

Did you configure the alarms within VC so if a VM is powered off for example an snmp trap is sent?

0 Kudos
joeyzhang
Contributor
Contributor

Seems like this should not be the business of VC. When we configure the alarms in VC, the VC trap vpxdTrap I mentioned above will be sent from the VC server.

But what I want is the vmPoweredOn or vmPoweredOff trap which should be sent from the ESX server. Even if we don't have the VC and power on/off using the command directly on the ESX server, the vmPoweredOn or vmPoweredOff trap also should be sent from the ESX server.

Seems like this guy has the same problem with me on the ESX server 3.0.2: http://communities.vmware.com/thread/172678?tstart=0

Thanks,

Joey

0 Kudos
stm_cro
Contributor
Contributor

Hello Joey,

Somehow, it looks like you right : I am reveiving trap (powe on/off, heartbeat) from esx server but I didn't configure anything specifically.

First I did install HPSIM client, and as a part of the instalation there is snmpd configugation which you can do manually. Check you have at least this line in /etc/snmpd.conf.

trapcommunity public

trapsink hpsim.server.ip.address

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

  2. add/remove the following entries.

dlmod SNMPESX /usr/lib/vmware/snmp/libSNMPESX.so

make sure snmpd is started and esx firewall allow snmptrap out

Finally, on HPSIM, either insert VMware MIBS or allow unknown trap(option menu, event, filter events : Accept unregistered events )

let me know if you need information on how to join Vmware MIBS in HPSIM.

S

0 Kudos