SNMP Deep Dive: From OID to Dashboard
SNMP (Simple Network Management Protocol) is the backbone of network monitoring. Understanding it deeply unlocks full visibility into any network device.
SNMP Versions
| Version | Security | Use Case |
|---|---|---|
| v1 | Cleartext | Legacy only |
| v2c | Cleartext community | Most monitoring |
| v3 | AuthPriv (AES+SHA) | Production |
Walking the MIB Tree
BASH
# Install tools
apt install snmp snmp-mibs-downloader
# Walk entire device MIB
snmpwalk -v2c -c public 192.168.1.1
# Get specific OID (CPU on MikroTik)
snmpget -v2c -c public 192.168.1.1 .1.3.6.1.4.1.14988.1.1.3.14.0
# Walk interface table
snmpwalk -v2c -c public 192.168.1.1 IF-MIB::ifTableImportant OIDs
TEXT
# Standard MIB-2
sysDescr: .1.3.6.1.2.1.1.1.0
sysUpTime: .1.3.6.1.2.1.1.3.0
ifInOctets: .1.3.6.1.2.1.2.2.1.10.[ifIndex]
ifOutOctets: .1.3.6.1.2.1.2.2.1.16.[ifIndex]
ifOperStatus: .1.3.6.1.2.1.2.2.1.8.[ifIndex]
# MikroTik private MIB
CPU load: .1.3.6.1.4.1.14988.1.1.3.14.0
Free memory: .1.3.6.1.4.1.14988.1.1.3.6.0
Voltage: .1.3.6.1.4.1.14988.1.1.3.8.0SNMP v3 Configuration (MikroTik)
BASH
/snmp set enabled=yes
/snmp community add name=v3comm security=private authentication-protocol=SHA1 authentication-password=AuthPass123 encryption-protocol=AES encryption-password=EncPass123Custom Zabbix SNMP Template
XML
<item>
<name>CPU utilization</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.14988.1.1.3.14.0</snmp_oid>
<key>mikrotik.cpu</key>
<delay>60s</delay>
<units>%</units>
<triggers>
<trigger>
<expression>avg(/Template MikroTik/mikrotik.cpu,5m)>80</expression>
<name>High CPU: {ITEM.VALUE}%</name>
<priority>WARNING</priority>
</trigger>
</triggers>
</item>Best Practices
- Always use SNMPv3 with AuthPriv in production
- Use read-only community strings — never write access
- Restrict SNMP access by source IP on the device
- Poll at 60s intervals minimum (don't over-poll)
