ESX - How to enable SNMP ON VMWARE 6.7

During these days I had necessity to enable SNMP community on Cluster ESXi Server 6.7 U2.

Here they are steps that I did for each host:

  1. Enable SSH on each server.

  2. Through command line giving these commands:

    esxcli system snmp set --communities ruffinoro
    esxcli system snmp set --enable true

  3. Verify Firewall rules and enable traffic:

    esxcli network firewall ruleset set --ruleset-id snmp --allowed-all true
    esxcli network firewall ruleset set --ruleset-id snmp --enabled true

  4. To restrict IP access to SNMP community to a specific range you might use below commands:

    esxcli network firewall ruleset set --ruleset-id snmp --allowed-all false
    esxcli network firewall ruleset allowedip add --ruleset-id snmp --ip-address 10.155.0.0/16
    esxcli network firewall ruleset set --ruleset-id snmp --enabled true

  5. Start SNMP Service via GUI or command line:

    /etc/init.d/snmpd (re)start

  6. Be aware that snmp is case sensitive

  7. Disnable SSH on each server.