Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

rsyslog

Direct answer

rsyslog is the common syslog daemon: it receives messages (from journald, /dev/log, network), filters them by facility and severity, writes them to files and forwards them over UDP/TCP/TLS.

When to use this

Use it to write logs to files, forward logs to a central server, or when messages do not arrive.

First 30 seconds

1. systemctl status rsyslog — running?

2. rsyslogd -N1 — config valid?

3. logger -p local0.info test — appears in the expected file?

4. Forwarding: ss -tnp | grep rsyslog — connected to the server?

5. Server side receives it?

Operational verification

message received → rules match facility/severity → written to file and/or queued → forwarded to the server

Evidence · next step

For Logging → rsyslog, continue with the first unproven Topic check: Validate the effective rsyslog configuration, includes, input modules, rulesets, templates and action destinations. If that boundary is healthy, advance to the adjacent check: Inject or identify one message with unique timestamp/source text and trace it through local output and queues. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Scope / prerequisiteUse it to write logs to files, forward logs to a central server, or when messages do not arrive.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational evidence path Verify boundary

producer/syslog socket or network input → rsyslog input module → parser/properties → ruleset/filter/template → action queue → file or network output → remote receiver/index → query → workload correlation

Healthy evidence: a uniquely identified test or workload message enters the expected input, matches the intended rule, leaves the correct action without suspension, and is present at the required destination.

Step 2 Verification and output interpretation Verify boundary

Existing fast checks for this Topic. - Validate the effective rsyslog configuration, includes, input modules, rulesets, templates and action destinations.

  • Inject or identify one message with unique timestamp/source text and trace it through local output and queues.
  • Inspect rsyslog internal errors, suspended actions, queue growth and retry state.
  • Verify remote receipt/indexing independently when forwarding is part of the acceptance criterion.

Verification chain. producer/syslog socket or network input → rsyslog input module → parser/properties → ruleset/filter/template → action queue → file or network output → remote receiver/index → query → workload correlation

