Install and Setup Net-SNMP for basic SNMP monitoring on Linux Unix and Raspberry Pi systems.
PURPOSE: Setup Net-SNMP to monitor status, CPU, memory and volumes such as /, /etc/ and other directories. This configuration will also allow to monitor processes running on the systems.
This is a basic configuration. Additional security such as locking to specific IPs and SNMPv3 is recommended.
- Start by updating the system, then installing snmpd
sudo apt-get update
sudo apt-get install snmpd
Modify the snmpd.conf file to setup the configuration to monitor your system from across the network. The configuration below allows anyone to read the SNMP data - you may want a more secure configuration. These are the barebones needed to start monitoring right away via SNMPv2:
- Open the snmpd.conf in your favorite editor
sudo nano /etc/snmp/snmpd.conf
- Change IP Binding
- Change the agentAddress from:
agentAddress udp:127.0.0.1:161
- Bind to all IP Addresses:
agentAddress 161
- Or to a specific IP:
agentAddress udp:127.0.0.1:161,udp:192.168.1.2:161
- Modify and set a Community String line:
rocommunity public
(without the initial #)
- Restart the SNMP deamon:
sudo /etc/init.d/snmpd restart