How to Configure SNMP on Debian
Installing and configuring the SNMP agent on a Debian host — so Netmon can discover it, poll it, and graph it. It covers the simple v1/v2c community-string setup and the recommended SNMPv3 user, then hands off to adding the host in Netmon.
SNMP is the standard protocol Netmon uses to read a device’s health — CPU, memory, interfaces, uptime — so getting the agent answering on the host is the first step before you add it to your inventory. Netmon polls SNMP v1, v2c, and v3; this page shows both the simple community-string path and the more secure v3 path so you can pick the one that fits your network.
Configuration of your Linux server is your responsibility. Take care editing system configuration and don’t damage your servers — keep a copy of any file before you change it.
Install the SNMP daemon
The SNMP daemon, snmpd, is not installed by default. Install it first. As root (or with sudo):
apt-get update
apt-get install snmpd
Apt lists the packages it will pull in and asks you to confirm — press Enter (or type y) to continue. It downloads and installs the SNMP agent and its supporting libraries. When that finishes, you are ready to configure it.
Configure SNMP on Debian
Open the configuration file in a text editor:
nano /etc/snmp/snmpd.conf
Listen on the network, not just localhost
The first thing to change is near the top of the file, under AGENT BEHAVIOUR. By default snmpd listens only on the loopback address, so nothing off the box — including Netmon — can reach it. You want the agent to answer on all interfaces instead. Adjust the agentAddress lines so the loopback-only line is commented out and the all-interfaces line is active:
# AGENT BEHAVIOUR
#
# Listen for connections from the local system only
#agentAddress udp:127.0.0.1:161
# Listen for connections on all interfaces (both IPv4 and IPv6)
agentAddress udp:161,udp6:[::1]:161
In short: put a # in front of the udp:127.0.0.1:161 line to disable the localhost-only behavior, and make sure the udp:161,udp6:[::1]:161 line has no # so the agent listens on every interface.
Grant read-only community access
Further down the file, add a read-only community string for your internal networks. These rocommunity lines let Netmon read (never write) from the RFC 1918 private ranges. Add the ones that match your network:
rocommunity secret 10.0.0.0/8
rocommunity secret 172.16.0.0/12
rocommunity secret 192.168.0.0/16
Replace secret with a community string of your own, and narrow the CIDR ranges to the subnets your Netmon appliance actually polls from. Read-only (rocommunity) is exactly what Netmon needs — it never writes over SNMP, so there is no reason to grant a writable community.
Save and exit: in nano, press Ctrl+X to exit, type y to save, and press Enter to keep the filename.
Restart the agent
Restart snmpd so it picks up the new configuration. On modern Debian (11/12, and any systemd-based release):
systemctl restart snmpd
On a pre-systemd Debian release you would instead run /etc/init.d/snmpd restart. On any current release use systemctl as shown above.
That is all you need in most cases for v1/v2c monitoring. If the host sits on a trusted internal segment, a community string is often enough. For anything reachable off that trusted segment, use SNMPv3 instead.
Set up an SNMPv3 user (recommended)
SNMPv3 replaces the plaintext community string with a named user that authenticates and encrypts every request (authPriv). Netmon polls v3 just as readily as v1/v2c — you select the version when you add the device.
Net-SNMP creates a v3 user with a one-time createUser directive that the daemon consumes on its next start, converting it into a stored, hashed key. Stop the agent first, add the user, grant it read-only access, then start the agent again:
# 1. Stop the agent before adding a user
systemctl stop snmpd
# 2. In /var/lib/snmp/snmpd.conf, define the user
# createUser <name> <auth-proto> "<auth-pass>" <priv-proto> "<priv-pass>"
createUser netmonv3 SHA "AuthPassphrase" AES "PrivPassphrase"
# 3. In /etc/snmp/snmpd.conf, grant that user read-only access
rouser netmonv3 priv
# 4. Start the agent again — snmpd rewrites the createUser line
# into a stored key and removes the plaintext passphrases
systemctl start snmpd
A few notes on the pieces:
- Authentication and privacy protocols —
SHAfor authentication andAESfor encryption are the recommended modern choices. Use passphrases of at least eight characters. - The
rouseraccess level —privrequires both authentication and encryption (authPriv). The weaker levelsauth(authenticate only) andnoauth(neither) exist but are not recommended. - The
createUserline is one-shot — after you startsnmpdit is consumed and replaced by a hashedusmUserentry, so the plaintext passphrases no longer sit in the file. Keep the username, auth passphrase, and priv passphrase handy — you will enter them in Netmon.
Add the host in Netmon
With the agent answering, add the server to Netmon. In the web interface, open Device Import and click Add Device to open the three-step wizard:
- Basic Info — give the device a display label, enter its IP address, and choose the Linux via Net-SNMP profile (or Basic SNMP for a generic host).
- Connectivity — pick the SNMP version you configured above (v2c for a community string, or v3 for the user you created), enter the community string or the v3 user’s credentials, and click Test SNMP to confirm Netmon can reach the agent before you commit.
- Review & Tags — confirm the summary, apply any tags, and create the device.
Polling begins within moments; give the new device a few minutes to crawl and its graphs to populate. The full wizard, discovery ranges, and credential management are covered in Adding & Importing Devices.
This guide covers a Debian/Linux host. To enable SNMP, syslog, or NetFlow on a switch, router, or firewall, see the per-vendor steps in the Network Device Configuration Guide.