How to Enable SNMP on a Raspberry Pi (snmpd Setup)

Here’s how to enable SNMP on a Raspberry Pi so your monitoring system can poll it.

1. Install snmpd

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install snmpd -y
sudo apt-get install snmp -y

2. Edit snmpd.conf

To get it running, edit the configuration file:

sudo nano /etc/snmp/snmpd.conf

First, comment out this line so the agent doesn’t listen only on localhost:

#agentAddress  udp:127.0.0.1:161

Below the line #agentAddress udp:161,udp6:[::1]:161, add:

agentAddress udp:161

Then, below the line rocommunity public localhost, add a read-only community for your network (replace the subnet with your own):

rocommunity public 190.0.10.0/24

3. Restart the Service

sudo service snmpd restart

Related: enabling SNMP on VMware ESXi 6.5.

How to Install the Check_MK Agent on Debian Linux

Installing the Check_MK agent on Debian Linux takes just two steps. Replace %yourcheck_mk_server% with the address of your Check_MK server.

1. Install xinetd

The Check_MK agent requires xinetd:

apt-get install xinetd

2. Download and Install the Agent Package

Download the latest Check_MK agent installer from your Check_MK site and install it:

cd /tmp/
wget http://%yourcheck_mk_server%/download/check-mk-agent_***.deb
dpkg -i check*

On Red Hat or CentOS instead? See installing the Check_MK agent on Red Hat Linux.