Home Support Blog

Syslog Severity Levels: Mapping Switch Events to Actions

Release date:2026-11-10

Syslog severity levels only become useful when each of the eight values 0 to 7 is tied to an action and a retention rule, not just a colour on a dashboard. Severity is a number, not a verdict. The engineering work is mapping the events a switch actually emits — port down, PoE overcurrent, optical power out of range, a loop, a failed login — to a level, an action and how long the line is kept. Do that first and the log server stays readable; leave it at the defaults and you will be reading debug lines at 03:00 while the disk fills.

Rayin (Shenzhen Rayin Technology) is a manufacturer of GPON OLTs and industrial Ethernet switches.

KEY TAKEAWAYS
  • RFC 5424 §6.2.1 fixes eight severity values, 0 (Emergency) through 7 (Debug), and PRI = Facility × 8 + Severity; that is the only numbering you need.

  • Most switch events belong at 3 or 4, not 0. Port down, PoE overcurrent and optical power out of range are warnings, not emergencies.

  • Turning on debug everywhere fills the log disk and steals CPU; keep debug for a fixed window, on one device, with a ticket attached.

What does RFC 5424 §6.2.1 actually define?

RFC 5424 §6.2.1 defines Severity as an integer 0 to 7, ordered by urgency: 0 is Emergency and 7 is Debug. It also defines the PRI as Facility × 8 + Severity, so a single number in the message header carries both the subsystem that emitted it and how urgent it is. The lower the value, the faster a human should react — which is the opposite of how loud the event feels when a port flaps. Every message a managed switch emits carries one of these eight values. Those are the event classes a Rayin industrial switch reports on a live site.

Monitoring screen showing a live syslog event stream and an alert list

ValueNameMeaning in RFC 5424 §6.2.1Example switch event
0EmergencySystem is unusableStack or chassis loss on the only uplink
1AlertAction must be taken immediatelyRedundant power feed lost on both inputs
2CriticalCritical conditionsFan failure with rising internal temperature
3ErrorError conditionsAccess port down, PoE overcurrent shutdown
4WarningWarning conditionsOptical Rx power near the threshold, CRC climbing
5NoticeNormal but significantRing topology change, configuration saved
6InformationalInformational messagesSuccessful login, link up at 1 Gbps
7DebugDebug-level messagesPer-packet or per-state-machine tracing

Which switch events belong at which level?

This is the table that turns a standard into an operations rule. I write it once per site and keep it in a network runbook, because the argument is never about what RFC 5424 says — it is about whether level 3 pages someone at 03:00. Note the ceiling: on a GPON PON port the registration limit is 128 ONU, and a flood of registration events is a capacity symptom, not eight separate emergencies. Loop events belong in the IEEE 802.1D spanning tree context, and a single topology change should not be escalated the same way as a lost uplink.

EventLevelActionRetention
Port down on an access link3Ticket, no page; suppress flaps90 days (industry-typical)
PoE overcurrent shutdown3Ticket, check the powered device90 days (industry-typical)
Optical Rx power below threshold4Inspect DDM, schedule a fibre check90 days (industry-typical)
Loop or topology change4Correlate with IEEE 802.1D state90 days (industry-typical)
Failed login, repeated4Review the access list12 months (industry-typical)
Successful login, link up6Store only30 days (industry-typical)
Debug trace7Never alert; fixed window only7 days (industry-typical)

Which events should page someone and which should only be stored?

Draw the line at level 2. Levels 0 to 2 mean the site is degraded or about to be; everything from 3 down is a condition to record and triage in working hours. The trap is event volume, not severity: a bad fibre contact can flap a port hundreds of times a minute, and if every flap pages, the on-call engineer stops reading the alerts. Suppress repeated identical events, age them out, and let the accumulated count at level 4 drive the ticket. An emergency is a state the site cannot survive, not a message that arrives often. RFC 3164 is the older BSD syslog format and appears here only as historical context; it lacks the structured severity handling RFC 5424 gives you, so do not build new rules on its assumptions.

BandPage?Where it landsWhy
0 to 2Yes, immediatelyOn-call rotationThe site is degraded now
3 to 4No, ticket onlyDaily triage queueReal faults, but survivable
5 to 6NoSearchable indexUseful for reconstruction, not action
7NeverShort local bufferDebug is a tool, not a record

