Home › Topics › Syslog & Log Collection › Ports & Severity

Syslog Ports, Facilities and Severity Levels: the Reference You Will Keep Open


Syslog is the oldest thing on your network that still works exactly as designed, and the design fits on one page. This is that page: the ports, the severity codes, the facilities, the message format, the three things the protocol actually does, and the decisions you make when you configure it. Keep it open while you set up the switches; after that you will have memorised the parts that matter.


In this guide

  • What syslog is, and what a message comprises
  • Syslog ports: UDP 514, TCP 514, TLS 6514
  • The eight severity levels
  • Facilities and the PRI number
  • Message format: RFC 3164 versus RFC 5424
  • The three functions of the syslog service
  • Configuring syslog on devices and hosts
  • Encrypted and reliable syslog
  • Syslog servers on Windows
  • Syslog versus SNMP traps versus a SIEM
  • Where to go next

What syslog is, what it is used for, and what a syslog message comprises


Syslog is a protocol for sending one-line log messages from a device to a collector. What is syslog used for? Everything that has an event to report and no better way to report it: a switch logging a port that went down, a firewall logging a denied connection, a Linux host logging a failed login, a UPS logging a transfer to battery. A syslog message comprises three parts: a PRI number in angle brackets that encodes the facility and the severity, a header with the timestamp and the sending hostname, and the message text itself, which is whatever the device chose to say. That is the whole format of the original protocol, and it is why every network device since the 1980s has been able to speak it.


Syslog port numbers: UDP 514 by default, TCP 514, and TLS 6514


The default syslog port is UDP 514. It is the one every device assumes, the one a syslog server listens on out of the box, and the one with no delivery guarantee: a dropped packet is a lost line, and nobody is told. Syslog over TCP is usually run on port 514 as well (some implementations default to 601), framed per RFC 6587, and gives reliable delivery at the cost of a connection per sender. Syslog over TLS, per RFC 5425, runs on TCP 6514 and adds encryption and server authentication, which is the right choice for anything that crosses a network you do not fully control. The syslog port number you open on the collector's firewall, then, is UDP 514 at minimum, plus TCP 514 or 6514 if you use them, inbound from the devices.


TransportPortDeliveryUse it when
UDP514Best effort; silent loss under loadLocal LAN, routine device logs, every device supports it
TCP514 (sometimes 601)Reliable, in orderYou cannot afford to lose lines and the senders support it
TLS6514Reliable and encryptedLogs cross an untrusted segment or an audit requires it

The eight syslog severity levels


Every message carries a severity code from 0 to 7. Lower is worse, which trips up everyone once. The syslog severity codes are:


CodeKeywordMeaningWhat to do with it
0EmergencyThe system is unusablePage someone; it is probably already obvious
1AlertAction must be taken immediatelyPage someone
2CriticalCritical conditions: hardware failures, a dead power supplyPage, or ticket if the redundancy held
3ErrorError conditionsTicket; alert if it repeats
4WarningSomething is wrong but workingDigest; alert on a pattern
5NoticeNormal but significant: a login, a config saveKeep; useful at post-mortem time
6InformationalRoutine operationKeep, shorter retention
7DebugDeveloper-level detailDo not send to the collector unless you are debugging

Two cautions. Vendors assign severities inconsistently, so a "critical" from one switch is a "notice" from another, and the only cure is reading what each device actually sends for a week. And a device configured to send at "debug" level will flood the collector with thousands of lines an hour that drown the one line that mattered; "informational" is the sensible ceiling for routine sending.


Facilities, and the PRI number


The facility says what kind of program sent the message. The standard list is 0 kernel, 1 user, 2 mail, 3 daemon, 4 auth, 5 syslog, 6 printer, 7 news, 8 UUCP, 9 cron, 10 authpriv, 11 FTP, 12 NTP, 13 log audit, 14 log alert, 15 clock, and 16 to 23 as local0 through local7, which are the ones network devices use because none of the others fit a switch. The PRI number at the front of every message is facility multiplied by 8 plus severity: a message tagged <165> is local4 (20 × 8 = 160) at Notice (5). On a collector, the facility is mostly useful for routing: send local7 from the firewalls to one file or rule set and local0 from the switches to another.


