Sunday, 12 October 2025

 SNMP Monitoring of Linux Machines

Download and install SNMP -  

sudo apt update
sudo apt install snmpd snmp

Edit your SNMP configuration file - 

sudo nano /etc/snmp/snmpd.conf


Example - 

# SNMP community string and access settings
com2sec readonly  [IP Address of SNMP Poller] [insert clever string here]
group MyROGroup v2c readonly view all    included  .1      80
access MyROGroup ""      any   noauth    exact  all    none   none

# setup info
syslocation [Location string]
syscontact  Me <example@email.address>

# open up
agentAddress  udp:161

# run as
agentuser  root

# dont clog the local logs with "connection from UDP..." messages:
dontLogTCPWrappersConnects yes

# fix for disks larger then 2TB
realStorageUnits 0

#Distro Detection
extend distro /usr/bin/distro


Restart or start SNMPD and ensure that it's set to run at startup -

systemctl restart snmpd
systemctl enable snmpd

No comments:

Post a Comment