Network Monitoring — NetFlow, SNMP Polling, Dashboards
Build useful network telemetry, baselines, dashboards, and actionable alerts.
Observability Means Knowing What Changed
Monitoring answers three operational questions: is the network healthy now, how is it changing, and what should an operator do when it degrades? One green dashboard is not enough. Network visibility combines device health, interface counters, flow records, logs, synthetic checks, and user-facing service indicators.
Use a hierarchy: metrics quantify state over time; logs record discrete events; flows summarise conversations; and traces follow an application request through services. Network engineers frequently combine these to understand whether latency arose on a link, a firewall, DNS, or an application dependency.
Polling, Events, and Flow Data
SNMP polling periodically queries devices for counters and health values. A time series is produced by sampling counters and calculating the difference between samples; counter resets and wraparound must be handled correctly. Traps or informs send event notifications, but should supplement polling because an event can be lost or its receiver can be unavailable.
NetFlow, IPFIX, and sFlow provide summaries of traffic conversations or sampled packets. They can show top talkers, protocol mix, and traffic direction without storing every payload. Flow records are not packet captures: they omit content and may be sampled. Treat source/destination addresses and application labels as sensitive operational data.
# Counter-to-rate calculation
# Counter delta is bytes transferred between two successful polls.
bytes_per_second = (current_octets - previous_octets) / elapsed_seconds
bits_per_second = bytes_per_second * 8
# Utilisation needs a known interface capacity
utilisation_percent = 100 * bits_per_second / interface_capacity_bps
# Handle counter reset/wrap and invalid elapsed time before alerting.Build Useful Metrics and Baselines
Start with service-level indicators that operators can act on: interface utilisation, errors and discards, packet loss, round-trip latency, DNS success, tunnel state, routing adjacency, and service probe success. Store device, interface, site, environment, and direction as consistent labels. Avoid an unbounded label such as full URL or arbitrary user ID, which can create huge storage and privacy risks.
Baselines vary by time of day, region, and business event. A fixed threshold is useful for hard limits, but an increase in bandwidth alone may be normal during an enrollment deadline. Pair thresholds with trend context, dependency state, and an owner. Dashboards should have a question: “Which site has rising packet loss?” is better than a wall of unrelated graphs.
# Example alert definition (conceptual)
alert: sustained-interface-errors
when: increase(interface_errors_total[5m]) > 0
for: 10m
labels:
severity: warning
annotations:
summary: "Interface errors persist on {{ device }} / {{ interface }}"
action: "Check optics, cabling, peer counters, and recent changes"
Alerting and On-Call Quality
An alert should be actionable, timely, and routed to the team that can respond. Include affected resource, impact, likely next check, runbook, and severity. Deduplicate correlated symptoms: one failed upstream link may trigger dozens of downstream alerts, but operators need one clear incident with related evidence rather than a flood of pages.
Use warning thresholds for early investigation and paging thresholds for user-impacting or rapidly worsening conditions. Review alert noise, false positives, and missed incidents after each event. Alert on symptoms (service probe failures, packet loss) as well as causes (interface errors) so a silent monitoring gap does not look like health.
Security, Retention, and Operational Hygiene
Use SNMPv3 with authentication and privacy where supported, restrict management access to dedicated collectors, and make read-only the default. Protect API tokens and dashboard accounts with least privilege. Encrypt telemetry in transit and at rest according to its sensitivity, define retention, and audit exports. Monitoring data can reveal network topology and user behaviour even when it contains no packet payload.
Document which counters come from which device model, how interface capacity is obtained, and how inventory changes propagate into labels. Validate a new device in a test environment and compare reported counters against known traffic. Monitor the monitoring pipeline, since stale data can lead to incorrect incident decisions.
Mistakes, Practice, and Review
Common mistakes: charting raw monotonically increasing counters as though they were rates; alerting on every brief threshold crossing; treating sampled flow data as complete packet truth; and ignoring telemetry freshness. Label cardinality and retention can become cost and reliability problems if left unplanned.
Practice: (1) Calculate interface utilisation from two counter samples and a link capacity. (2) Sketch a dashboard for a campus with three sites. (3) Write an alert with a clear action and deduplication key. (4) Identify sensitive fields in flow records. (5) Design a check that detects a silent monitoring collector failure.
🎯 Key Takeaways
- ✓Combine metrics, logs, flows, and synthetic checks to understand both infrastructure and user impact.
- ✓SNMP polling provides sampled counters; event notifications supplement but do not replace polling.
- ✓Convert counter deltas to rates carefully, handling resets, wraparound, and elapsed time.
- ✓Use consistent labels, meaningful baselines, bounded cardinality, and dashboards built around operator questions.
- ✓Alerts need owners, impact, runbooks, deduplication, and continuous tuning.
- ✓Secure and monitor the telemetry pipeline itself; flow and inventory data can expose sensitive topology.
HELP US IMPROVE
How was this lesson?
Your note is shared with the Chaduvuko team for review. Please don’t include personal or sensitive information.
Spotted a mistake or something unclear? Suggest a fix on GitHub or email us. Select the text first and it is quoted for you.
Discussion
0Have a better approach? Found something outdated? Share it — your knowledge helps everyone learning here.
