SNMP Traps vs Polling vs Streaming Telemetry
Polling, traps, and model driven telemetry describe the same switch but prove different things. Configure all three, then read each one for what it can actually confirm.

On this page
Polling, traps, and streaming telemetry are usually presented as three generations of the same idea, with the newest one winning. That framing hides the part that decides how an incident goes: each mechanism fails differently, and each one proves something slightly different about the network. A poll that answered is evidence that the device was reachable and the object had that value. A trap is evidence that an event was generated, not that it arrived. A telemetry sample is evidence of a value at a timestamp, but only while the session behind it is still up.
You can run all three against the same switch and still be wrong about which port went down, because the poll that would have caught the outage happened before it started and the trap that announced it was dropped on a busy supervisor. This guide treats the three as separate instruments with separate evidence. The device side examples are Cisco IOS XE, the collector side uses Net SNMP and gNMIc, and the reasoning carries to Junos, EOS, and NX-OS where the same three mechanisms exist under different syntax.
At a Glance: Polling, Traps, and Streams
| SNMP polling | SNMP traps | Streaming telemetry | |
|---|---|---|---|
| Direction | Collector asks, device answers | Device pushes | Device pushes inside a session |
| Transport | UDP 161, request and response | UDP 162, one datagram | TCP with gRPC, gNMI, or a vendor dial out |
| Data model | MIB objects addressed by OID | Notification types plus varbinds | YANG paths encoded as JSON or protobuf |
| Latency | One poll interval | Milliseconds, when it arrives | Sample interval, or immediate on change |
| Evidence of delivery | The response | None, unless informs are used | The open session plus the next sample |
| Cost driver | Devices × objects × interval | Events, plus receiver capacity | Devices × paths × cadence |
| Best for | State, rates, capacity planning | Fast notice of an event | High cadence with structured keys |
Three Ways the Same Event Reaches You
The difference between the three is not speed. It is who initiates the conversation and whether silence means anything. In a poll, the collector asks and the device answers, so a missing answer is information: either the device is unreachable or the community, view, or ACL is wrong. In a trap, the device speaks without being asked and nobody answers, so silence is ambiguous, and the absence of a link down trap can mean the link is fine, the trap was disabled, or the packet was dropped. In a stream, the collector opens a session and the device pushes inside it, so silence means something only once you know the session is still up.
There is a fourth source, flow export, and it answers a question none of these three can: which conversation used the bandwidth. The same rule applies to it, which is that each source should own one kind of fact and every fact should have exactly one owner.
Polling: The Baseline You Can Budget
A poll is cheap to reason about because every sample has a receipt. The collector sends a request, the device answers, and the answer carries the value, the timestamp, and the proof of reachability. That is why polling survives every generation of monitoring tooling: it is the only one of the three where the collector can tell the difference between “nothing changed” and “I could not reach the device”.
The useful objects are in ifXTable at 1.3.6.1.2.1.31.1.1.1, and ifOperStatus at 1.3.6.1.2.1.2.2.1.8 is the column most alerting is built on. A bulk walk returns one row per port.
snmpbulkwalk -v2c -c monitor -Cr25 -On 192.0.2.10 1.3.6.1.2.1.2.2.1.8 | head -n 4
.1.3.6.1.2.1.2.2.1.8.101 = INTEGER: up(1)
.1.3.6.1.2.1.2.2.1.8.102 = INTEGER: down(2)
.1.3.6.1.2.1.2.2.1.8.103 = INTEGER: up(1)
.1.3.6.1.2.1.2.2.1.8.104 = INTEGER: up(1)
The -Cr25 flag sets the max-repetitions field, so each GetBulk PDU returns up to 25 rows instead of the default 10, and a single column walk of 48 ports needs two round trips rather than one per row. Use SNMPv3 in production (-v3 -l authPriv -u monitor -a SHA -A ... -x AES -X ...), because a community string travels in clear text in every request.
Before you copy a polling template from a tool, measure what it costs on your own hardware. The -Cp flag prints the number of variables at the end of a walk, which is the figure that decides how many PDUs the poll needs, and time tells you how long the device takes to answer.
time snmpbulkwalk -v2c -c monitor -Cr25 -Cp -On 192.0.2.10 1.3.6.1.2.1.31.1.1.1 > /tmp/walk.txt
The cost is computable before you deploy anything. Take a 48 port access switch, six objects per port (name, description, state, speed, and the two 64 bit octet counters), a 60 second interval, and GetBulk with 25 repetitions.
| Item | Value | Unit | Reason |
|---|---|---|---|
| Ports | 48 | ports | One access switch |
| Objects per port | 6 | objects | Name, alias, state, speed, in and out octets |
| Varbinds per poll | 288 | varbinds | 48 × 6 |
| Request PDUs per poll | 12 | PDUs | 288 ÷ 25, rounded up |
| Response payload | About 11 | KB | 288 varbinds at roughly 40 bytes each |
| Average per switch | 1.5 | kbps | 11 KB × 8 ÷ 60 s |
| Average at 200 switches | 300 | kbps | Still small, and easy to budget |
The average is not the number your collector sees. All 12 PDUs land inside a second or two, so each switch produces a burst of about 11 KB and then goes quiet for the rest of the minute. If the poller starts every device at the same second, 200 switches hand the collector 2.2 MB in that window and nothing for the next 59 seconds. Stagger the schedule, or use the poller’s device offset setting, and the same load becomes invisible.
The other cost is the blind spot, and it is worse than most dashboards suggest. An outage shorter than the interval is caught only if the poll happens to land inside it, so the arithmetic is simply the outage duration divided by the polling interval, capped at 100 percent.
That arithmetic is the argument for a second source. Polling alone is the right tool for state, rates, and capacity, and a 60 second interval is a perfectly defensible baseline for those. What it cannot do is catch a 15 second flap on a port that carries revenue, and no amount of dashboard design fixes that.
Traps: Fast Events With No Receipt
A trap is the device raising its hand. Link state changes, a cold start, an authentication failure, and a power supply event are the classic cases, and the value is that the notification is generated at the moment of the event rather than at the next scheduled sample. The cost is that the message travels over UDP in a single datagram, with no acknowledgement and no retransmission, so a dropped packet is gone with no trace on either side.
That makes the receiver configuration the part that decides whether traps are useful. Net SNMP’s snmptrapd has applied access control to incoming notifications since 5.3, and a fresh installation with no matching rule discards everything without printing an error. A silent receiver is the most common reason a team concludes that traps do not work.
# /etc/snmp/snmptrapd.conf
authUser log,execute,net monitor priv
traphandle default /usr/local/bin/trap-to-json
The first line authorizes SNMPv3 notifications from the user monitor at the priv level, provided that user already exists in the receiver’s user table, and allows logging, handler execution, and forwarding. The second hands each notification to a script that can parse the varbinds and write a structured record. Older gear that only speaks v2c needs a separate authCommunity line for its community and source subnet, because the two rules do not cover each other. Run the daemon in the foreground while you test, with hostname lookup disabled so it keeps working when DNS does not.
sudo snmptrapd -f -Lo -n
Prove the path before you touch the device, because tcpdump is the only authority on whether the datagram arrived.
sudo tcpdump -ni any udp port 162 -c 5
On the switch, enable the notification types you actually page on and pin the source address to a loopback. The source address matters more than it looks: a trap generated while an uplink is failing will otherwise leave through whichever interface is still up, and the collector receives an address it may not attribute to the device.
snmp-server host 192.0.2.50 version 3 priv monitor
snmp-server enable traps snmp linkdown linkup authentication
snmp-server trap-source Loopback0
show snmp host confirms the receiver list, the notification type, and the SNMP version the device believes it is using. A host entry with the wrong version is a common misconfiguration that produces no visible error until the night you need it.
A trap looks like this on the collector, trimmed to the lines that carry the signal. The exact framing depends on the format2 setting or the -F flag, but the trap OID and the varbinds are the payload.
2026-11-13 03:14:07 192.0.2.10 [UDP: [192.0.2.10]:49152]:
SNMPv2-MIB::snmpTrapOID.0 = OID: IF-MIB::linkDown
IF-MIB::ifIndex.101 = INTEGER: 101
IF-MIB::ifOperStatus.101 = INTEGER: down(2)
If losing a notification is not acceptable, convert the critical types to informs by adding informs to the host entry, as in snmp-server host 192.0.2.50 informs version 3 priv monitor. An inform is acknowledged, so the device keeps state until the receiver answers and retries according to its configured timeout and retry count. The tradeoff is device memory and CPU for every outstanding notification, which is why informs are usually reserved for the handful of events that page a human.
The decision is simple to state. Use traps to shorten the time to notice, and never as the record of what is true. Polling answers “is the port up now”, a trap answers “the port changed at 03:14:07”, and a dashboard that treats the second as if it were the first will keep showing up long after the trap was lost.
Streaming Telemetry: A Session, Not a Request
Streaming telemetry moves the initiation of the conversation. Instead of asking for values on a schedule, the collector subscribes to a set of YANG paths once, and the device pushes updates from those paths at the cadence or trigger you chose. The data is model driven: a path like /interfaces/interface[name=GigabitEthernet1/0/1]/state/counters/in-octets names the interface as a key, so there is no index to reconcile later and no vendor specific OID to translate.
There are two ways to build the session, and mixing them up wastes days. In a dial in design the collector connects to a gNMI server running on the device, which is what gNMIc does. In a dial out design the device connects to a collector, which is what IOS XE configures with telemetry ietf subscription. The data is similar and the failure modes are not: one breaks when the collector cannot reach the device, the other breaks when the device cannot reach the collector, and both look like a quiet graph.
Start by asking the device what it supports rather than trusting a path from a blog post. capabilities returns the models and encodings the platform will actually serve.
gnmic -a 192.0.2.10:9339 -u admin -p 'NetOps2026' --insecure capabilities
gNMI version: 0.7.0
supported models:
- openconfig-interfaces, OpenConfig working group, 2.4.1
supported encodings:
- JSON_IETF
The address and TLS mode depend on how the server was enabled. IOS XE examples use port 9339. The server is started by gnxi server or gnxi secure-server depending on the release, and many other platforms use a different port, so check the port on the device instead of assuming one.
Once the model list includes interfaces, a subscription is one command. --stream-mode sample sends a value every interval regardless of whether it changed, which is what a rate calculation needs.
gnmic -a 192.0.2.10:9339 -u admin -p 'NetOps2026' --insecure --encoding JSON_IETF \
sub --path "/interfaces/interface[name=GigabitEthernet1/0/1]/state/counters" \
--stream-mode sample --sample-interval 10s
{
"source": "192.0.2.10:9339",
"timestamp": 1794545647123456789,
"prefix": "interfaces/interface[name=GigabitEthernet1/0/1]/state/counters",
"updates": [
{ "Path": "in-octets", "values": { "in-octets": 88442311903 } },
{ "Path": "out-octets", "values": { "out-octets": 41209883371 } }
]
}
If the device answers with an unknown path, the path needs the module name in front of it, for example openconfig-interfaces:/interfaces/.... Which form works is a property of the platform and the software train, so confirm it with capabilities and a single gnmic get before you write a collector configuration around it.
The dial out design is configured on the device. Note the period unit: update-policy periodic 1000 is ten seconds, because the value is in hundredths of a second, so 10000 would request an update every hundred seconds. Getting this wrong by a factor of a hundred is a common and quiet mistake.
telemetry ietf subscription 101
encoding encode-kvgpb
filter xpath /oc-if:interfaces/interface/state/counters
source-address 192.0.2.10
source-vrf Mgmt-intf
stream yang-push
update-policy periodic 1000
receiver ip address 192.0.2.60 57000 protocol grpc-tcp
The source-vrf line is the one to check first when the receiver never connects. A device with a dedicated management VRF will try to reach the collector through the global routing table unless you tell it otherwise, and the failure is silent on the device apart from a subscription state that never leaves Connecting.
show telemetry ietf subscription all detail
Telemetry subscription receivers detail:
Subscription ID: 101
Address: 192.0.2.60
Port: 57000
Protocol: grpc-tcp
State: Connected
The receiver is a service that listens for the device. Telegraf’s Cisco MDT input is one option, and its default service_address of 127.0.0.1:57000 binds the loopback interface only, so a remote switch cannot connect until you set it to :57000 or to the management address of the collector.
The subscription mode decides what the stream is good at, and each mode has its own way of looking healthy when it is not.
| Stream mode | What the device sends | Use it for | Failure to watch |
|---|---|---|---|
| Sample | One value per interval, changed or not | Counters, utilization, temperature | Collector storage growth |
| On change | A value when it changes, plus a heartbeat | Link state, session state, config | Silence mistaken for health |
| Target defined | Whatever the platform decides | Vendors with their own defaults | Behavior differs per platform |
Bandwidth is the part teams underestimate, because the numbers on a vendor slide are per sample rather than per fleet. Assume a counter update of roughly 300 bytes per interface and do the multiplication for your own link.
| Cadence | Interfaces | Per switch | At 500 switches |
|---|---|---|---|
| 1 second | 48 | About 115 kbps | About 57 Mbps |
| 10 seconds | 48 | About 11.5 kbps | About 5.8 Mbps |
| 60 seconds | 48 | About 1.9 kbps | About 960 kbps |
| On change | 48 | Near zero at rest | Grows with churn |
Measure the real figure on one switch before you scale it, with iftop on the collector or with your collector’s own byte counters, because protobuf payloads, delete notifications, and vendor metadata all move the estimate.
Match the Mechanism to the Question
Most arguments about which source is better come from asking all three the same question. They do not answer the same question, and the mature design assigns each fact to one source and lets the others reference it.
| Question | Polling | Traps | Streaming |
|---|---|---|---|
| Is the port up right now? | Yes, as of the last poll | Only the transition | Yes, as of the last sample |
| When exactly did it change? | Between two samples | The event timestamp | Between samples, or at the change |
| Did the collector receive it? | Yes, the response proves it | No, unless informs are used | Yes, while the session is up |
| What was the rate over five minutes? | Counter delta | No | Counter delta |
| What is the device CPU? | Vendor OID, if it exists | Only on threshold traps | The native or vendor model |
| What did the configuration become? | No | Only with config change traps | With on change on config paths |
The rule that follows from the table is worth writing into the runbook. Polling owns current state and rates, traps own the moment something happened, and telemetry owns high cadence samples where the platform supports it. Documentation owns what should be true, which is the only one of the four that can tell you a port should never have been down in the first place. During an incident, two systems that disagree about link state cost more time than one system with a known gap, so decide which source is authoritative before the pager goes off.
Where Each One Fails Quietly
The shared failure of all three is that stopped data looks like calm data. A poller that loses a credential stops returning values and many dashboards render the gap as zero. A telemetry session that drops leaves the last value frozen on the chart. A trap receiver that loses its ACL rule logs nothing and looks identical to a network with no events. Every one of these needs a check that runs on the pipeline rather than on the data.
| Failure | What you see | Check | Fix |
|---|---|---|---|
| Trap dropped or disabled | The alert never fires and polling notices late | tcpdump -ni any udp port 162 and show snmp host |
Use informs for events you page on |
| Outage fits between polls | A flat graph during a user visible incident | Compare the interval with the shortest outage you care about | Shorten the interval or add a trap |
| Telemetry session down | Dashboards frozen at the last value | show telemetry ietf subscription all detail |
Alert on the last sample age |
| On change subscription silent | Hours of no updates on a busy object | The heartbeat interval and the last update time | Add a heartbeat and a stuck data alert |
| Counter reset | A negative rate or an impossible spike | The value is lower than the previous sample | Discard the sample and restart the delta |
| Model changed after upgrade | A path returns empty or an error | gnmic capabilities after every upgrade |
Pin paths to modules the train exports |
| Trap source address moved | Notifications arrive from an unknown address | Compare the trap source with the device record | snmp-server trap-source Loopback0 |
The first four are not protocol bugs and no vendor release fixes them. They are the cost of using a source outside its competence, and they disappear when the source is used for the fact it actually owns. The last three are configuration drift, which is why the checks belong in the same change window as an IOS upgrade or a management VRF migration.
Roll Out Without Breaking the Old Path
The order matters, because turning on a new source before the old one is understood means two incomplete pictures instead of one good one. This sequence takes a small site from polling only to all three without a gap in coverage.
- Record the management path for each platform: the management address, the SNMP version, whether traps are enabled, and whether the software train serves gNMI. This list decides which devices get which mechanism, and it is the first thing you will want during the next upgrade.
- Calibrate polling against the outages you actually care about. Keep 60 seconds for utilization, and use 10 to 30 seconds for the interfaces that page someone. Count the varbinds per poll with
-Cpso the collector and the network see no surprises. - Enable traps for the four or five event types that change what you do: link down, link up, cold start, authentication failure, and any power or environmental alarm the platform exposes.
- Convert the events that page a human to informs, and leave the rest as traps. The device will hold state for the acknowledged ones, which is what you want for a small critical set and not for a firehose.
- Add a stream on one platform family, starting with interface counters at 10 seconds and a staleness alert keyed on the last sample time. Run it for a month beside the poll and compare the two.
- Retire a polling object only after the stream has covered it without a gap, and keep polling for state on every device that has no gNMI server. A mixed fleet is normal and is not a failure of the design.
Step one is documentation work, and it is the step most teams skip. Recording the platform, software train, management address, and interface names on the device record is what lets the next engineer answer “does this model support gNMI on this release” without a console session. Obelinf keeps those facts beside the device and its interfaces in the device inventory, which is the same record you need when a polled index or a trap source address has to be traced back to a port.
The first concrete step is to run one bulk walk against one switch today, count the variables with -Cp, and compare the number with the questions you actually ask of that device. If the walk returns six objects per port and your alerting uses two of them, you have found the cheapest improvement available this week, and you have a baseline to measure the telemetry rollout against.
Frequently Asked Questions
Should I use SNMP traps or polling?
Are SNMP traps reliable?
Is SNMP polling still relevant with streaming telemetry?
What is the difference between SNMP polling and streaming telemetry?
How often should I poll a switch with SNMP?
What is gNMI and how does it relate to streaming telemetry?
Does streaming telemetry use less bandwidth than SNMP?
Stop reaching for a spreadsheet
Obelinf keeps every subnet, device, circuit, and rack in one live source of truth, with audit logs and a topology view. Free for personal use.
Related Articles

SNMP Explained: OIDs, Polling, and Real Data
SNMP is a database you query, not a monitoring system. Learn the OIDs that matter, why 32 bit counters lie, and how to turn a poll into a bandwidth number you can defend.
Read more
OSPF vs Static Routes for Multi Site Networks
Static routes are fine until the second path, the first dead neighbor, or the twelfth site. A practical guide to choosing OSPF or static routing per site, with configs, cost math, and a cutover procedure.
Read more
VRRP vs HSRP vs GLBP: First Hop Redundancy
Every host has one default gateway, and that gateway is a single point of failure until you make it virtual. Compare VRRP, HSRP, and GLBP with real configs, timers, and failure checks.
Read more