SNMP & Telemetry

SNMP Trap Design That Doesn't Flood Your NOC

A practical guide to designing SNMP trap handling (filtering, severity mapping, clear events and rate limiting) so your NOC sees real problems instead of noise.

On this page
  1. Start with the question: what should wake someone up?
  2. Layer 1: control what devices send
  3. Layer 2: normalize and map at the collector
  4. Layer 3: pair raise and clear events
  5. Layer 4: flap detection and rate limiting
  6. Layer 5: correlate with topology
  7. Test your design before production

SNMP traps are the oldest real-time signal in network monitoring, and still one of the most useful. Most NOCs can tell stories about a single flapping interface that buried the one alarm that actually mattered. The trouble is rarely SNMP itself. It is almost always trap design: what devices send, what the management system does with it, and what finally lands in front of an operator.

This guide walks through a trap-handling design that keeps the signal and drops the noise.

Start with the question: what should wake someone up?

Before touching a single configuration, write down which conditions need human action. For most networks the list is short:

  • Loss of a device or a critical link
  • Loss of redundancy (one side of a pair down, a power supply failed)
  • Hardware faults such as fans, temperature or optics
  • Routing adjacency loss on core and edge peers (BGP, OSPF, IS-IS)
  • Security-relevant events such as authentication failures, configuration changes and unexpected reboots

Everything else is context. Context is valuable, but it belongs in logs and dashboards, not in the alarm list.

Layer 1: control what devices send

The cheapest trap to handle is the one never sent. On most platforms you can enable trap categories one by one instead of turning on everything.

  • Enable by category, not globally. Turn on link, environmental, routing-protocol and configuration traps. Leave chatty categories like per-VLAN or per-session notifications off unless you have a use for them.
  • Suppress link traps on access ports. User-facing ports going up and down all day are normal. Disable link-status notifications on access interfaces and keep them on uplinks, trunks and infrastructure links.
  • Use informs where reliability matters. SNMP traps are fire-and-forget over UDP. INFORM messages are acknowledged and retransmitted. For a small number of critical notifications sent to your primary collector, informs are worth the slight overhead.
  • Send to more than one collector, deliberately. Two trap receivers give you resilience, but make sure the management system de-duplicates across them. Otherwise every fault shows up twice.

Layer 2: normalize and map at the collector

Once traps arrive, the management platform has to turn raw OIDs into meaningful events. In fault-management tools such as Broadcom Spectrum this is done with trap-to-event mapping (Spectrum uses its AlertMap and EventDisp configuration for this). Other platforms use rules files or event-processing policies. The principles are the same.

Map every trap you care about to an explicit event. Unmapped traps should land in a low-priority "unknown trap" bucket that someone reviews weekly. Don't raise them as alarms, and don't silently discard them.

Assign severity from business impact, not vendor defaults. A vendor may label a fan tray warning as "critical". If the chassis has redundant fans, it is a major at most. Build a severity matrix like this one:

Condition Redundant? Severity
Core link down Yes (ECMP/LAG member) Major
Core link down No Critical
PSU failed Second PSU healthy Minor
Device unreachable n/a Critical
Auth failure n/a Warning (security feed)

Extract the right variables. Traps carry varbinds such as ifIndex, ifDescr, peer address and sensor index. Put those into the event so the alarm reads "xe-0/0/12 to core-02 down" and not "linkDown received".

Layer 3: pair raise and clear events

Most operational noise comes from alarms that are raised but never cleared. Every "bad" trap should have a matching "good" trap:

  • linkDown pairs with linkUp for the same ifIndex
  • BGP backward transition pairs with established
  • Environmental alarm raised pairs with environmental alarm cleared

Configure the management system so that the clear event closes the original alarm automatically. The correlation key must be specific: device plus ifIndex, or device plus peer address. If it is too broad, one clear wipes unrelated alarms. If it is too narrow, clears never match.

For conditions that have no clear trap, set an auto-clear timer, or poll the underlying state and clear the alarm when the condition returns to normal.

Layer 4: flap detection and rate limiting

A port that bounces 40 times in five minutes should produce one alarm that says "flapping", not 80 events.

  • Flap threshold. If more than N raise/clear pairs occur for the same key within T minutes, suppress the individual events and raise a single "flapping" alarm. A common starting point is 3 transitions in 5 minutes.
  • Hold-down. Keep the flapping alarm open until the object has been stable for a defined period, for example 10 minutes.
  • Storm protection. Set a per-device trap rate limit on the collector. When a device exceeds it, raise one "trap storm" alarm and sample the rest. A misbehaving device should never degrade monitoring for the rest of the network.

Layer 5: correlate with topology

The single biggest noise reducer is root-cause suppression. When an aggregation router fails, every device behind it becomes unreachable. Your operators need one alarm (the router) with the downstream devices listed as symptoms.

Topology-aware tools do this automatically when the device model and connectivity are accurate. That makes topology discovery and inventory hygiene a monitoring task, not an afterthought.

Test your design before production

  1. Replay traps in a lab. Use snmptrap from Net-SNMP to send representative traps to a test collector and confirm mapping, severity and clearing.
  2. Simulate failure scenarios. Pull a redundant link, fail a PSU, reset a BGP peer. Count how many alarms each scenario produces. The target is one actionable alarm per real fault.
  3. Review weekly. Look at the top 10 noisiest devices and event types, and tune them.

A simple test trap from the command line looks like this:

snmptrap -v 2c -c test-community 10.10.10.50 '' \
  IF-MIB::linkDown ifIndex i 12 ifAdminStatus i 1 ifOperStatus i 2

For SNMPv3, use -v 3 -l authPriv -u <user> -a SHA -A <authpass> -x AES -X <privpass> with the engine ID your receiver expects.

Key takeaways

  • Decide what deserves an alarm before configuring anything.
  • Filter at the source, map explicitly, and set severity from impact.
  • Pair every raise with a clear, and handle flapping as its own condition.
  • Topology-based root-cause suppression is where the biggest noise reduction comes from.
  • Test with real failure scenarios and review the noisiest sources every week.

Good trap design is not glamorous, but it is the difference between a NOC that trusts its alarm console and one that has learned to ignore it.