Configure SNMP on Proxmox VE

Install snmpd on a Proxmox host, give it a minimal read-only configuration limited to one monitoring server, and start it at boot.

Contents

SNMP (Simple Network Management Protocol) lets a monitoring system read a host’s CPU usage, network traffic, memory and more. This is how I set up the SNMP daemon on Proxmox.

Install snmpd

apt-get install -y snmpd

Keep the original configuration

The configuration below replaces the default file entirely, so move the original aside first:

mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak

Write the configuration

This creates a read-only community called MYSNMP, allows only the monitoring server at 10.10.10.1 to use it, and sets some basic system information. Copy the whole block, from cat << to EOF:

cat << EOF > /etc/snmp/snmpd.conf

# This file will create a read-only community called "MYSNMP"
# and restricts access to address 10.10.10.1
rocommunity MYSNMP 10.10.10.1
syslocation "Bern, Switzerland"
syscontact  "John Doe"
agentAddress  udp:161
agentuser  root
dontLogTCPWrappersConnects yes
realStorageUnits 0


EOF

Change the community name, the allowed address, the location and the contact to your own.

Start the service and enable it at boot

service snmpd restart
update-rc.d snmpd enable

The host now answers SNMP queries from your monitoring server.

Join the discussion

Comments are hosted on comments.vciso.ch, a server I run myself. Nothing is loaded from it until you press the button below. Loading comments connects your browser to that server, and signing in with GitHub sets a cookie there. See the privacy page for details.

Type to search.

↑ ↓ to move, Enter to open, Esc to close