Enable SNMP on a Raspberry Pi

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install snmpd -y
sudo apt-get install snmp -y
sudo nano /etc/snmp/snmpd.conf
To get it running, you will need to modify the sudo nano /etc/snmp/snmpd.conf file:

First, I commented out this line:

#agentAddress udp:

and below the line ‘#agentAddress udp:161,udp6:[::1]:161′ I added:

agentAddress udp:161

then below this line:

rocommunity public localhost

I added:

rocommunity public

Finally, restart the service:

service snmpd restart

How to Enable SNMP ESXi 6.5

Open your favorite (Putty) ssh application and connect to your ESX host and then run the following commands:

esxcli system snmp set –communities public
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

The –ruleset should be a dash dash not a bar, same with the –allowed and –enabled; I don’t know why WordPress does that.