Paessler Blog - All about IT, Monitoring, and PRTG

Installing the NET-SNMP daemon on Debian Linux

Written by Sascha Neumeier | Aug 7, 2006

Installing SNMP is the first step when preparing your systems for SNMP Monitoring.

In this article I'll show you how to do that on Debian Linux.

As soon as this service is installed and configured you can monitor system information like CPU load or memory usage on a Linux system using Paessler PRTG.

Enabling SNMP on Debian Linux

Below I’ll describe the necessary steps for a very basic configuration. This will allow unrestricted read-only access to ALL SNMP metrics available on the host. If your device is publicly available on the Internet, you should definitely use a stricter configuration or even look into SNMP V3 which includes encryption and authentication support. For that, you might want to check the official snmpd.conf documentation.

1. Prerequisites

All the steps below will require root access. Depending on the Debian version or configuration you can either use β€œsu -” to perform these steps as root or prepend sudo to each command (if your user is allowed to do sudo). The commands shown here assume that you're running them as root:

2. Installation of the SNMP daemon

First, install the SNMP daemon

apt-get install snmpd

3. Create a backup of the SNMP configuration file

You will now find the SNMP configuration in /etc/snmp/snmpd.conf. Make a backup of the original configuration file. This way you can always roll-back the original configuration file and start again if you made a mistake.

cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.orig

4. Adjust the configuration

Next, edit /etc/snmp/snmpd.conf and perform the changes below.

For the simplest possible configuration

  • Comment-out (using #) or simply delete all lines from the original file
  • Add the lines below and make sure they are not commented. If you don't use IPv6, you don't need to add the IPv6 setup.
# IPv4 setup
agentaddress udp:161
rocommunity public 0.0.0.0/0

# IPv6 setup
agentaddress udp6:161
rocommunity6 public ::/0

The line agentaddress udp:161 tells the SNMP Daemon to listen on UDP port 161 on every IPv4 interface. Thus, the Paessler PRTG probe or any other monitoring tool can query this device with SNMP on UDP Port 161 (default).

The line rocommunity public defines read-only (ro) community called "public", this is a very common community name and is also the default for a lot of network equipment.

iWhy rocommunity? Both SNMP v1 and SNMP v2c protocols are not encrypted. This means that anyone who sniffs this network traffic can also uncover the community string and if it is write-enabled exploit it to make changes on your system. Writable SNMP V1/V2c communities should be avoided at all costs.

5. Save changes and restart the snmpd service

Finally, save the changes to snmpd.conf. For the changes to take effect, restart the snmpd service.

service snmpd restart

These are the basic steps you have to do. You are now ready to query the system with the monitoring tool of your choice. 

For more details on how to set up SNMP on Linux, check our Paessler Knowledge Base πŸ‘‰ Checklist – Setting up SNMP on Linux.

To set up SNMP for other Linux distributions, don't miss our article πŸ‘‰ How to enable SNMP on your operating system

Monitor entire processes in Linux

After successfully setting up SNMP on Linux, you may soon want to monitor more than just CPU load or memory usage. We have also prepared an article for you that shows you how to monitor processes under Linux. Again, I recommend you visit our Knowledge Base πŸ‘‰ Monitoring processes in Linux.

Native Linux monitoring with Paessler Multi-Platform Probe

With Paessler PRTG version 21.4.73, we introduced the Paessler Multi-Platform Probe to extend the native monitoring capabilities on non-Windows platforms, for example Linux, Raspberry Pi, or NAS systems.

The Multi-Platform Probe is currently in alpha phase (see disclaimer below). You can install the Multi-Platform Probe on Linux systems (Ubuntu, Debian and Red Hat/CentOS), Docker and Windows.

Plus, you can also use it on single-board computers such as the Raspberry Pi as well as other ARM-based devices.

The Multi-Platform Probe is currently in alpha phase. Unexpected issues can occur. We do not recommend that you use the feature on your production system. Please also be aware that features are still missing and that the functionality is limited.

 

For a current overview of the limitations, refer to knowledge base article What is the Multi-Platform Probe and how can I use it?.

 

Nevertheless, it is very important for us to share the status with you as soon as possible, because you work with PRTG every day and we know how eagerly many of you have been waiting for a PRTG probe running on Linux & Co. ❀️

 

These early insights give you the opportunity to influence further development and feature implementation by giving us valuable feedback at an early stage of development.

 

To start monitoring your Linux systems with our Multi-Platform Probe I have this reading recommendation for you:

βœ”οΈ First steps with the new Paessler PRTG Multi-Platform Probe

βœ”οΈ How can I use the Multi-Platform Probe on Docker

πŸ”₯ In case you don't want to waste time, jump directly to the page What is the Multi-Platform Probe and how can I use it?.

After some introduction, chapter five, Download and installation, describes how to set up the probe on your computer.

We can’t wait to get your feedback!

Part of publishing the Multi-Platform Probe as an early alpha release is to get your valuable feedback. If you want to do us a favor, click the button below and share your feedback about our Multi-Platform Probe with us. ❀️