The quick download
Syslog is a standard way for devices, apps, and operating systems to send log messages to a central server, so you can search, store, and receive alerts from them in one place.
-
Every syslog message contains three pieces of information: where it came from (facility), how urgent it is (severity), and what happened (the message text).
-
Each message has a PRI number (Facility × 8 + Severity) that you can decode manually to figure out its source and urgency.
-
There are two message formats still in use: the older RFC 3164 (no year or timezone in the timestamp) and the newer RFC 5424 (more detail, exact timestamps), and most setups need to handle both.
-
Syslog usually runs over UDP port 514; use TCP or TLS (port 6514) when delivery or privacy matters.
Syslog is the standard protocol devices, servers, and applications use to send log messages to a central collector. As a system logging protocol and message format, it was built so that a router, a Linux server, a firewall, and a mail application could all report events in the same basic format, regardless of who made them or what language they were written in.
A syslog message always carries three elements:
- where the event came from (facility)
- how serious it is (severity)
- what happened (the message text)
Instead of logging into forty devices to check forty log files, an administrator can point all forty at one syslog server and search, filter, and alert on everything from a single screen.
Syslog runs on nearly every Unix-like system by default and is supported on Windows, network hardware, and most enterprise applications through built-in agents or third-party forwarders.
How Syslog Works
Syslog moves a message along a short chain: the application that generates the event, a local daemon that sends it, an optional relay that forwards it, and a collector that stores and processes it.
Let’s look at each stage in more detail.
- Application: A program, service, or device generates an event such as a failed login, a dropped connection, a disk nearing capacity and formats it as a syslog message using the local syslog library (syslog() on Linux, for example) or a built-in logging function.
- Local daemon: The message leaves the source device over UDP (User Datagram Protocol) or TCP (Transmission Control Protocol), typically on port 514, and travels to a receiver. Some environments encrypt this leg with TLS on port 6514, which matters for messages that carry authentication attempts or configuration changes.
- Relay (optional): In segmented or multi-site networks, a relay receives messages from devices that can’t reach the central collector directly and forwards them onward.
- Collector: A syslog server or daemon (syslogd, rsyslogd, syslog-ng) receives the message, parses it into fields, and decides what to do with it: write it to disk, forward it to another system, trigger an alert, or route it into a SIEM.

Local Logging vs. Network Logging
Not every syslog message is sent from its source device.
- Local logging writes events to a file on the same machine such as on most Linux distributions, that’s /var/log/syslog or /var/log/messages. This works fine for troubleshooting a single server, but it doesn’t scale: if a device is compromised or wiped, its local logs go with it.
- Network logging sends the same messages to a remote syslog server over UDP or TCP, so a copy of every event exists somewhere the originating device can’t reach.
Production environments commonly run both: local logging for fast, on-box troubleshooting, and network logging for retention, correlation, and evidence that survives even if the source is compromised.

