For SNMPv3 installation, see post SNMPv3 on Raspberry.
The Simple Network Management Protocol or SNMP is used for monitoring the state, hardware, software of a device. SNMP is so simple to enable, yet provides tons of information about the device.
To enable SNMP on a Raspberry Pi or any Linux in general, the SNMP services need to be installed first.
To install SNMP
sudo apt install -y snmpd snmp
The SNMP configuration need to be modify and to do this the SNMP instance need to be stopped first.
sudo systemctl stop snmpd
Edit the file
/etc/snmp/snmpd.conf and change the following
# These three lines are the default agentAddress udp:127.0.0.1:161 rocommunity public default -V systemonly rocommunity6 public default -V systemonly # I changed to these lines #agentAddress udp:127.0.0.1:161 agentAddress udp:10.0.11.161:161 # this is the wlan0 interface's ip address rocommunity SuPerSecr3t default -V systemonly #rocommunity6 public default -V systemonly
At this time, I don’t use IPv6, so I commented it out. I only enabled SNMP on
To test the SNMP, snmpwalk needs to be run
snmpwalk -v 2c -c SuPerSecr3t 10.0.11.161
For SNMPv3 check out the next week post.