Setting Up SNMP

Simple Network Management Protocol (SNMP) allows management programs to monitor and control networked devices. vCenter Server and ESXi systems include different SNMP agents:

  • The SNMP agent included with vCenter Server can send traps when the vCenter Server system is started or when an alarm is triggered on vCenter Server. The vCenter Server SNMP agent functions only as a trap emitter and does not support other SNMP operations such as GET.
  • ESXi 4.0 includes an SNMP agent embedded in the host daemon (hostd) that can send traps and receive polling requests such as GET requests.

Versions of ESX released before ESX/ESXi 4.0 included a Net-SNMP-based agent. You can continue to use this Net-SNMP-based agent in ESX 4.x with MIBs supplied by your hardware vendor and other third-party management applications. However, to use the VMware MIB files, you must use the embedded SNMP agent. To use the NET-SNMP based agent and embedded SNMP agent at the same time, make one of the agents listen on a nondefault port. By default, both agents use the same port.

The SDK supports SNMP agent configuration through the HostSnmpSystem managed object. This object includes two methods, ReconfigureSnmpAgent and SendTestNotification.

  • HostSnmpSystem.ReconfigureSnmpAgent allows you to specify agent properties through a HostSnmpConfigSpec. That data object allows you to specify the SNMP port, read only communities, and the trap targets in an HostSnmpDestination object. The HostSnmpDestination object allows you to specify the community, and a host and port listening for notification.
  • HostSnmpSystem.SendTestNotification allows you to test your configuration.

A HostSnmpSystemAgentLimits data object in the HostSnmpSystem.limits property specifies limits of the agent.