Use it to write logs to files, forward logs to a central server, or when messages do not arrive.
rsyslog
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.
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?
message received → rules match facility/severity → written to file and/or queued → forwarded to the server
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
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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 · 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.
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.
rsyslogd -N1— syntax checkjournalctl -b -p warning— warnings and errors since bootjournalctl -u <unit> -f— follow one unit's logls -lh /var/log— log files and sizeslogger -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, andnoneexcludes a facility. - Several selectors are separated by
;, and several facilities by,. - Actions include a file path,
|for a named pipe,@hostfor a remote host, a list of user names, and*for everyone logged in.
Typical rules
| Rule | Effect |
|---|---|
*.info;mail.none;authpriv.none;cron.none /var/log/messages | General log without mail, auth and cron (RHEL style) |
auth,authpriv.* /var/log/auth.log | Authentication log (Debian style) |
kern.=warning /var/log/kern-warn.log | Only warnings from the kernel |
local3.* /var/log/haproxy.log | Application using facility local3 |
*.emerg :omusrmsg:* | Emergencies to all logged-in users |
Modules
| Module | Role |
|---|---|
imuxsock | Messages from the local syslog socket |
imjournal | Reads directly from the systemd journal |
imudp / imtcp | Receive syslog from the network |
omfwd | Forward 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.
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.
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
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%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.
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.
Quick lookup tables
rsyslog operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for rsyslog.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | 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. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin 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 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 | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | rsyslog 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 evidence | Correlated 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 correlation | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It 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 check | Continue 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 boundary | rsyslog |
|---|---|
| Topic path | Logging → rsyslog |
| Runtime state | 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. |
| 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 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 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 boundary | rsyslog 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 rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |