SNMPv3 on Ubuntu/Debian for PRTG Monitoring
1. Install
sudo apt update
sudo apt install -y snmp snmpd snmp-mibs-downloader libsnmp-dev
2. Create the SNMPv3 user (with snmpd stopped)
sudo systemctl stop snmpd
sudo net-snmp-create-v3-user -ro -A 'AUTH_PASS' -X 'PRIV_PASS' -a SHA -x AES snmp_user
-ro: read-only.-A/-a SHA: authentication password and algorithm.-X/-x AES: privacy (encryption) password and algorithm.- Passwords must be at least 8 characters.
3. Configure the agent
Back up /etc/snmp/snmpd.conf and replace its content with:
# SNMPv3 only - monitored by PRTG
agentAddress udp:SERVER_IP:161
rouser snmp_user authPriv
sysLocation Datacenter / rack
sysContact Admin <support@example.com>
sysName server-name
Don't put the passwords in this file: the user was already created in step 2.
In /etc/snmp/snmp.conf comment out the mibs : line so the tools load the downloaded MIBs.
4. Start and test
sudo systemctl enable --now snmpd
sudo ss -ulnp | grep 161
snmpwalk -v3 -l authPriv -u snmp_user -a SHA -A 'AUTH_PASS' -x AES -X 'PRIV_PASS' SERVER_IP system
If snmpwalk returns data, the agent is working.
5. Firewall
Allow only the PRTG server:
sudo ufw allow proto udp from PRTG_IP to any port 161
6. PRTG
In the device settings, Credentials for SNMP Devices:
- SNMP Version: v3
- Authentication Type: SHA
- User:
snmp_user - Password: the authentication password
- Encryption Type: AES
- Data Encryption Key: the privacy password
Then add the SNMP sensors (CPU, memory, disk, traffic).
Related: SNMPv3 on Fedora and PRTG file count sensor.