Step 3 Commands Verify boundary
rsyslogd -N1
cat /etc/rsyslog.d/*.conf
logger -p local0.info test
Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: daemon active state is treated as forwarding evidence, include order is ignored, queue backpressure is unseen, or local write success is used as evidence of remote ingestion.

It does not show behavior outside the captured producer, collection, persistence, retention, forwarding, query or workload scope. rsyslog acceptance or config validation shows only local processing boundaries that were observed, but it does not show remote indexing, retention or application health.

Step 5 Common mistakes Narrow the fault
  • Forwarding over UDP without considering loss.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points

Rules are in /etc/rsyslog.conf and /etc/rsyslog.d/*.conf. Check syntax with rsyslogd -N1. Use TCP (@@host:514) or TLS for reliable forwarding; @host is UDP. A queue (action.resumeRetryCount, disk-assisted queue) avoids loss when the server is down.

Key checks
  • rsyslogd -N1 — syntax check
  • journalctl -b -p warning — warnings and errors since boot
  • journalctl -u <unit> -f — follow one unit's log
  • ls -lh /var/log — log files and sizes
  • logger -p user.info test — send a test message
ReferenceWhat it is1 section · depth on demand

Core model

Trace one representative message from input module/socket through facility/severity or property filters, ruleset ordering, action queue, destination and receiver acknowledgement. Keep config syntax validity, daemon state, queue state and remote receipt as separate boundaries.

ReferenceImportant terms & boundaries5 sections · depth on demand

What this shows and what it does not

rsyslog acceptance or config validation shows only local processing boundaries that were observed, but it does not show remote indexing, retention or application health.

In depth

rsyslog: selectors, actions and forwarding

rsyslog is the most common syslog daemon on Linux. It writes the familiar text files in /var/log, and forwards messages to central collectors. The rsyslog documentation for the traditional sysklogd format describes the rule lines:

  • A selector is facility.priority. The facilities are auth, authpriv, cron, daemon, kern, lpr, mail, news, syslog, user, uucp and local0–local7.
  • The priorities, from lowest to highest, are debug, info, notice, warning, err, crit, alert and emerg.
  • A selector matches the named priority and everything above it. = restricts it to exactly that priority, ! excludes it and everything above, and none excludes a facility.
  • Several selectors are separated by ;, and several facilities by ,.
  • Actions include a file path, | for a named pipe, @host for a remote host, a list of user names, and * for everyone logged in.

Typical rules

RuleEffect
*.info;mail.none;authpriv.none;cron.none /var/log/messagesGeneral log without mail, auth and cron (RHEL style)
auth,authpriv.* /var/log/auth.logAuthentication log (Debian style)
kern.=warning /var/log/kern-warn.logOnly warnings from the kernel
local3.* /var/log/haproxy.logApplication using facility local3
*.emerg :omusrmsg:*Emergencies to all logged-in users

Modules

ModuleRole
imuxsockMessages from the local syslog socket
imjournalReads directly from the systemd journal
imudp / imtcpReceive syslog from the network
omfwdForward to another syslog server

Forwarding to a central collector

In the traditional format, @host forwards over UDP and @@host over TCP. The modern RainerScript form uses omfwd with explicit settings. Pair it with a disk-assisted queue, so messages aren't lost while the collector is unreachable.

host$ cat /etc/rsyslog.d/90-forward.conf
*.* action(type="omfwd" target="logs.example.net" port="514" protocol="tcp"
           queue.type="LinkedList" queue.filename="fwdq" queue.maxDiskSpace="1g"
           queue.saveOnShutdown="on" action.resumeRetryCount="-1")
host$ sudo rsyslogd -N1
rsyslogd: End of config validation run. Bye.
host$ sudo systemctl restart rsyslog
host$ logger -p local3.notice -t haproxy "test message from $(hostname)"
host$ tail -1 /var/log/haproxy.log
host$ ls /var/lib/rsyslog/ | grep fwdq

Validate before restarting

rsyslogd -N1 checks the configuration without starting the daemon. A syntax error otherwise stops logging entirely until the restart is fixed. logger sends a test message with a chosen facility and priority, which shows that the rule and the destination work.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

How it works at runtime

rsyslog is part of Logging → rsyslog. rsyslog is a configurable syslog processing engine that receives messages, parses properties, applies rulesets/selectors/templates, writes files or queues and forwards events to remote destinations; success requires proving the message traversed the intended ruleset and output action.

Topic-specific state model. rsyslog is a configurable syslog processing engine that receives messages, parses properties, applies rulesets/selectors/templates, writes files or queues and forwards events to remote destinations; success requires proving the message traversed the intended ruleset and output action.

Technical metadata. Host/distribution/systemd/rsyslog versions, boot ID, monotonic/realtime timestamp and timezone, NTP/clock state where relevant, producer binary/service/unit/PID/UID, logging transport/API, journal transport/facility/severity/priority, syslog source/destination/transport, file path/device/inode/ownership/permissions, journald storage/rate limits/retention, rsyslog input/ruleset/action/queue, logrotate rule/state/inode handoff, forwarding destination/receiver status, query filters, correlation ID/request ID and original workload result.

Interpretation rule. - rsyslog service active ≠ the intended input module or listener is active.

  • Config validation success ≠ rule ordering sends the message to the intended action.
  • Local file write ≠ remote forwarding succeeded.
  • TCP connection to a collector ≠ the remote platform indexed the event.

Quick reference

rsyslog reads from journald (imjournal) or /dev/log (imuxsock) and writes files or forwards.

# /etc/rsyslog.d/50-remote.conf — forward everything over TCP with a disk queue
*.* action(type="omfwd" target="logs.example.com" port="514" protocol="tcp"
           queue.type="LinkedList" queue.filename="fwd" queue.saveOnShutdown="on" action.resumeRetryCount="-1")
# receive on a log server
module(load="imtcp")
input(type="imtcp" port="514")

rsyslogd -N1                 # config check
systemctl restart rsyslog

Use TLS (gtls driver) for forwarding across untrusted networks, and RFC 5424 format for structured fields.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Limits and how it fails

Primary failure point. rsyslog acceptance or config validation shows only local processing boundaries that were observed, but it does not show remote indexing, retention or application health.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Configuration intent and lifecycle. Decide which component owns retention and forwarding before changing both journald and rsyslog rules. Rotation policy must match daemon reopen behavior.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

Authoritative/upstream documentation reviewed for bounded claims in Logging → rsyslog. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://systemd.io/ · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
rsyslog linuxrsyslog forwardingrsyslog rulesetrsyslog queue
Embedded reference data

Quick lookup tables

rsyslog operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for rsyslog.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective statersyslog is a configurable syslog processing engine that receives messages, parses properties, applies rulesets/selectors/templates, writes files or queues and forwards events to remote destinations; success requires proving the message traversed the intended ruleset and output action.Establish exactly what this Topic owns before crossing into another subsystem.
Fast verificationPin host + boot ID + clock/timezone + event → identify producer/process → identify logging API/socket/file → verify collector receipt → inspect filtering/rate-limit → prove persistence/inode → verify rotation/retention → verify forwarding/remote receipt if required → query exact time/source → correlate with original workload.Use the shortest evidence path first; a fast check is a boundary test, not blanket proof.
Verification chainproducer/syslog socket or network input → rsyslog input module → parser/properties → ruleset/filter/template → action queue → file or network output → remote receiver/index → query → workload correlationTrace requested/configured state through effective state to the observed workload result.
Failure boundaryrsyslog acceptance or config validation proves only local processing boundaries that were observed; it does not prove remote indexing, retention or application health.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated Linux logging evidence can establish this proof path: producer/syslog socket or network input → rsyslog input module → parser/properties → ruleset/filter/template → action queue → file or network output → remote receiver/index → query → workload correlationUse this observation only for the specific claim it actually supports.
Evidence limitIt does not independently prove behavior outside the captured producer, collection, persistence, retention, forwarding, query or workload scope. rsyslog acceptance or config validation proves only local processing boundaries that were observed; it does not prove remote indexing, retention or application health.Do not promote a local success signal into end-to-end or adjacent-dependency proof.
Next troubleshooting checkContinue from the first unproven boundary: reproduce one exact event, align clock/boot/source identity, trace it through collection and storage, then verify retention/forwarding/query scope and independently repeat the original workload.Continue to the next unresolved boundary while preserving the original test condition.

rsyslog · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundaryrsyslog
Topic pathLogging → rsyslog
Runtime statersyslog is a configurable syslog processing engine that receives messages, parses properties, applies rulesets/selectors/templates, writes files or queues and forwards events to remote destinations; success requires proving the message traversed the intended ruleset and output action.
Fast checks- Validate the effective rsyslog configuration, includes, input modules, rulesets, templates and action destinations. - Inject or identify one message with unique timestamp/source text and trace it through local output and queues. - Inspect rsyslog internal errors, suspended actions, queue growth and retry state. - Verify remote receipt/indexing independently when forwarding is part of the acceptance criterion.
Verification chainproducer/syslog socket or network input → rsyslog input module → parser/properties → ruleset/filter/template → action queue → file or network output → remote receiver/index → query → workload correlation Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary.
Failure boundaryrsyslog acceptance or config validation proves only local processing boundaries that were observed; it does not prove remote indexing, retention or application health. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload.
Persistence ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?