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
Authentication:
Communities:
Enable: false
Engineid:
Hwsrc: indications
Loglevel: info
Notraps:
Port: 161
Privacy:
Remoteusers:
Syscontact:
Syslocation:
Targets:
Users:
V3targets:
You can start the configuration by setting the community string(s).
#esxcli system snmp set –communities <community>
e.g
# 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 infrastructure@actsupport.com
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 192.168.3.10
# esxcli network firewall ruleset allowedip add –ruleset-id snmp –ip-address 192.168.1.0/24
# 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>
E.g
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.
If you need any assistance Contact Us. Our Technical Experts are ready to guide you through the steps.
Take a look on:
Troubleshooting ESXi hosts
Steps to Install LibreNMS on CentOS 8 / RHEL 8
Join us for the latest updates on Facebook, Twitter, LinkedIn