Pcornel
Observability · Infrastructure Observability

Network Device Monitoring with SNMP and Streaming Telemetry

Cheat sheet · https://pcornel.dk/topic.php?topic=6231

Back to the Topic

Answer

Network device monitoring uses SNMP (polling MIBs such as IF-MIB, v3 for security) and model-driven streaming telemetry (gNMI/gRPC with YANG models) for interface counters, errors, CPU and state.

Remember

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.

First checks

  • snmpwalk -v3 -l authPriv -u <user> -a SHA -A <auth> -x AES -X <priv> <device> IF-MIB::ifHCInOctets — first check for this topic
  • curl -s localhost:9090/-/ready — Prometheus ready
  • curl -s 'localhost:9090/api/v1/query?query=up' — scrape targets up/down
  • promtool check config prometheus.yml — config valid

Verify in this order

device MIB/YANG → SNMP poll or gNMI stream → collector → TSDB

Where it usually breaks

Using 32-bit counters on fast links wraps quickly and gives wrong rates.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6231

Confirmation

Confirm action

Continue?