Syslog is the standard: a message format and network protocol, defined first in RFC 3164 and replaced by RFC 5424, and also the everyday name for "the system log." Rsyslog is one program that implements it, the default syslog daemon on RHEL-family and Ubuntu servers. You do not pick between them: you run rsyslog, or syslog-ng, to speak syslog.
Think of syslog as the format of a shipping label and rsyslog as the courier that reads it. The useful question is not which one you need, but which label format the courier writes when it passes a parcel on.
That last question is where we found the interesting part. On a test AlmaLinux 9 server running rsyslog 8.2604, a default rsyslog relay quietly rewrote a modern, time-zone-aware message into the old format, and the collector at the end of the chain filed a failed SSH login two hours early. The trace is below, along with the one-line fix. If you are building central log management for a fleet, this is the setting to check first.
Is syslog the same as rsyslog?
No. "Syslog" names a standard and a job; rsyslog is one piece of software that does the job. The word causes confusion because people use it for at least three different things:
-
The protocol and message format. RFC 3164 (2001) wrote down how BSD systems already formatted log messages. RFC 5424 (2009) replaced it with a proper standard and formally obsoletes it.
-
The original daemon. A daemon is a background service. The first Linux one was
sysklogd, and its config syntax (lines likeauthpriv.* /var/log/secure) still survives inside rsyslog today. -
The file. On Debian and Ubuntu,
/var/log/syslogis the catch-all log file, so "check syslog" often just means "read that file."
Rsyslog began in 2004 as a fork of sysklogd and grew into a full log router. Syslog-ng is an independent daemon that does the same job with a different config language. On modern distributions both usually sit behind systemd-journald, the service that collects every message first and stores it in a binary journal.
| Name | What it is | Where you meet it | Sends logs over the network? |
|---|---|---|---|
| syslog | A standard: message format plus protocol (RFC 3164, then RFC 5424) | Every Linux server, router, firewall and appliance | It defines how, it does not run |
| sysklogd | The original Linux syslog daemon | Old systems; its rule syntax lives on in rsyslog | UDP only |
| rsyslog | A syslog daemon and log router | Default on RHEL, AlmaLinux, Rocky and Ubuntu | UDP, TCP, TLS and the acknowledged RELP protocol |
| syslog-ng | An independent syslog daemon and log router | Installed by choice on many distributions | UDP, TCP and TLS |
| systemd-journald | The local log collector on systemd distributions | Every systemd server; the only logger by default on Debian 12 | Not as standard syslog; it hands messages to rsyslog or syslog-ng |
One change to know: the Debian 12 release notes state that rsyslog is no longer installed by default. A fresh Debian 12 server keeps logs only in the journal, read with journalctl, and has no /var/log/syslog until you install rsyslog.
What does rsyslog add over plain syslog?
Reliable delivery and routing. The classic daemon could write files and fire messages over UDP, which has no delivery confirmation. Rsyslog adds TCP, encryption with TLS, RELP (a protocol where the receiver confirms each message), queues that hold messages on disk while a collector is down, filters on any field, and templates that control the exact output format. The omfwd module documentation covers the forwarding options.
Here is the same job, "send everything to a central server over TCP," written three ways. The first is the old one-line style that rsyslog still accepts (two @ signs mean TCP, one means UDP). The second is rsyslog's current syntax, called RainerScript. The third is syslog-ng, written to reuse the system source your distribution's config already defines: it is called s_sys on RHEL-family packages and s_src on Debian and Ubuntu. Defining a second source with the same name stops syslog-ng from starting.
*.* @@10.0.0.5:514*.* action(type="omfwd" target="10.0.0.5" port="514" protocol="tcp")destination d_central { network("10.0.0.5" port(514) transport("tcp")); }; log { source(s_sys); destination(d_central); };
All three deliver the message. None of the rsyslog lines says which format goes on the wire, and that default is the subject of the next two sections. Our guide to using syslog in Linux covers the rest of a forwarding setup: the collector side, queues, and a tested outage.
RFC 3164 vs RFC 5424: which syslog format is on the wire?
The format decides whether your timestamps can be trusted. We sent one failed-login message to a raw network listener twice with the logger command, once in each format, and captured the bytes exactly as they arrived:
<84>Nov 26 12:11:31 web01 sshd: Failed password for invalid user admin from 203.0.113.7 port 52144 ssh2 <84>1 2026-11-26T12:11:31.169685+02:00 web01 sshd - AUTHFAIL [timeQuality tzKnown="1" isSynced="1" syncAccuracy="220511"] Failed password for invalid user admin from 203.0.113.7 port 52144 ssh2
Both lines start with the same priority value, 84. It packs two labels into one number: the facility (the kind of program, here 10 for private authentication messages) times eight, plus the severity (4, a warning). After that, the formats split.
| Field | RFC 3164 (BSD syslog) | RFC 5424 (IETF syslog) |
|---|---|---|
| Timestamp | Nov 26 12:11:31 | 2026-11-26T12:11:31.169685+02:00 |
| Year | Missing | Included |
| Time zone | Missing; the reader assumes one | Required offset from UTC |
| Sub-second precision | None | Microseconds in our capture |
| Message ID | No field | AUTHFAIL |
| Structured data | No field | Key-value block, here clock-sync details |
| Standing | Informational, obsolete | The current standard |
The missing time zone is the field that hurts. RFC 3164 says only that the timestamp is local time, with no year and no offset. A collector that receives it has to guess both, and it guesses with its own clock settings.
Worked example: how a default relay moved an SSH failure two hours
Many fleets forward in two hops: each server sends to a relay in its own network, and the relay sends on to a central collector. We built that chain on one machine with three processes, using unprivileged ports:
-
A sender whose clock runs in UTC. We simulated it by setting
TZ=UTCforlogger, which sent a proper RFC 5424 message with a+00:00offset. -
A relay running rsyslog with a plain forwarding action and no template, the same shape as the RainerScript line above.
-
A collector running rsyslog in the Asia/Jerusalem time zone, two hours ahead of UTC, writing each message to a file in RFC 5424 format.
The failed login happened at 10:17:24 UTC. Here is what the relay sent on and what the collector stored:
<84>Nov 26 10:17:24 web01 sshd Failed password for invalid user admin from 203.0.113.7 port 52144 ssh2
<84>1 2026-11-26T10:17:24+02:00 web01 sshd - - - Failed password for invalid user admin from 203.0.113.7 port 52144 ssh2
The relay dropped the year, the offset, the message ID and the structured data, because with no template set it forwarded in the traditional RFC 3164 shape. The collector then added its own year and its own offset. The stored time, 10:17:24 at +02:00, means 08:17:24 UTC. The event is now filed two hours before it happened.
Two hours matters in an investigation. Line that login up against a web server log or a firewall log that kept correct UTC time, and the attacker's first failed password appears to come before the scan that found the server. Anyone building a timeline from that SIEM (security information and event management system, explained in our SIEM primer) gets the order of events wrong.
The fix is one parameter on the relay's forwarding action. RSYSLOG_SyslogProtocol23Format is rsyslog's built-in RFC 5424 template:
*.* action(type="omfwd" target="10.0.0.5" port="514" protocol="tcp" template="RSYSLOG_SyslogProtocol23Format")
We re-ran the same chain with that one change. The collector stored the true time, with every field intact:
<84>1 2026-11-26T10:17:34.080105+00:00 web01 sshd - AUTHFAIL [timeQuality tzKnown="1" isSynced="1" syncAccuracy="402011"] Failed password for invalid user admin from 203.0.113.7 port 52144 ssh2
Validate any edit with sudo rsyslogd -N1 before restarting the service. The same rule applies to the first hop: a server that forwards straight to the collector should carry the template too.
Should you use rsyslog or syslog-ng?
Use whichever your distribution already ships, which on RHEL-family and Ubuntu servers means rsyslog. Both are mature, both handle TCP and TLS, and both can write RFC 5424. Switching daemons rarely fixes anything that a config change would not.
Syslog-ng makes sense when a team already runs it elsewhere and wants one config language across the estate. Its source, destination and log blocks read more cleanly than rsyslog's mix of old and new syntax. On Debian 12, where neither is installed, add one only if you need to forward logs. If a SIEM agent on the server reads the journal directly, as the Wazuh agent can, you may not need a syslog daemon at all on that host.
Where the syslog formats break down
-
Not every receiver reads RFC 5424. Some older appliances and log tools parse only the BSD format. Before switching a relay's template, send one test message and confirm the receiver splits the fields correctly.
-
Running every machine on UTC hides the problem, it does not fix it. The guessed offset happens to be right, but one server left on local time brings the error back, and the missing year still has to be guessed, which can go wrong for a message queued across midnight on December 31.
-
Encryption needs an extra package. TLS in rsyslog depends on a separate driver package, usually
rsyslog-gnutlsorrsyslog-openssl.
Find every forwarding rule without a template
Run this on each server and relay. Any forwarding line it prints that has no template= setting, and every @ or @@ one-liner, sends the old format, unless a global default covers it. Check for a module(load="builtin:omfwd" template="...") line or the older $ActionForwardDefaultTemplate directive first, since either one sets the format for every forwarding rule:
sudo grep -rnE 'omfwd|^[^#]*@@?[0-9A-Za-z]' /etc/rsyslog.conf /etc/rsyslog.d/Then fix them, send one test message with logger, and compare the time on the collector with the time on the sender. Forwarded logs are also the copy an intruder cannot easily edit, which is why attackers go after local logging first, as in the ESXi logging bypass we covered. A copy with the wrong time is better than no copy, but only just.