Posted 13 January, 2017
In this guide I just install configure SNMP daemon on Proxmox. SNMP is used to read out the state of the machine, this includes CPU, network (-traffic, -settings,…), memory, … I can suggest LibreNMS, for the monitor. Back to setting SNMP daemon up !
Install the service
apt-get install snmpd
Config the service
I like to backup the original configuration (for documentation) :
mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.ori
Then I create the config file : /etc/snmp/snmpd.conf
# this create a SNMPv1/SNMPv2c community named "my_servers" # and restricts access to LAN adresses 192.168.0.0/16 (last two 0's are ranges) rocommunity my_servers 192.168.0.0/16 # setup info syslocation "rack 1, room 3, serverrroom" syscontact "Svenn" # open up agentAddress udp:161 # run as agentuser root # dont log connection from UDP: dontLogTCPWrappersConnects yes # fix for disks larger then 2TB realStorageUnits 0
If needed add an exception to the firewall :
iptables -A INPUT -s 192.168.0.0/16 -p udp --dport 161 -j ACCEPT
And start the service :
# debian starts services on install service snmpd restart
And enable by default :
update-rc.d snmpd enable
after that its time to test if the connection works from the server that is going to listen to the snmpd :
snmpwalk -c my_server -v1 servername SNMPv2-MIB::sysDescr.0
This should return something like :
SNMPv2-MIB::sysDescr.0 = STRING: Linux ...
That’s it, happy tracking !
If you enjoyed this article, please consider buying me a Dr Pepper.
Fuel the beast!
Buy me a Dr Pepper