vCenter Server Appliance includes an Simple Network Management Protocol agent that can send trap notifications and receive GET, GETBULK, and GETNEXT requests. You can use the appliance shell API commands to enable and configure the Simple Network Management Protocol agent in vCenter Server appliance. You need to configure the agent differently depending on whether you want to use Simple Network Management Protocol v1/v2c or v3. Here we are discussing about configuring SNMP v1 agaent on VCSA 6.5.
In vSphere 6.0, SNMP v3 informs are not supported. The vCenter Server Appliance supports only notifications such as v1 and v2c traps, as well as v3 traps with all security levels.

To get the current Simple Network Management Protocol configuration of vCenter Server appliance 6.5,  Loging to the vCenter Server appliance using SSH and execute the below command


snmp.get

You will get the current configuration of Simple Network Management Protocol settings on VCSA 6.5. As of now, 
Nothing is configured and Simple Network Management Protocol is also not enabled.

Configure SNMP on vCenter Server appliance 6.5

Before enabling Simple Network Management Protocol on VCSA 6.5, We need to configure the Simple Network Management Protocol communities on the vCenter Server appliance 6.5. To Set the community for VCSA, Execute the below command


snmp.set --communities 

Example :  snmp.set --communities Management-server

Configure SNMP on vCenter Server appliance 6.5_2

We need to configure VCSA to send Simple Network Management Protocol trap data. To configure this, Execute the below command Trap server IP information. I have 2 Simple Network Management Protocol trap servers  (172.20.10.253 & 172.20.10.50). Simple Network Management Protocol uses the default UDP port 161 for general Simple Network Management Protocol messages and UDP port 162 for Simple Network Management Protocol trap messages.


snmp-set --targets server1-ip@162/communitystring,server2-ip@162/communitystring

Example:

snmp.set --targets 172.20.10.253@162/management-server,172.20.10.50@162/management-server


Configure SNMP on vCenter Server appliance 6.5_3

There are four levels of logging to choose from:  debug|info|warning|error  (“debug” has the highest level of verbosity, and “error” has the lowest). I will be configuring my logging level as “warning”. To set the logging level, Execute the below command


snmp.set --loglevel warning

Configure SNMP on vCenter Server appliance 6.5_4

Once the configuration is completed, We need to enable the Simple Network Management Protocol on the vCenter Server appliance using the below command


snmp.enable

Once you have configured and enabled the settings, Validate the configuration information using the below command
snmp.get

Configure SNMP on vCenter Server appliance 6.5_5

Once all the configuration is completed, You can send the test trap using the below command


snmp.test

You will see the “Sucess:True” if the Simple Network Management Protocol is configured correctly.

Configure SNMP on vCenter Server appliance 6.5_6