What Happens After a Message Is Received
The first step is receiving a message. A syslog server that’s doing its job will typically:
- Parse the message into structured fields (timestamp, host, facility, severity, message body)
- Store it, usually in a database or indexed flat-file system, with a defined retention period
- Route it to the right destination, for example, a SIEM, a log analysis platform, a long-term archive, or several of these at once
- Alert on it if it matches a rule (a spike in failed logins, for example, or a specific error code)
Storing the message is just one part of the job. A server also needs to parse it, route it, and alert on it to be useful.
Syslog Ports and Transport Protocols
Syslog runs over UDP on port 514 by default, but it can also use TCP for more reliable delivery and TLS for encryption. The syslog protocol leaves the transport layer to separate standards, so the same message can travel any of these three ways.
| Transport | Default port | Standard | Use it when |
|---|---|---|---|
| UDP (User Datagram Protocol) | 514 | RFC 5426 | Logs stay on a trusted local network and occasional loss is acceptable. Lowest overhead, but no delivery confirmation. |
| TCP | 514 by convention; 601 is registered for reliable syslog; some devices use others (for example 1468) | RFC 6587 | Logs cross routed or busy networks, or you can’t afford to lose messages. Pair with a disk-assisted queue so a slow receiver doesn’t block senders. |
| TLS over TCP | 6514 | RFC 5425 | Logs cross untrusted networks or contain sensitive data. Encrypts messages and can authenticate both ends. |
UDP drops messages silently when the network or receiver is overloaded, which often happens during the incidents you most need logs for. TCP confirms delivery to the receiver, but it doesn’t guarantee the receiver parses or keeps the message, so monitor the collector too.
Syslog Servers: Components and Functions
A syslog server is the system that receives, indexes, and manages log messages sent by other devices on the network. It’s made up of two core components:
- a listener that accepts incoming UDP or TCP connections
- a database (or log store) that holds the parsed messages for search and retention
Once a message is received, the server’s job goes beyond storage. Functions a syslog server typically performs include:
| Function | What it does |
|---|---|
| Search | Lets an admin query logs by host, facility, severity, or keyword |
| Filter | Drops or routes messages based on rules, reducing noise before storage |
| Alert | Triggers a notification when a message matches a defined condition |
| Archive | Moves older logs to lower-cost storage per a retention policy |
| Route | Forwards messages to a SIEM, analytics tool, or secondary collector |
Syslog Client, Relay, or Server: What’s the Difference?
These three roles are often used loosely, but they describe different jobs in the same pipeline:
- Syslog client is the originating device. Routers, switches, firewalls, intrusion detection systems, and IoT devices all act as clients, sending their own events outward.
- Syslog relay is an intermediate system that receives messages and forwards them onward, sometimes after filtering or reformatting. Relays are common in segmented networks where a client can’t reach the central server directly.
- Syslog server is the endpoint that stores and indexes messages for the long term.
Why Centralized Logging Matters for Security
A syslog server that stores logs off the originating device gives security teams something a local log file can’t: evidence that survives the incident.
If an attacker gains access to a device and deletes its local logs to cover their tracks, the copies already sent to the central syslog server remain intact. That’s one reason syslog data shows up in forensic investigations and compliance audits. It’s often the only surviving record of what happened on a compromised host.
Syslog Message Format
A syslog message is built from a priority value, a header, and a message body. Understanding the priority value and the facility and severity codes behind it is what most people skip, but it’s also what makes log data usable instead of just readable.
Decoding the PRI Value
The PRI value is a single number that encodes both the facility and severity of a message in one field.
Every syslog message starts with a PRI value in angle brackets, like <134>. That number is calculated as:
PRI = (Facility × 8) + Severity
Take <134> as an example. Divide 134 by 8: the result is 16 with a remainder of 6. That means the facility code is 16 (local0) and the severity code is 6 (Informational). A network engineer scanning raw logs can decode any PRI value the same way, without needing a lookup tool.
Syslog Facility Codes (0–23)
The facility code identifies which type of process generated the message.
| Code | Keyword | Facility |
|---|---|---|
| 0 | kern | kernel messages |
| 1 | user | user-level messages |
| 2 | mail system | |
| 3 | daemon | system daemons |
| 4 | auth | security/authorization messages |
| 5 | syslog | messages generated internally by syslog |
| 6 | lpr | line printer subsystem |
| 7 | news | network news subsystem |
| 8 | uucp | UUCP subsystem |
| 9 | cron | cron (clock daemon) |
| 10 | authpriv | security/authorization messages (private) |
| 11 | ftp | FTP daemon |
| 12 | (varies) | NTP subsystem |
| 13 | (varies) | log audit |
| 14 | (varies) | log alert |
| 15 | (varies) | clock daemon (cron on some systems) |
| 16 | local0 | local0 |
| 17 | local1 | local1 |
| 18 | local2 | local2 |
| 19 | local3 | local3 |
| 20 | local4 | local4 |
| 21 | local5 | local5 |
| 22 | local6 | local6 |
| 23 | local7 | local7 |
Syslog Severity Levels (0–7)
Severity indicates how urgent a message is, and it’s the field most teams use to build alerting rules.
| Code | Keyword | Severity | What it typically means in practice |
|---|---|---|---|
| Code | Keyword | Severity | What it typically means in practice |
| 0 | emerg | Emergency | The system is unusable. Page someone now. |
| 1 | alert | Alert | Action is needed immediately: a full disk, a failed primary database. |
| 2 | crit | Critical | A critical fault, such as a hardware failure, that needs prompt attention. |
| 3 | err | Error | Something failed, but the system is still running. |
| 4 | warning | Warning | Not a failure yet, but worth watching: rising latency, a certificate nearing expiration. |
| 5 | notice | Notice | Normal but significant: a service restart, a configuration change. |
| 6 | info | Informational | Routine operational messages, like a successful login. |
| 7 | debug | Debug | Verbose detail used for troubleshooting, usually filtered out in production. |
Severity filtering matches the named level and everything more severe, so a selector such as *.warning captures levels 0 through 4. Application frameworks use their own scales that map onto these levels; see Python logging levels for one example.
Anatomy of a Syslog Message
Here’s a labeled RFC 5424 message:
<187>1 2026-07-15T10:22:41.003Z web-app-03 nginx 8291 - [meta@32473 ip="203.0.113.5"] Upstream timeout on /checkout

