SNMP, counters and metrics
What monitoring measures
Monitoring turns device observations into evidence about service health. SNMP (Simple Network Management Protocol) lets a manager read managed objects from an agent. A MIB describes objects and their types; an OID identifies an object or instance in a numeric hierarchy. A counter accumulates events or bytes, while a gauge represents a current quantity such as queue depth. Neither alone proves a service is healthy.
Polling and notifications
A manager periodically requests values using operations such as GET or GETBULK. A trap is an unsolicited notification without a protocol response; an inform requests a response, but this does not guarantee delivery or processing by an operator. Polling provides a recurring observation even when notifications are lost. Prefer authenticated and encrypted SNMPv3 access (authPriv) with supported modern algorithms and read-only views. Keep management access restricted.
Calculate a traffic rate
For two valid octet-counter samples, subtract the earlier reading from the later one and divide by the actual elapsed seconds. Multiply by eight for bit/s. In this synthetic example the link is 100 Mbit/s and the counter measures ingress octets. Utilization is directional and approximate; wire overhead and counter scope matter.
t=0 s: 1000000 octetst=10 s: 26000000 octetsrate = (26000000 - 1000000) * 8 / 10 = 20000000 bit/sutilization = 20 / 100 * 100 = 20%Wraps, resets and gaps
Counter32 wraps at 2^32; if exactly one wrap is plausible and no discontinuity occurred, use modular subtraction. For example, 4294967290 to 4 is a delta of 10. Prefer Counter64 high-capacity octet counters. Check agent restart evidence and ifCounterDiscontinuityTime before computing differences. If a reset occurred or multiple wraps are possible, mark the interval unknown. A missed poll is not zero traffic.
Practice and evidence
Given 10,000 and 70,000 octets 12 seconds apart, the rate is 40,000 bit/s. If the second sample belongs to a restarted agent, discard the rate. Examine input/output errors and discards separately: errors can reflect malformed traffic, discards can occur without errors. A high average load may hide short bursts; compare queue and loss observations.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
SNMP, counters and metrics Quiz
Interpret synthetic monitoring observations and explain their limitations.
Which item represents a current queue depth?
Which notification expects a protocol response?
An octet counter increases by 500000 in 2 seconds. What is the rate?
A Counter32 changes from 4294967294 to 3 with one wrap and no reset. What is its delta?
The discontinuity marker changes between polls. What should you report?