To enable the ESXi standalone SNMP agent to send and receive SNMP v1 and v2c messages, you must configure at least one community for the agent.

Before you begin

SNMP configuration for ESXi requires the ESXCLI command set. See Getting Started with vSphere Command-Line Interfaces for more information on how to access ESXCLI.

About this task

An SNMP community defines a group of devices and management systems. Only devices and management systems that are members of the same community can exchange SNMP messages. A device or management system can be a member of multiple communities.

If you use ESXCLI commands through vCLI, you must supply connection options that specify the target host and login credentials. If you use ESXCLI commands directly on a host using the ESXi Shell, you can use the commands as given without specifying connection options. For more information on connection options see vSphere Command-Line Interface Concepts and Examples.

Procedure

Type esxcli system snmp set --communities com1.

Replace com1 with the community name you want to set. Each time you specify a community with this command, the settings you specify overwrite the previous configuration. To specify multiple communities, separate the community names with a comma.

For example, to set the communities public and internal on a host, you might type esxcli system snmp set --communities public,internal.