When you configure the vCenter Server SNMP agent for SNMP v1 and v2c, the agent supports sending notifications and receiving GET requests.

In SNMP v1 and v2c, community strings are namespaces that contain one or more managed objects. Namespaces can act as a form for authentication, but this does not secure the communication. To secure the communication, use SNMP v3.

Configure SNMP Communities

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

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.

Procedure

  1. Access the appliance shell and log in as a user who has the administrator or super administrator role.
    The default user with super administrator role is root.
  2. Run the snmp.set --communities command to configure an SNMP community.
    For example, to configure public, east, and west network operation center communities, run the following command:
    snmp.set --communities public,eastnoc,westnoc
    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.

Configure SNMP Agent to Send v1 or v2c Notifications

You can use the vCenter ServerSNMP agent to send virtual machine and environmental notifications to management systems.

To send SNMP v1 and v2c notifications with the SNMP agent, you must configure the target, that is the receiver, unicast address, community, and an optional port. If you do not specify a port, the SNMP agent sends notifications to UDP port 162 on the target management system by default.

Procedure

  1. Access the appliance shell and log in as a user who has the administrator or super administrator role.
    The default user with super administrator role is root.
  2. Run the snmp.set --targets command:
    snmp.set --targets target_address@port/community
    Here target_address, port, and community are the address of the target system, the port number to send the notifications to, and the community name, respectively. The port value is optional. If you do not specify a port, the default port,161, is used.

    Each time you specify a target with this command, the settings you specify overwrite all previously specified settings. To specify multiple targets, separate them with a comma.

    For example, run the following command for configuring the targets 192.0.2.1@678/targetcommunity and 2001:db8::1/anothercom:
    snmp.set --targets 192.0.2.1@678/targetcommunity,2001:db8::1/anothercom
  3. (Optional) If the SNMP agent is not enabled, enable it by running the snmp.enable command.
  4. (Optional) To send a test trap to verify that the agent is configured correctly, run the snmp.test command.
    The agent sends a warmStart trap to the configured target.