Dear visitor, in case we do not cover a topic you are looking for, then feel free to ask in our freshly created forum for IT-professionals for a solution. We hope our visitors can help you out with your questions. Have a good one. ~ Tom.

How to enable SNMP on a VMware ESXi hypervisor & vCenter appliance

SNMP can be fully configured on an ESXi hypervisor through the ESX CLI. The commands vary between different versions of ESXi.

How to enable SNMP on ESXi 5.0

  1. You will need access to the vSphere CLI. If you don’t have the vSphere CLI installed, download it from the VMware support website.
  2. Execute the following commands. Replace YOUR_STRING with your desired community string. your_username and your_password correspond to your vSphere username and password, respectively.
  3. # vicfg-snmp.pl --server hostname --username your_username --password your_password -c YOUR_STRING
    # vicfg-snmp.pl --server hostname --username your_username --password your_password -p 161
    # vicfg-snmp.pl --server hostname --username your_username --password your_password --enable

How to enable SNMP on ESXi 5.5

  1. SSH / Telnet to your ESXi node using root-level credentials.
  2. Execute the following commands. Replace YOUR_STRING with your desired community string.
    # esxcli system snmp set --communities YOUR_STRING
    # esxcli system snmp set --enable true
    # esxcli network firewall ruleset set --ruleset-id snmp --allowed-all true
    # esxcli network firewall ruleset set --ruleset-id snmp --enabled true
    # /etc/init.d/snmpd restart

How to enable SNMP on ESXi 6.x

  1. SSH / Telnet to your ESXi node using root-level credentials.
  2. Execute the following commands. Replace YOUR_STRING with your desired community string.
    # esxcli system snmp set -r
    # esxcli system snmp set -c YOUR_STRING
    # esxcli system snmp set -p 161
    # esxcli system snmp set -L "City, State, Country"
    # esxcli system snmp set -C noc@example.com
    # esxcli system snmp set -e yes
    # esxcli network firewall ruleset set --ruleset-id snmp --allowed-all true
    # esxcli network firewall ruleset set --ruleset-id snmp --enabled true
    # /etc/init.d/snmpd restart
    # esxcli system snmp set --enable true
    # esxcli system snmp get

How to enable SNMP on vCenter 6.x

  1. SSH / Telnet to your vCenter node using root-level credentials.
  2. Execute the following commands. Replace YOUR_STRING with your desired community string.
    # snmp.set --communities YOUR_STRING,ANOTHER_STRING
    # snmp.set --syslocation YOUR_LOCATION
    # snmp.set --syscontact noc@example.com
    # snmp.enable
    # snmp.get
    # shell
    # service snmpd restart
    # exit

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.