Articles

Syslog and network logging: severity levels and what a log line proves

Severity steers handling; it never certifies that the claimed event occurred.

Reading: 6 minNetworking

Article cover: Syslog and network logging: severity levels and what a log line proves

Essential answer. Syslog is how a network device notifies a collector of an event; each message carries a severity from 0 (Emergency) to 7 (Debug) packed with a facility code. A log line is a claim: what an originator says happened, at the time its clock held, under an identity it chose. Over plain UDP, syslog acknowledges and protects nothing: it records a statement, not proof that the event occurred. Severity decides handling; it never certifies truth.

The mental model: a claim, its rank, and its route

A syslog message is a statement by the originator. RFC 5424 separates content, application and transport into layers and names three roles: an originator generates content, a relay forwards it, a collector stores it. A relay may pass a message on unchanged, so the machine you receive a datagram from need not be the machine that made the claim. The message is ranked, not weighted: severity is a label the originator attaches to steer handling, never a measure of truth.

originator ──▶ relay ──▶ collector   the claim travels; the sender of a datagram
     │            │                  may be a relay, not the originator
     └────────────┴──────▶ collector

Which syslog: the current format and the historical one

RFC 5424 (March 2009, Standards Track) is the current syslog protocol and obsoletes RFC 3164, the BSD syslog document. RFC 3164 is Informational — “It does not specify an Internet standard of any kind” — and RFC 5424 records that the legacy format “has never been formally standardized”. The familiar Mmm dd hh:mm:ss line is therefore the historical, obsolete shape, and its timestamp carries neither a year nor a time zone.

Severity, facility and the PRI value

A message opens with the PRI field, < Priority value >, which packs two numbers: facility × 8 + severity. Facility (0–23) names the subsystem; severity (0–7) says how urgent:

Code Severity Meaning
0 Emergency system is unusable
1 Alert action must be taken immediately
2 Critical critical conditions
3 Error error conditions
4 Warning warning conditions
5 Notice normal but significant condition
6 Informational informational messages
7 Debug debug-level messages

The numbering matters: the lower the number, the more severe the message. RFC 5424 states it plainly — “Messages with a lower numerical SEVERITY value have a higher practical severity than those with a numerically higher value” — so a device short of capacity is told to “drop messages of lower severity in favor of higher severity messages”. A kernel message at severity 0 is <0>; a local use 4 message at severity 5 (Notice) is <165>.

What a severity does not tell you

Severity is set by the originator, not the collector, and RFC 5424 warns the field is subjective: a collector “should not assume that all originators have the same definition of severity”. NIST SP 800-92 records the hazard: some generators assign severities to denote message classes “without any relationship to event severity”, and analysis grows “significantly more complex”. A collector can filter on facility and severity; it “cannot make decisions based on the source or content of a message”. Severity is a routing label, not a verdict.

The anatomy of a line, and what it proves

<165>1 2003-08-24T05:14:15.000003-07:00 192.0.2.1 myproc 8710 - - %% It's time to make the do-nuts.
 │    │ └─TIMESTAMP───────────────────┘  └HOSTNAME┘ └APP─┘ └PROCID┘ │ │ └─────── MSG ───────┘
 │    └ VERSION                                                     │ └ STRUCTURED-DATA ("-" = none)
 └ PRI = 165 = facility 20 (local4) × 8 + severity 5 (Notice)

That is RFC 5424’s Example 2 (§6.5): VERSION 1, facility 20, severity 5 — a claim in three parts.

  • Who. The HOSTNAME field “identifies the machine that originally sent the syslog message” — but it is written by that machine. RFC 5425 adds that a TLS-authenticated sender’s identity “is not necessarily related to the HOSTNAME field”. The source IP is no better: RFC 5426 says it “SHOULD NOT be interpreted as the identifier for the host that originated” the message, because the sender may be a relay.
  • When. The TIMESTAMP comes from the originator’s own clock. A timeQuality element lets it state whether it knows its time zone (tzKnown) and is “synchronized to a reliable external time source, e.g., via NTP” (isSynced). SP 800-92 gives the failure: with unsynchronised clocks, “timestamps might indicate that event A happened 45 seconds before event B”.
  • What. The MSG is “a free-form message”; SP 800-92 records that “No standard fields are defined within the message content” and “not easily machine-parseable”, so it must be read as prose.

Limits: what the transport does not guarantee

The UDP transport of RFC 5426 carries one message per datagram. RFC 5424 says syslog “does not provide acknowledgment of message delivery” and is “a pure simplex communications protocol”: messages “may either be dropped through network congestion, or they may be maliciously intercepted and discarded”, It has no replay detection — an attacker may record messages that “indicate normal activity” and replay them — and no confidentiality, so a party in the path “may be able to intercept and modify those messages while in-transit”. RFC 5424’s answer is the TLS transport of RFC 5425, which every implementation MUST support; plain UDP is reserved for a “managed network”.

The common error is to read a severity as a truth value, or a log line as proof: a line proves only that a device made a claim at a given time under a chosen identity — and, on plain UDP, not even that it arrived unchanged.

Level and prerequisites

L3 — integration and technical control. IP/UDP delivery (L1) is assumed, and NTP (L2) too: the timestamps a collector correlates are only as trustworthy as the clocks that wrote them, and the isSynced flag points back at the time-synchronisation sheet. This sheet adds the message model, the severity scale, and the reading of a log line’s limits.

Where to go next

References

  • RFC 5424 — The Syslog Protocol (2009).
  • RFC 5425 — Transport Layer Security (TLS) Transport Mapping for Syslog (2009).
  • RFC 5426 — Transmission of Syslog Messages over UDP (2009).
  • RFC 3164 — The BSD Syslog Protocol (2001, Informational; obsoleted by RFC 5424).
  • NIST SP 800-92 — Guide to Computer Security Log Management (2006).
  • IANA — Service Name and Transport Protocol Port Number Registry (syslog, 514/udp; syslog-tls, 6514/tcp).
Nodrius Field Kit — cover

Get the Nodrius Field Kit

Enter your email and we'll send you the complete Field Kit: eight technical resources in one download.

Your email address is sent to Nodrius and used to deliver the Field Kit to you by email. Marketing messages are separate and optional: the checkbox does not affect your download, and you are only added to our updates list if you tick it. Privacy Policy.

Privacy & cookies

This site does not use cookies, analytics or tracking, and it does not profile you. There is nothing technical to switch off, so Accept and Reject change nothing about how the site works: either choice lets you browse everything normally.

The only difference is what your browser remembers: two entries in local storage — your choice here, so this notice is not shown again, and a marker that the Field Kit offer has already been made — so the offer is presented once and not on every page. They contain no identifier, they are not shared with anyone, and the site sets no cookie for either.

What we do with your data
How your email address is used when you ask for a Resource, how long it is kept and which rights you have — in the Privacy Policy.
What the site stores in your browser
Two entries in local storage — your choice on this notice and whether the Field Kit offer has been shown — and no cookies, no session storage, no third-party content: in the Cookie Policy.