how to install SNMP service on Proxmox

https://www.librenms.org/
回覆文章
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

how to install SNMP service on Proxmox

文章 yehlu »

https://www.svennd.be/how-to-install-sn ... n-proxmox/

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
Test

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 !
回覆文章

回到「LibreNMS」