Monitor VMware ESXi Host Using LibreNMS

  • Configuring SNMP on VMware ESXi host
    Log in to the ESXi host with root user credentials. Once you have logged in, check the
    current SNMP configurations

    esxcli system snmp get



    Enable: false


    Hwsrc: indications

    Loglevel: info


    Port: 161

    You can start the configuration by setting the community string(s).

    #esxcli system snmp set –communities <community>


    esxcli system snmp set –communities actsupport

    Configure SNMP Port

    esxcli system snmp set –port 161

    Enable SNMP on the server

    esxcli system snmp set –enable true

    Set syscontact

    esxcli system snmp set –syscontact

    Set Server Location:

    esxcli system snmp set –syslocation US-RA0154

    Check SNMP firewall rules:

    esxcli network firewall get

    Default Action: DROP
    Enabled: true
    Loaded: true

    esxcli network firewall ruleset rule list | grep snmp

    snmp Inbound UDP Dst 161 161

    esxcli network firewall ruleset allowedip list | grep snmp

    snmp All

    Only if you want to limit the access to SNMP from the trusted subnets or IP addresses, you can set it as below:

    esxcli network firewall ruleset allowedip add –ruleset-id snmp –ip-address

    esxcli network firewall ruleset allowedip add –ruleset-id snmp –ip-address

    esxcli network firewall ruleset set –ruleset-id snmp –enabled true

    To allow from any source IP you can execute the below command:

    #esxcli network firewall ruleset set –ruleset-id snmp –allowed-all true

    To test whether the snmpd service is working fine, use the snmpwalk command on LibreNMS host:

    $ snmpwalk -v 1 -c actsupport <ESXi-host-ip>

    You will have to restart snmp service after making the changes:

    /etc/init.d/snmpd restart

    Add VMware ESXi host to LibreNMS
    Once you have completed the configuration of SNMP on ESXi hosts, you can start adding the hosts to LibreNMS for monitoring. LibreNMS provides you the ability to automatically add devices on your network using the Auto Discovery feature. All the discovery methods run when discovery runs every 6 hours by default and within 5 minutes for new devices.

Log in to reply