How to install snmp service on proxmox ve

How to setup snmp service to let us to use librenms to moniting our proxmox ve healthy status is very important for us.

Install snmpd on proxmox ve

apt update
apt install -y snmpd

Configure snmpd.conf

  • backup original configuration file.

mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.backup

  • Create a new config file.
cat > /etc/snmp/snmpd.conf << EOF
# this create a  SNMPv1/SNMPv2c community named ""
# and restricts access to LAN adresses (last two 0's are ranges)
rocommunity OkayWorld
# setup info
syslocation  "rack 1, room 3, serverrroom"
syscontact  ""
# open up
agentAddress  udp:161
# run as
agentuser  root
# dont log connection from UDP:
dontLogTCPWrappersConnects yes
# fix for disks larger then 2TB
realStorageUnits 0

Firewall allow lan can access

iptables -A INPUT -s -p udp --dport 161 -j ACCEPT

Restart snmpd service to apply settings

systemctl restart snmpd


snmpwalk -c OkayWorld -v1 $servername$ SNMPv2-MIB::sysDescr.0


###1. error on subcontainer ‘ia_addr’ insert (-1) After systemd migration starting from Debian 9 Stretch, you need to change /lib/systemd/system/snmpd.service file, not /etc/default/snmpd file:

sed -i "s|-Lsd|-LS6d|" /lib/systemd/system/snmpd.service
systemctl daemon-reload
systemctl restart  snmpd