Home/ Blog/ Comparison/ Article
Blog · Comparison

Syslog vs Rsyslog: What Differs, and the Timestamp Trap

Syslog vs rsyslog: syslog is the standard, rsyslog is a program that runs it. See RFC 3164 vs 5424 and the relay default that shifted our logs two hours.

Suriq cover card titled Syslog vs rsyslog, and the timestamp that drifts

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 like authpriv.* /var/log/secure) still survives inside rsyslog today.

  • The file. On Debian and Ubuntu, /var/log/syslog is 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.

NameWhat it isWhere you meet itSends logs over the network?
syslogA standard: message format plus protocol (RFC 3164, then RFC 5424)Every Linux server, router, firewall and applianceIt defines how, it does not run
sysklogdThe original Linux syslog daemonOld systems; its rule syntax lives on in rsyslogUDP only
rsyslogA syslog daemon and log routerDefault on RHEL, AlmaLinux, Rocky and UbuntuUDP, TCP, TLS and the acknowledged RELP protocol
syslog-ngAn independent syslog daemon and log routerInstalled by choice on many distributionsUDP, TCP and TLS
systemd-journaldThe local log collector on systemd distributionsEvery systemd server; the only logger by default on Debian 12Not as standard syslog; it hands messages to rsyslog or syslog-ng
How the names relate. Sources: RFC 3164, RFC 5424, Debian 12 release notes, rsyslog documentation.

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.

/etc/rsyslog.d/90-forward.conf · legacy one-line syntax
*.* @@10.0.0.5:514
/etc/rsyslog.d/90-forward.conf · RainerScript
*.* action(type="omfwd" target="10.0.0.5" port="514" protocol="tcp")
/etc/syslog-ng/conf.d/forward.conf · syslog-ng on RHEL-family
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:

raw UDP capture · same event, both formats (hostname changed)
<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.

FieldRFC 3164 (BSD syslog)RFC 5424 (IETF syslog)
TimestampNov 26 12:11:312026-11-26T12:11:31.169685+02:00
YearMissingIncluded
Time zoneMissing; the reader assumes oneRequired offset from UTC
Sub-second precisionNoneMicroseconds in our capture
Message IDNo fieldAUTHFAIL
Structured dataNo fieldKey-value block, here clock-sync details
StandingInformational, obsoleteThe current standard
Fields from our capture of one event sent in both formats with logger, util-linux on AlmaLinux 9.

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:

  1. A sender whose clock runs in UTC. We simulated it by setting TZ=UTC for logger, which sent a proper RFC 5424 message with a +00:00 offset.

  2. A relay running rsyslog with a plain forwarding action and no template, the same shape as the RainerScript line above.

  3. 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:

what the relay forwarded · rsyslog 8.2604, no template set
<84>Nov 26 10:17:24 web01 sshd Failed password for invalid user admin from 203.0.113.7 port 52144 ssh2
what the collector stored
<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:

/etc/rsyslog.d/90-forward.conf · relay, fixed
*.* 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:

what the collector stored · after the fix
<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-gnutls or rsyslog-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:

terminal · list forwarding rules
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.

Frequently asked questions

What is the difference between syslog and rsyslog?

Syslog is the standard: a message format and protocol defined in RFC 3164 and its replacement, RFC 5424. Rsyslog is a program that implements it, the default syslog daemon on RHEL-family and Ubuntu servers. You run rsyslog, or another daemon such as syslog-ng, to send and store syslog messages.

Is rsyslog installed by default on Debian 12?

No. The Debian 12 release notes state that rsyslog is no longer installed by default. A fresh Debian 12 server keeps logs only in the systemd journal, read with journalctl, and has no /var/log/syslog file until you install rsyslog.

What is the difference between RFC 3164 and RFC 5424?

RFC 3164 is the old BSD syslog format: its timestamp has no year and no time zone. RFC 5424 is the current standard and replaced it in 2009. It adds a full timestamp with a required UTC offset, a message ID field and structured key-value data.

Why are my forwarded syslog timestamps off by hours?

Usually a relay or sender is forwarding in the old RFC 3164 format, which drops the time zone, so the collector applies its own. In our test, a default rsyslog relay moved an event two hours. Set template="RSYSLOG_SyslogProtocol23Format" on the forwarding action to keep the offset.

Should I use rsyslog or syslog-ng?

Use whichever your distribution already ships, which on RHEL-family and Ubuntu servers means rsyslog. Both handle TCP and TLS and can write RFC 5424. Syslog-ng makes sense when a team already runs it elsewhere and wants one config language across the estate.

See what Suriq finds on your own servers.

Agentless checks for uptime and your cloud, a lightweight agent for detection on each server, and one console that ranks and explains what it finds.