Skip to content

Snmp_monitoring

This chapter covers SNMP (Simple Network Management Protocol) for network monitoring.


SNMP Versions
+------------------------------------------------------------------+
| |
| SNMPv1 - Original, security by community string |
| +------------------------------------------------------------+ |
| | Read-only and read-write communities | |
| +------------------------------------------------------------+ |
| |
| SNMPv2c - Like v1 with enhanced operations |
| +------------------------------------------------------------+ |
| | GetBulk, GetNext improvements | |
| +------------------------------------------------------------+ |
| |
| SNMPv3 - Secure version |
| +------------------------------------------------------------+ |
| | User-based (USM), View-based (VACM) | |
| | Authentication: MD5, SHA | |
| | Encryption: DES, AES | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+

Terminal window
# System
1.3.6.1.2.1.1.1.0 - sysDescr
1.3.6.1.2.1.1.3.0 - sysUpTime
1.3.6.1.2.1.1.5.0 - sysName
# Interface
1.3.6.1.2.2.1.1.2 - ifNumber
1.3.6.1.2.2.1.2.2 - ifDescr
1.3.6.1.2.2.1.10.2 - ifInOctets
1.3.6.1.2.2.1.16.2 - ifOutOctets
# CPU
1.3.6.1.4.1.2021.10.1.5.1 - laLoad.1 (5-min)
1.3.6.1.4.1.2021.10.1.6.1 - laLoad.2 (10-min)
# Memory
1.3.6.1.4.1.2021.4.5.0 - memTotalReal
1.3.6.1.4.1.2021.4.6.0 - memAvailReal
1.3.6.1.4.1.2021.4.11.0 - memTotalFree

Terminal window
# Walk all OIDs
snmpwalk -v2c -c public localhost
# Walk system OIDs
snmpwalk -v2c -c public localhost system
# Walk interface info
snmpwalk -v2c -c public localhost interfaces
# Get specific OID
snmpget -v2c -c public localhost sysUpTime.0
# Get multiple OIDs
snmpget -v2c -c public localhost sysUpTime.0 sysContact.0
Terminal window
# Get system description
snmpget -v2c -c public localhost sysDescr.0
# Get interface statistics
snmpget -v2c -c public localhost ifInOctets.1 ifOutOctets.1
# Get CPU load
snmpget -v2c -c public localhost laLoad.1

Terminal window
# /etc/snmp/snmpd.conf (snmpd.conf)
# SNMPv2c community
rocommunity public
rwcommunity private
# SNMPv3 user
createUser admin MD5 "mypassword" DES
rouser admin authPriv
# System location
syslocation "Data Center Rack 1"
syscontact admin@example.com
# Agent configuration
agentAddress udp:161
/etc/snmp/snmp.conf
# Default community
defCommunity public
# Default version
defVersion 2c

Terminal window
# Check CPU
check_cpu -w 80 -c 90
# Check memory
check_memory -w 80 -c 90
# Check disk
check_disk -w 20% -c 10% -p /
# Check load
check_load -w 1.5,1.2,1.0 -c 2.0,1.8,1.5
Terminal window
# Nagios/Icinga - Traditional monitoring
# Zabbix - Enterprise monitoring
# Prometheus - Metrics-based
# Grafana - Visualization
# Cacti - Graphing (RRDTool)
# Smokeping - Latency monitoring

In this chapter, you learned:

  • ✅ SNMP versions and security
  • ✅ Common OIDs
  • ✅ SNMP tools (snmpwalk, snmpget)
  • ✅ SNMP configuration
  • ✅ Network monitoring tools

In this part, you learned:

  • ✅ System logging (rsyslog, syslog-ng)
  • ✅ Logrotate for log management
  • ✅ System monitoring tools
  • ✅ Prometheus and Grafana
  • ✅ SNMP monitoring

Chapter 41: Backup Strategies and Concepts


Last Updated: February 2026