Looking at a ESX SSH CLI prompt can be a bit daunting for us folk who grew up with “Windows GUI’s”. One problem that I’ve often ran into in ESX monitoring from Third party utilities, is that the documentation and even terminology can be a bit confusing.
This is a simple straightforward way of configuring SNMP and trap forwarding to a Third Party monitoring utility.
Enable SSH in the ESX Host
- In Vcenter, select your host.
- Once the host is selected, click on the Configure tab
- Click Security Profile on the left menu
- Scroll down to Services and click Edit
- First check if SNMP is already configured:
#esxcli system snmp get
- If SNMP is not configured most settings will show blank. We will start by setting the community name (in this example we use public).
Note: SNMP community strings are case sensitive
# esxcli system snmp set -c public
- Configure the SNMP Agent to Send SNMP v1 or v2c Traps to your monitoring agent’s host IP using the following command: esxcli system snmp set –targets target_address@port/community.
Note: SNMP traps by default are sent on port 162
# esxcli system snmp set -t 10.0.157.180@162/public
- Enable the SNMP service on the ESX host
# esxcli system snmp set --enable true
- Verify SNMP is configured correctly via the GET command
# esxcli system snmp get
- Finally, end a test trap from your ESX host to the monitoring agent host
# esxcli system snmp test
At this point, you should be able to go to your monitoring agent software and check that the test trap is received.
Our next article will show how to configure and test a SNMPv3 trap. Stay tuned!