ESX 5.1 has a new SNMP agent, supports SNMP version v1,v2,v3, is configured
by the esxcli command: esxcli system snmp get|set|test command. The arguments
to the command match those from vicfg-snmp and from the net-snmp command set.
A zip file containing all MIB modules for all versions of ESX back to 2.0
plus VC, etc can be found here:
http://communities.vmware.com/community/developer/forums/managementapi
This zip file is also available as well as with specific product downloads.
The zip file contains one special MIB module called the VMWARE-AGENTCAP-MIB
which provides a given version's specification. Look to this to see
what each version of ESXi software can support for a given MIB module.
For example
vmwESX51x AGENT-CAPABILITIES
PRODUCT-RELEASE
"5.1.x"
....
SUPPORTS SNMPv2-MIB
...
SUPPORTS IF-MIB
One can also poll the sysORTable to get a list of MIB modules the agent
supports.
$ snmpwalk -v3 -u joe sysORDescr
SNMPv2-MIB::sysORDescr.1 = STRING: SNMPv2-MIB, RFC 3418
SNMPv2-MIB::sysORDescr.2 = STRING: IF-MIB, RFC 2863
SNMPv2-MIB::sysORDescr.3 = STRING: IP-MIB, RFC 4293
SNMPv2-MIB::sysORDescr.4 = STRING: IP-FORWARD-MIB, RFC 4292
SNMPv2-MIB::sysORDescr.5 = STRING: UDP-MIB, RFC 4113
SNMPv2-MIB::sysORDescr.6 = STRING: TCP-MIB, RFC 4022
SNMPv2-MIB::sysORDescr.7 = STRING: ENTITY-MIB, RFC 4133
SNMPv2-MIB::sysORDescr.8 = STRING: IEEE8021-BRIDGE-MIB, REVISION 200810150000Z
SNMPv2-MIB::sysORDescr.9 = STRING: IEEE8021-Q-BRIDGE-MIB, REVISION 200810150000Z
SNMPv2-MIB::sysORDescr.10 = STRING: IEEE8023-LAG-MIB, REVISION 200706200000Z
SNMPv2-MIB::sysORDescr.11 = STRING: LLDP-V2-MIB, REVISION 200906080000Z
SNMPv2-MIB::sysORDescr.12 = STRING: HOST-RESOURCES-MIB, RFC 2790
SNMPv2-MIB::sysORDescr.13 = STRING: VMWARE-SYSTEM-MIB, REVISION 201008020000Z
SNMPv2-MIB::sysORDescr.14 = STRING: VMWARE-VMINFO-MIB, REVISION 201006220000Z
SNMPv2-MIB::sysORDescr.15 = STRING: VMWARE-RESOURCES-MIB, REVISION 200810150000Z
SNMPv2-MIB::sysORDescr.16 = STRING: VMWARE-CIMOM-MIB, REVISION 201008200000Z
SNMPv2-MIB::sysORDescr.17 = STRING: VMWARE-ENV-MIB, REVISION 201005120000Z
We can see that the ESXi 5.1 snmp agent supports current IETF and IEEE mib modules,
it isn't stuck in the past implementing RFC 1213 MIB2.
Both IPv4 and IPv6 protocol stacks are now monitorable in IP-MIB so full visibility into
ICMP messages, arp and nd tables, and along with the TCP/UDP mibs one can find the equivalent
of lsof/netstat -nap to trace an open port/connection back to the proces in the HOST-RESOURCES-MIB
hrSWRunTable.
For traditional and distributed virtual switches are not report in the IETF BRIDGE-MIB but instead in
the new IEEE IEEE8021-BRIDGE-MIB and IEEE8021-Q-BRIDGE-MIB.
These mib modules are indexed by ieee8021BridgeBaseComponentId
which allows for multiple vswitch instances. For distributed switches,
one can poll the ENTITY-MIB rfc 4133 an dmatch up the component
id to the DVSID across a set of ESXi systems.
snmpwalk -mall -v2c -c public 10.115.173.31 entLogicalTable
ENTITY-MIB::entLogicalDescr.1 = STRING: ieee8021BridgeBaseComponentId: 3, DVSID: 64 76 73 77 69 74 63 68-00 00 00 00 00 00 00 00
ENTITY-MIB::entLogicalType.1 = OID: IEEE8021-BRIDGE-MIB::ieee8021BridgeMib
ENTITY-MIB::entLogicalTAddress.1 = ""
ENTITY-MIB::entLogicalTDomain.1 = OID: TRANSPORT-ADDRESS-MIB::transportDomainUdpIpv4
as well as determine which instance of vCenter Server is managing a given
ESXi system.
Another nice feature of the entity mib is that OEM's can update the system to
point to the master SNMP agent to allow mgmt apps ability to discover the containment
relationship. Here's an example poll where after customizing the agent, it
would report IP address of the master agent.
Here we see two virtual switches, the vcenter server and a pointer to the hardware's
ipmi snmp agent for the hardware:
snmpwalk -mall -v2c -c public 10.115.173.31 entLogicalTable
ENTITY-MIB::entLogicalDescr.1 = STRING: VMware vCenter Server
ENTITY-MIB::entLogicalDescr.2 = STRING: ieee8021BridgeBaseComponentId: 2, DVSID: f3 ba 13 50 1b 49 b5 1c-27 e7 d4 af 3d a9 41 cf
ENTITY-MIB::entLogicalDescr.3 = STRING: ieee8021BridgeBaseComponentId: 3, DVSID: 71 9e 13 50 62 36 55 e3-32 3a 68 bd 68 81 5f 40
ENTITY-MIB::entLogicalDescr.4 = STRING: Some Master Management Agent on the hardware's supervisor card
ENTITY-MIB::entLogicalType.1 = OID: VMWARE-PRODUCTS-MIB::vmwVC
ENTITY-MIB::entLogicalType.2 = OID: IEEE8021-BRIDGE-MIB::ieee8021BridgeMib
ENTITY-MIB::entLogicalType.3 = OID: IEEE8021-BRIDGE-MIB::ieee8021BridgeMib
ENTITY-MIB::entLogicalType.4 = OID:VENDOR-SMI::vendorProducts
ENTITY-MIB::entLogicalTAddress.1 = STRING: "10.20.106.116"
ENTITY-MIB::entLogicalTAddress.2 = STRING: "10.17.68.212"
ENTITY-MIB::entLogicalTAddress.3 = STRING: "10.17.68.212"
ENTITY-MIB::entLogicalTAddress.4 = STRING: "192.0.2.1"
ENTITY-MIB::entLogicalTDomain.1 = OID: TRANSPORT-ADDRESS-MIB::transportDomainUdpIpv4
ENTITY-MIB::entLogicalTDomain.2 = OID: TRANSPORT-ADDRESS-MIB::transportDomainUdpIpv4
ENTITY-MIB::entLogicalTDomain.3 = OID: TRANSPORT-ADDRESS-MIB::transportDomainUdpIpv4
ENTITY-MIB::entLogicalTDomain.4 = OID: TRANSPORT-ADDRESS-MIB::transportDomainUdpIpv4
Support for SNMP GETS is most definitely back in ESXi 5.1