Look at this tabular breakdown of the message:
| Field | Value | Meaning |
|---|---|---|
| PRI | <187> | Facility 23 (local7), severity 3 (Error) |
| VERSION | 1 | Syslog protocol version |
| TIMESTAMP | 2026-07-15T10:22:41.003Z | ISO 8601 timestamp with millisecond precision |
| HOSTNAME | web-app-03 | Device or host that generated the message |
| APP-NAME | nginx | Application or process name |
| PROCID | 8291 | Process ID of the generating process |
| MSGID | – | Message type identifier (unused here) |
| STRUCTURED-DATA | [meta@32473 ip=”203.0.113.5″] | Key-value metadata in a defined format |
| MSG | Upstream timeout on /checkout | The actual event description |
For comparison, here’s a raw RFC 3164 message:
<38>Oct 26 09:14:02 bastion-01 sshd[4122]: Failed password for invalid user admin from 198.51.100.23 port 52144 ssh2
Decoded: 38 ÷ 8 = 4 remainder 6, so this is facility 4 (auth) at severity 6 (Informational). The time has no year or timezone, bastion-01 is the sending host, and sshd[4122] is the TAG (program name and process ID).
Syslog Protocol Standards: RFC 3164 vs. RFC 5424
Syslog has two competing message formats in active use, and knowing which one a device sends affects how you parse it.
Syslog originated in the 1980s as part of Eric Allman’s Sendmail project and became a de facto standard across Unix tools years before it was formally documented. The IETF published it as RFC 3164 in 2001, codifying existing practice, and followed with RFC 5424 in 2009 to add structured data, precise timestamps, and clearer field definitions.
| Feature | RFC 3164 (BSD syslog) | RFC 5424 |
|---|---|---|
| Published | 2001 (documenting existing practice) | 2009 |
| Timestamp | Local time, no year, no timezone (Jan 12 08:00:00) | ISO 8601 with timezone and milliseconds |
| Structured data | Not supported | Supported via the STRUCTURED-DATA field |
| Fields | PRI, timestamp, hostname, TAG, message | PRI, version, timestamp, hostname, app-name, procid, msgid, structured-data, message |
| Where you’ll still see it | Older network hardware, legacy Unix daemons | Modern applications, cloud-native logging, most current syslog servers by default |
RFC 3164’s timestamp is the most common source of parsing headaches: without a year or timezone, correlating events across daylight saving changes or multiple regions takes extra normalization work. Most current environments still receive a mix of both formats, since older network hardware often can’t be upgraded to RFC 5424 output.
Viewing and Configuring Syslog on Linux
On Linux, syslog files live under /var/log. The syslog daemon (rsyslog on most distributions, which replaced the original syslogd) decides which messages go to which file and which get forwarded to a logging server.
| Log | Debian / Ubuntu | RHEL / Rocky / Fedora |
|---|---|---|
| General system log | /var/log/syslog | /var/log/messages |
| Authentication log | /var/log/auth.log | /var/log/secure |
| Kernel messages | /var/log/kern.log | /var/log/messages |
| systemd journal | journalctl (binary journal; rsyslog reads from it on most distros) | journalctl |
These commands cover the most common tasks:
- Watch logs live: Show new lines as they arrive (use /var/log/messages on RHEL-based systems).
tail -f /var/log/syslog
- Send a test message: Write a message at facility local0, severity err, then check that it appears in the log or on your collector.
logger -p local0.err "test message"
- Filter the journal: Show only entries tagged sshd.
journalctl -t sshd
- Route messages: In rsyslog.conf selector syntax, send all kernel messages to their own file.
kern.* /var/log/kernel.log
- Forward to a server: Send every message to a central logging server, the first step toward centralized log management. One @ forwards over UDP; two @@ forward over TCP.
*.* @logs.example.com:514*.* @@logs.example.com:514
- Check the config before restarting: Validate the configuration, then restart the daemon.
rsyslogd -N1sudo systemctl restart rsyslog
Authentication logs show usernames, failed logins, and sudo use, so only root and trusted admin groups should read them. Forward them to a central server so an attacker can’t erase the only copy.
Syslog on macOS and Windows
macOS replaced its syslog-based logging with Unified Logging in macOS 10.12. Use the log show command to search past event messages and log stream to watch them live; /var/log/system.log holds only part of the picture. Windows has no native syslog: it writes to Windows Event Log, and an agent converts and forwards those events to a syslog collector.
Syslog Tools: Agents, Collectors, Relays, and Analyzers
Syslog tooling breaks down into five categories, and most log pipelines use at least three of them together.
- Agents and senders: lightweight software on the source device that formats and transmits log data (rsyslog, syslog-ng, NXLog)
- Collectors and aggregators: systems that receive messages from many sources and consolidate them before forwarding
- Relays: intermediate forwarders used in segmented or multi-site networks
- Analyzers: tools that index, search, and visualize log data
- Alerting and automation tools: systems that trigger notifications or run remediation scripts based on log content
Teams that would rather not run this pipeline themselves can use logging as a service instead.
Which Tool Fits Which Environment
The right setup depends mostly on how many sites you run, which operating systems you support, and how much traffic your network devices generate.
| Environment | Recommended setup |
|---|---|
| Small team, single data center | A single rsyslog or syslog-ng instance handling collection, filtering, and local storage is usually enough. |
| Enterprise, multi-site | Relays at each site forward to a central aggregator, with a dedicated analytics layer on top for search and correlation. |
| Mixed-OS environments | Look for agents with native support across Linux, Windows, and network OS variants. Windows doesn’t generate syslog natively, so it needs a forwarding agent (like NXLog or Windows Event Forwarding with a syslog bridge) to participate. |
| Network-heavy environments | Prioritize a collector that can handle high message volume over UDP without dropping packets, since routers and switches can generate thousands of messages during a link flap or spanning-tree event. |
Rsyslog vs. Syslog-ng
The two most common open-source syslog daemons differ mainly in platform support and configuration style.
Syslog-ng
Syslog-ng runs on AIX, HP-UX, Linux, Solaris, Tru64, and several BSD variants, which makes it a better fit for mixed-OS environments.
It also supports real-time log classification and tagging, and its official Administrator Guide walks through filters, sources, destinations, and log formats in enough detail to configure most setups without external help.
Rsylog
Rsyslog is primarily built for Linux and Solaris. It comes installed as the default logging daemon on most major Linux distributions, which makes it the path of least resistance for Linux-only environments.
It is configured in /etc/rsyslog.conf and /etc/rsyslog.d/ using classic facility.severity selector lines, with RainerScript for advanced rules, and rsyslogd -N1 checks the configuration for errors before you restart.
Syslog and SIEM Integration
Syslog data usually feeds into a larger system rather than being the endpoint itself. Most SIEM and XDR platforms ingest syslog as one of several data sources, correlating it with endpoint telemetry, network flow data, and identity logs to build a fuller picture of an incident.
A firewall’s syslog output showing a blocked connection attempt means more when it’s correlated against an endpoint alert showing malware execution on the same host at the same time. That correlation is what a SIEM adds on top of raw syslog data.
Syslog Tool Selection Checklist
Before choosing a syslog tool, check it against:
- Parsing support for both RFC 3164 and RFC 5424
- Full-text and structured search across historical data
- Rule-based filtering to control message volume before storage
- Alerting on severity, facility, or custom pattern matches
- Configurable retention by log source or type
- TLS support for encrypted transport
- Multi-vendor and multi-OS device support
Syslog Best Practices
A basic syslog setup is quick to get running. Keeping it reliable, secure, and useful over time is where most environments run into trouble. NIST SP 800-92 is a useful reference for the broader log management program.
Assign clear pipeline ownership
Someone needs to own the syslog pipeline the way a team owns a production service like deciding which sources are approved, documenting changes to collector configuration, and verifying after every change that logs are still arriving from every expected source.
Without this, it’s common for a source to silently stop forwarding logs for weeks before anyone notices, usually right when those logs are needed for an investigation.
Filter and normalize at the source
A single busy switch can generate thousands of messages during a link flap or spanning-tree event, and most of them aren’t worth storing.
Filter at the source where possible, normalize message formats so similar events don’t fragment into dozens of variants, and route only the signal into expensive, long-retention storage.
Plan for transport reliability trade-offs
UDP is fast and lightweight but doesn’t guarantee delivery; a burst of traffic or a brief network hiccup can silently drop messages. TCP guarantees delivery but adds overhead and can back up if the receiver falls behind.
High-security or compliance-driven environments generally move critical log sources to TCP or TLS-encrypted TCP, and reserve UDP for lower-stakes, high-volume sources like routine health checks.
Use TCP with queueing for critical sources
Pair TCP with a disk-assisted queue on the sender, so messages wait on disk instead of being lost when the collector is slow or unavailable.
Sync every clock with NTP
Correlation depends on accurate time. Point every source and the collector at the same NTP servers, and prefer RFC 5424 output so time zones travel with each message.
Handle multi-line logs deliberately
Syslog treats each line as a separate message, so a multi-line stack trace arrives as many unrelated entries. Have applications log single-line JSON, or configure the agent to join related lines before forwarding.
Harden the collection layer itself
Encryption in transit (TLS on port 6514) protects log data on the wire, but it doesn’t protect the collector from unauthorized access, tampering, or an attacker planting false log entries to cover their tracks. Restrict who can write to or modify the syslog server, and monitor the pipeline itself for unexpected gaps or configuration changes.
Treat retention as an operating cost
Retention periods are often set once to satisfy an audit requirement and never revisited, even as log volume grows.
Reviewing your log retention policy against actual investigation and compliance needs, rather than defaulting to “keep everything forever”, keeps storage costs predictable as the environment scales.
Syslog Limitations and Security Risks
Syslog’s design leaves a few gaps that affect security and the reliability of your log audit trail. Each has a practical fix:
| Limitation | Risk | How to address it |
|---|---|---|
| Clear text by default | Anyone on the path can read messages | Use TLS on port 6514 |
| No sender authentication | Spoofed messages can pollute logs | Allow-list sources; use TLS with certificates |
| No delivery confirmation over UDP | Silent loss during bursts | Use TCP with queueing for critical sources |
| RFC 3164 timestamps lack year and time zone | Hard to correlate events across hosts and years | Prefer RFC 5424; sync clocks with NTP |
| Free-form message text | Hard to parse consistently across vendors | Normalize at the collector; use structured data where supported |
Common Syslog Use Cases
Network devices such as routers, switches, and firewalls generate syslog messages that let administrators track user activity, monitor performance trends like latency, detect suspicious traffic such as port scans, and flag unauthorized configuration changes.
For example, a Cisco switch reports an interface going down like this:
<187>Oct 26 11:47:19 core-sw-01 %LINK-3-UPDOWN: Interface GigabitEthernet1/0/24, changed state to down
Operating systems such as Linux, Windows, and macOS all support syslog-based logging to track user activity, audit account access, and detect performance issues like high CPU usage or memory leaks before they cause an outage.
For example, a Linux kernel that kills a process after running out of memory logs:
<3>Oct 26 03:12:55 db-02 kernel: Out of memory: Killed process 2314 (java)
Applications like databases, web servers, and VPNs use syslog to support compliance monitoring, debugging, and application health tracking.
A DevOps team correlating a spike in HTTP 500 errors with a recent deployment is a direct, practical example of syslog data driving a decision, not just recording history.
For example, PostgreSQL reports exhausted database connections like this:
<131>Oct 26 14:02:17 pg-primary postgres[1187]: FATAL: remaining connection slots are reserved for non-replication superuser connections
Analyze Syslog Data at Scale
As infrastructure scales, the problems covered in the best practices above grow with it: more sources that can silently stop sending, bigger bursts during incidents, more formats to normalize, and more retention to manage.
Syslog makes it possible to collect log messages from virtually every device and application in your environment, but simply collecting logs isn’t enough. Teams also need to search, correlate, alert on, and analyze those logs alongside infrastructure metrics, which is hard when logs vs. metrics live in separate tools.
LogicMonitor brings those capabilities together in a single platform for centralized log management, helping operations teams investigate issues faster by viewing syslog data in context with the resources and alerts that generated it.
Monitor Syslog Data With LogicMonitor
Once your devices are sending a syslog to a central collector, watch that stream continuously rather than searching it only after something breaks. That means catching patterns as they happen: a spike in failed logins, a new error type, or a source that has quietly stopped sending.
LogicMonitor log monitoring does this for syslog alongside your infrastructure metrics, so a burst of interface errors and the latency it causes show up in the same view.
Because logs appear in context with the resources and alerts that generated them, your team can go from “something is wrong” to “here’s the device, here’s the message, here’s the impact” without switching tools.
See every syslog message alongside the rest of your infrastructure data with LogicMonitor.
Centralize your logs today and start correlating events the moment they happen.
FAQs
Is Syslog the Same as an Application Log?
No. An application log is any record created by an application, while syslog is a standardized method for formatting and transmitting log records. An application may write logs directly to a file, send them through syslog, or use both methods.
What Happens When a Syslog Server Runs Out of Disk Space?
The collector may stop saving new messages, overwrite older data, or become unstable, depending on its configuration.