Message and file format: RFC 3164 versus RFC 5424


There are two syslog formats on the wire. RFC 3164, the "BSD syslog" format, is the old one: a PRI, a timestamp without a year or time zone, a hostname, and free text. It is what most network gear still sends, and its timestamp is the reason collectors stamp the arrival time as well. RFC 5424, from 2009, adds a version number, a full ISO timestamp with time zone, an application name, a process ID, a message ID and structured data in square brackets, and is what modern hosts and some newer devices send. A collector must accept both, and the practical difference for you is that 5424 messages can be parsed into fields and 3164 messages have to be pattern-matched. The syslog file format you see in /var/log on a Linux host is the collector's own rendering, not the wire format.


The three functions provided by the syslog service


What are the three functions provided by the syslog service? Any syslog implementation, on a device or a host, does three things: it collects messages from the local programs and the network, it filters and routes them by facility and severity to files, other collectors or alerts, and it stores them with a retention rule. On a network device only the first and part of the second apply: the device collects its own events and routes the ones above a configured severity to the collector you name. Everything beyond that is the collector's job, and the quality of a syslog server is the quality of its filtering and routing.


How to set up a syslog server, and configuring syslog on devices and hosts (rsyslog, syslog-ng, syslog.conf)


Configuring syslog means answering four questions per sender: where to send (the collector's address and port), which severity ceiling to send (informational, usually), which facility to tag (local0 to local7, by device type), and what timestamp and hostname to include (the real hostname and a synchronised clock, so NTP first). On network gear it is a handful of lines; on a Linux host it is a line in the rsyslog or syslog-ng configuration naming the remote collector; on Windows, which has no native syslog sender, it is either an agent that forwards event logs as syslog or, better, a collector that subscribes to the event logs directly over WMI and skips syslog on the host side entirely. The central syslog server guide walks through a collector build end to end.


Syslog encryption and reliable delivery


Plain UDP syslog is unencrypted and unauthenticated: anyone on the path can read every line and anyone who can spoof a source address can inject one. For device logs on a management VLAN that is an accepted trade; for anything carrying usernames, firewall decisions or audit evidence across a shared network, use TLS on 6514 with the collector's certificate verified by the senders. Encrypted syslog also brings TCP's reliable delivery, so the one line you needed is not the one that was dropped during the storm that caused it.


Windows based syslog servers, syslog viewers and syslog watchers: what to look for


A syslog server on Windows is any program that listens on UDP 514 (and TCP 514 or 6514) and does something useful with what arrives. The useful part is the test. A viewer that shows the lines scrolling past is a start; a free syslog server for Windows that writes them to a file is a start; what you actually need is a receiver that knows which device each address belongs to, turns the lines that matter into alerts by severity and content, keeps the rest beside the device's graphs, and can tell you which of your rules would catch a given line before the night it needs to. The syslog server and trap receiver page describes how SysPeep does this inside the monitor rather than beside it.


Syslog versus SNMP traps versus a SIEM


A syslog line and an SNMP trap carry the same kind of news by different roads: syslog is free text from anything, traps are structured and named by a MIB. Most devices send both, and a monitoring system should receive both. A SIEM is a different animal: it ingests everything, indexes it for search, correlates across sources and keeps it for a year, and it costs accordingly. SIEM versus syslog is not a choice; a SIEM consumes syslog. The question is whether you need full-text search over a year of logs or an alert when the firewall says something critical, and most sites need the second first. The SIEM-lite series covers getting most of the value without the product.


Where to go next


The syslog fundamentals guide explains the ideas in more depth; the central syslog server guide builds one; the traps versus polling guide covers the SNMP side of event collection. For turning event lines into alerts that reach the right person without flooding them, the alert design series is next. The whole series is collected in the Syslog and Log Collection pillar.


Put this into practice with SysPeep Monitor

SysPeep receives syslog, SNMP traps and Windows event logs in the same Windows service that polls the devices, turns them into alerts with rules by kind, application and severity, keeps the rest on an events timeline beside the graphs, and adds the firewall rules for its listeners during Quick Start. In every edition, the free one included.

Download Free TrialLearn About SysPeep