Thursday, October 17, 2019

SNMP Configuration in VMware ESXi Host


Simple Network Management Protocol (SNMP) is an Internet Standard protocol for collecting and organizing information about managed devices on IP networks and for modifying that information to change device behavior.

Let's configure SNMP in VMware ESXi host for monitoring purpose. It's pretty straight forward steps to follow.

Step 1: Connect to ESXi Host via SSH


Step 2: Configure SNMP Community String and Enable Service on ESXi

#esxcli system snmp set --enable true
#esxcli system snmp set --communities Community_String

Step 3: Let's add Contact & Location

#esxcli system snmp set --syscontact sysadmin@mydomain.com
#esxcli system snmp set --syslocation "DC_DHK_BD_RACK1"



Step 4: Configure ESXi Firewall exclusion for SNMP and Allow Incoming Traffic

Allow incoming traffic from any host
#esxcli network firewall ruleset set --ruleset-id snmp --allowed-all true
#esxcli network firewall ruleset set --ruleset-id snmp --enabled true



Allow incoming traffic from specific host/network block. Lets assume 10.20.10.10 is our monitoring server
#esxcli network firewall ruleset set --ruleset-id snmp --allowed-all false
#esxcli network firewall ruleset allowedip add --ruleset-id snmp --ip-address 10.20.10.10/32
#esxcli network firewall ruleset set --ruleset-id snmp --enabled true




Step 5: Restart SNMP Service

#/etc/init.d/snmpd restart



Step 6: Verify SNMP Configuration

From ESXi Host
#esxcli system snmp get

From Monitoring Server
# snmpwalk –v 2c –c Community_String ESXi_Host_IP



Cheers J




No comments:

Restore Archived Log into VMware Aria Operations for Logs (formerly known as vRealize Log Insight - vRLI)

As we cannot keep all logs in searchable space in vRLI production system due to performance and slowness issue, it is always recommended to ...