What does running debug everywhere actually cost?

Two things: CPU on the switch and bytes on the log disk. Generating a debug line costs the control plane work, and on a busy device that work competes with the protocols keeping the network up. A switch left at level 7 can emit thousands of lines a minute (industry-typical), which fills a modest log partition in hours and makes every later search slower. Enable debug for a fixed window on one device, measure the CPU and forwarding load with network performance testing tools while the volume climbs, then turn it off and attach the capture to the ticket. If the CPU moves, the level is wrong for that device, not the log server. That is the whole cost model — no datasheet needed.

How long should you keep each level, and how do you trust the timestamps?

Retention follows the level, not the device. Keep levels 0 to 2 and security-relevant events for 12 months, routine warnings for 90 days, informational lines for 30 days and debug for 7 days (all industry-typical); roll the summary into an incident postmortem template rather than keeping every raw line searchable. None of that evidence is worth anything without a trustworthy clock, so set NTP on every switch and record the source in the runbook. Syslog, SNMP traps and NTP are usually deployed together — see the industrial O and M overview — but this article stays on severity mapping.

Engineer checking event severity against a network runbook at an operations console

BandIndustry-typical retentionStorageReason
0 to 2, plus security events12 monthsIndexed, backed upAudit and post-incident review
3 to 490 daysIndexedCovers a full maintenance cycle
5 to 630 daysIndexedEnough to reconstruct a change
77 daysLocal buffer onlyDebug volume is not evidence

FAQs

Why is debug level 7 instead of level 0?

RFC 5424 §6.2.1 orders the eight values by urgency, not by frequency: 0 is Emergency, the worst case, and 7 is Debug, the noisiest and least urgent. A lower number must wake someone up faster. Reversing the scale would break every rule that filters on severity being less than a threshold.

How is the PRI number calculated?

PRI = Facility × 8 + Severity, as RFC 5424 §6.2.1 states. A Facility of 16 with a Severity of 3 gives 16 × 8 + 3 = 131. That arithmetic is from the RFC, not a product value; the facility identifies the subsystem and the severity carries the urgency your alerting rules act on.

Should every link-down event page an engineer?

No. On a live Rayin switch, a flapping port can log hundreds of link-down events in a minute. Put link-down at level 3 or 4, suppress flaps, and let a network runbook decide what pages someone. In practice three identical messages in ten seconds should produce one ticket.

How long should you keep debug logs?

Days, not months. Keep levels 0 to 2 for 12 months and level 7 for 7 days (industry-typical), then roll the rest into an incident postmortem template rather than a searchable index. Debug volume is what fills the disk, and without a trustworthy NTP timestamp none of it is evidence anyway.

How do I check the CPU cost before enabling debug?

Enable it on one device for a fixed window and measure. Network performance testing tools show whether forwarding or CPU load moves while the log volume climbs; a busy switch can emit thousands of debug lines a minute (industry-typical). If the CPU rises, the level is wrong for that device, not the log server.

Conclusion

The eight levels are the easy part; the mapping and the retention policy are the work. Write the event-to-action table once, put level 2 as the paging line, keep debug in a short window, and set the clock before you trust a single timestamp. Do that and the log server answers questions instead of generating new ones.

Related Reading


How this article was made

The severity and PRI statements above come from public sources — RFC 5424 §6.2.1 (the eight severity values 0 to 7 and the PRI = Facility × 8 + Severity computation), RFC 3164 (the older BSD syslog format, historical context only) and IEEE 802.1D (spanning tree behaviour behind loop events). Only the RFC 5424 clause is numbered; the other two are cited by series name only. The method, worked examples and wording are written by Sara, who checked each figure against those sources before publication. Anything presented as an industry-typical value is labelled as such; nothing here is a measured figure from a Rayin product or a claim of any certification.

About the author: Sara — Sara is a Customer Manager at Rayin with over 10 years of experience in the communications field. In her free time, she enjoys badminton and swimming.

Connect with Sara on LinkedIn


About Rayin: Shenzhen Rayin Technology Co., Ltd. — Company Profile

Get A Quote

You have agreed to this website’s《Privacy Policy》