system monitoring with snmpd

tested on debian11

requirementsrequirements

in case there’s a firewall

udp/161     manager --> agent
udp/162     agent --> manager

agent install (snmpd)agent install (snmpd)

apt install snmpd
# snmptrapd
mv -i /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.dist
grep -vE '^[[:space:]]*(;|#|$)' /etc/snmp/snmpd.conf.dist > /etc/snmp/snmpd.conf.clean
grep -vE '^[[:space:]]*(;|#|$)' /etc/snmp/snmpd.conf.dist > /etc/snmp/snmpd.conf
vi /etc/snmp/snmpd.conf

syslocation some description
syscontact  Your Name <YOUR@EMAIL>

bind to all interfaces

agentaddress    udp:161

keep the views (what you are making available from the agent) and define a quick and dirty ACL (without com2sec)

view   systemonly  included   .1.3.6.1.2.1.1
view   systemonly  included   .1.3.6.1.2.1.25.1

rocommunity public snmp-manager -V systemonly

apply

systemctl restart snmpd

ready to goready to go

see snmp


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Licensed under MIT