Pcornel
Browse topics
Options
Recent
Favorites
Observability · Technical reference

syslog and rsyslog

Direct answer

syslog is the standard protocol and format for system logs (facility, severity, RFC 3164/5424, UDP/TCP 514, TLS 6514); rsyslog is a common Linux daemon that receives, filters and forwards them.

When to use this

Use it to collect logs from Linux hosts and network devices.

First 30 seconds

1. Config check: rsyslogd -N1.

2. Listening: ss -lntup | grep 514.

3. Send a test: logger -n <server> -P 514 -T test.

4. Forwarding queue configured.

5. Device logs arriving.

Operational verification

device/app → syslog message → rsyslog → files or forward → log platform

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
OpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines
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.

PlatformOpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines
Scope / prerequisiteUse it to collect logs from Linux hosts and network devices.
What next?2 suggested next steps
Evidence0
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.

2 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 How to verify Verify boundary

Send a test message and find it centrally with the correct host name and time. Confirm disk queues are configured for forwarding.

Step 2 Common failures Narrow the fault

UDP syslog drops messages silently under load. Devices without NTP send wrong timestamps. Forwarding without a queue loses logs during collector outages.

Key points

Prefer TCP or TLS over UDP for reliability. Use disk-assisted queues in rsyslog so logs survive outages. Check config with rsyslogd -N1.

Key checks
  • rsyslogd -N1 — first check for this topic
  • curl -s localhost:9090/-/ready — Prometheus ready
  • curl -s 'localhost:9090/api/v1/query?query=up' — scrape targets up/down
  • promtool check config prometheus.yml — config valid
ReferenceWhat it is1 section · depth on demand

How it works

rsyslog reads from the journal or /dev/log, applies rules (by facility, severity or program) and forwards with queues that buffer during outages.

ReferenceImportant terms & boundaries3 sections · depth on demand

rsyslog examples

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

Documented example, not captured output. Test with logger -p local0.warn "test". Use TLS (gtls driver) across untrusted networks; RFC 5424 format includes structured data and precise timestamps.

In depth

Message format and transport

RFC 3164 (BSD)RFC 5424
TimestampNov 27 09:14:03 — no year, no zone2026-11-27T09:14:03.120+01:00
StructureFree text after the tagStructured data elements [id key="value"]
UseLegacy devicesPreferred where supported
TransportDeliveryNote
UDP 514Best effort, silent lossStill common on network devices
TCP 514 / RELPReliable while connected; RELP confirms per messageUse with a queue
TLS 6514Encrypted and authenticatedNeeds certificates on both ends

Forwarding that survives an outage

# /etc/rsyslog.d/60-forward.conf
action(type="omfwd" target="logs.example.com" port="6514" protocol="tcp"
       StreamDriver="gtls" StreamDriverMode="1" StreamDriverAuthMode="x509/name"
       StreamDriverPermittedPeers="logs.example.com"
       queue.type="LinkedList" queue.filename="fwd_logs" queue.maxDiskSpace="1g"
       queue.saveOnShutdown="on" action.resumeRetryCount="-1")

The disk-assisted queue buffers messages while the collector is unreachable and sends them afterwards; without it, messages are lost during the outage.

Testing the path

logger -p local0.warning -t pcornel-test "forwarding test $(date -Is)"
rsyslogd -N1                          # validate configuration
journalctl -u rsyslog --since -5min   # connection and queue errors

Network devices

Cisco IOS: logging host 10.0.0.50 transport tcp port 514, logging trap informational, service timestamps log datetime msec localtime show-timezone, and NTP. Without NTP and timestamps, device messages arrive with the collector's receive time only, and correlation across devices fails.

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

Common mistakes

  • Forwarding over UDP without loss awareness.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
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
syslog and rsyslogrsyslog forwardingsyslog facility severity
Confirmation

Confirm action

Continue?