Use it to monitor routers, switches and firewalls.
Network Device Monitoring with SNMP and Streaming Telemetry
1. SNMP test: snmpwalk -v3 -l authPriv -u <user> -a SHA -A <auth> -x AES -X <priv> <device> IF-MIB::ifHCInOctets.
2. snmp_exporter target up.
3. Interface errors/discards.
4. gNMI: gnmic -a <device>:57400 subscribe --path /interfaces/interface/state/counters.
5. CPU/memory/temperature.
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 How to verify Verify boundary
Compare interface rates with the device's own show interfaces output. Confirm sysUpTime resets are handled after reloads.
Step 2 Common failures Narrow the fault
Using 32-bit counters on fast links wraps quickly and gives wrong rates. Polling too many OIDs too often loads the device CPU. ACLs on the device blocking the poller look like a device outage.
Use SNMPv3 authPriv. Poll counters with 64-bit ifHC* objects. Streaming telemetry gives higher resolution at scale. Alert on errors, discards and link state, not only bandwidth.
snmpwalk -v3 -l authPriv -u <user> -a SHA -A <auth> -x AES -X <priv> <device> IF-MIB::ifHCInOctets— first check for this topiccurl -s localhost:9090/-/ready— Prometheus readycurl -s 'localhost:9090/api/v1/query?query=up'— scrape targets up/downpromtool check config prometheus.yml— config valid
ReferenceWhat it is1 section · depth on demand
How it works
Pollers request OIDs on an interval; counters are converted to rates by the time-series database. gNMI subscriptions stream YANG-modelled data, often through a collector such as gnmic or Telegraf.
ReferenceImportant terms & boundaries3 sections · depth on demand
Polling vs streaming
| SNMP polling | Streaming telemetry (gNMI, model-driven) | |
|---|---|---|
| Interval | 1–5 minutes typical | Seconds or on-change |
| Load on device | Higher per data point | Efficient |
| Data model | MIBs | YANG (OpenConfig, native) |
| Collectors | snmp_exporter, LibreNMS, Zabbix | Telegraf gnmi, gnmic, Catalyst Center |
Use SNMPv3 authPriv; 64-bit counters (ifHCInOctets) on fast links. On IOS XE: telemetry ietf subscription for dial-out streaming.
In depth
Counter width and polling interval
A 32-bit counter (ifInOctets) wraps at 4,294,967,295. On a 10 Gbit/s link at full rate that is 1.25 GB/s, so it wraps every 3.4 seconds — any polling interval gives meaningless rates. Always use the 64-bit high-capacity counters from IF-MIB:
| Use | Instead of |
|---|---|
ifHCInOctets, ifHCOutOctets | ifInOctets, ifOutOctets |
ifHCInUcastPkts … | ifInUcastPkts … |
ifHighSpeed (Mbit/s) | ifSpeed (caps at 4.29 Gbit/s) |
Interface utilisation in PromQL
rate(ifHCInOctets{instance="sw1"}[5m]) * 8 / (ifHighSpeed{instance="sw1"} * 1e6)
rate(ifInErrors{instance="sw1"}[5m]) > 0
changes(sysUpTime{instance="sw1"}[10m]) > 0 and sysUpTime < 600*100 # reloaded (sysUpTime in 1/100 s)
Labels such as ifName, ifAlias (interface description) come from lookups configured in the exporter's generator.yml, so graphs can show Gi1/0/48 – uplink core1 instead of an index number.
SNMPv3 on Cisco IOS XE (read-only)
snmp-server view MON iso included
snmp-server group MONGRP v3 priv read MON access 99
snmp-server user prom MONGRP v3 auth sha <auth-key> priv aes 128 <priv-key>
access-list 99 permit 10.0.0.50
Use authPriv (authentication and encryption) and an ACL limited to the poller.
Polling vs streaming telemetry
| SNMP polling | Model-driven telemetry (gNMI / IOS XE dial-out) | |
|---|---|---|
| Interval | 30 s – 5 min | Seconds, or on change |
| Device load | Walks of large tables are CPU-heavy | Pushed from the device, efficient |
| Data model | MIBs | YANG (OpenConfig or native) |
| Collector | snmp_exporter, Telegraf | gNMIc, Telegraf, Cisco Telegraf/TIG stacks |
Use streaming for high-resolution interface and queue counters on important links; SNMP remains the common denominator for everything else.
Common mistakes
- SNMP polling too fast or with 32-bit counters.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.