Simple Network Management Protocol (SNMP) allows management programs to monitor and control a variety of networked devices.
Managed systems run SNMP agents, which can provide information to a management program in at least one of these ways:
Management Information Base (MIB) files define the information that can be provided by managed devices. The MIB files contain object identifiers (OIDs) and variables arranged in a hierarchy.
vCenter Server and ESX/ESXi have SNMP agents. The agent provided with each product has differing capabilities.
Version | Supported Method | GET Request Support | Trap Support |
3.5 ESX Classic | net-snmp | yes | yes |
3.5 ESXi | embedded snmp | no | yes |
4.0 - ESXi and Classic | embedded snmp | yes | yes |
4.1 - ESXi and Classic | embedded snmp | yes | yes |
Version | Supported Method | GET Request Support | Trap Support |
2.5 vCenter | standard | no | yes |
4.0 vCenter | standard | no | yes |
4.1 vCenter | standard | no | yes |
This article has these sections:
ESX Server 3 ships with two SNMP agents. The first is an SNMP agent based on Net-SNMP with enhancements to support data specific to ESX Server 3. The second agent is identical to that which ships with ESX Server 3i, and can be used and configured in the same manner.
There are two methods of use:
To configure Net-SNMP to handle traps:
To configure Net-SNMP to handle GET requests:
See the section for vSphere 4.0 and 4.1. The instructions are the same.
ESX/ESXi includes an SNMP agent embedded in hostd that can both send traps and receive polling requests such as GET requests. This agent is referred to as the embedded SNMP agent.
Versions of ESX prior to ESX 4.0 included a Net-SNMP-based agent. You can continue to use this Net-SNMP-based agent in ESX 4.0 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.
By default, the embedded SNMP agent is disabled. To enable it, you must configure it using the vSphere CLI command vicfg-snmp. Also, there are no default/built-in community strings configured. For more information, see the vSphere Command-Line Interface Installation and Reference Guide.
Note: Configuration and use of the Net-SNMP-based agent is deprecated as of vSphere 4.0. Use of this method, if required, is not supported by VMware. Contact your monitoring software vendor or hardware vendor on their own best practices where needed. While this is not an officially-supported configuration, VMware publishes this document for assistance in utilizing Net-SNMP and the embedded agent together: Configuring the Net-SNMP Agent on ESX Hosts.
The VMware vSphere CLI (Windows or Linux) is required to configure SNMP as of vSphere 4.0. This tool is pre-installed in the vSphere Management Assistant and can be used as well.
These steps modify the configuration file /etc/vmware/snmp.xml.
Note: VMware does not recommend modifying this file by hand. Use the provided commands instead.
If it needs to be re-created, a default snmp.xml file looks like this:
You can configure embedded SNMP with the VMware vSphere CLI (Windows, Linux) or the VMware vSphere Management Assistant (vMA) (runs in a virtual machine).
You can obtain the vSphere CLI and vMA from our site.
To download the CLI, go to the VMware Download Center. Under the Drivers & Tools tab, expand Automation Tools and SDKs and then click the VMware vSphere CLI for your version of vSphere.
To download the vMA in .zip form, go to the VMware Download Center. Under the Drivers & Tools tab, click the VMware vSphere Management Assistant (vMA) for your version of vSphere.
To deploy the vMA from a URL, open the vSphere client and go to File > Deploy OVF template. Use this URL: http://www.vmware.com/go/importvma/vma4.ovfUse this syntax with the vicfg-snmp.pl script:
To send a test trap, from vMA or vSphere CLI, use this command:
vicfg-snmp.pl –server –username –password -T
Example: vicfg-snmp --server esx1-old --username root --password vmware -T
The output looks like this:
Sending test notification(trap) to all configured targets...
Complete. Check with each target to see if trap was received.
To test GET request functionality, from vMA or vSphere CLI, use this command:
snmpwalk -v -c
Example: snmpwalk -v 2c -c public esx1-old
After you have configured a vCenter Server system or an ESX/ESXi host to send traps, you must configure your management client software to receive and interpret those traps.
To configure your software, you must:
Refer to the documentation for your management system for specific instructions for these steps.
Note: It is important to import the MIBs in order. For more information, see the vSphere Administration Guides. Unless there is a typo in the MIB files themselves, the process for this is the responsibility of the monitoring software vendor.
Download the MIB files from the VMware Download Center. For more information, see SNMP MIB module file download (1013445).