How to Configure SNMP on the vCenter Server Appliance 6.5

We were using Windows based vCenter server  and we were monitoring the disk space, Service status and resource usage such as memory & CPU. But Now VMware is pushing more and more to use vCenter server appliance by keeping important new features such as vCenter Native HA. We are all almost in the process of migrating our windows based vCenter server into vCenter Server appliance 6.5. So we need to learn the changes in monitoring capabilities from windows OS to Photon OS for vCenter Server appliance. In this article, I am going to explain how to configure Simple Network Management Protocol for vCenter Server appliance.

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 Simple Network Management Protocol v3. In this article, We will discuss 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.

Configuring SNMP for the vCenter Server Appliance 6.5

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

That’s it. We are done with configuring Simple Network Management Protocol on vCenter Server appliance 6.5. I hope this is informative for you. Thanks for Reading!!!. Be social and share it in social media, if you feel worth sharing it.