Use it to collect logs from Linux hosts and network devices.
syslog and rsyslog
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.
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.
device/app → syslog message → rsyslog → files or forward → log platform
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 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.
Prefer TCP or TLS over UDP for reliability. Use disk-assisted queues in rsyslog so logs survive outages. Check config with rsyslogd -N1.
rsyslogd -N1— first check for this topiccurl -s localhost:9090/-/ready— Prometheus readycurl -s 'localhost:9090/api/v1/query?query=up'— scrape targets up/downpromtool 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 | |
|---|---|---|
| Timestamp | Nov 27 09:14:03 — no year, no zone | 2026-11-27T09:14:03.120+01:00 |
| Structure | Free text after the tag | Structured data elements [id key="value"] |
| Use | Legacy devices | Preferred where supported |
| Transport | Delivery | Note |
|---|---|---|
| UDP 514 | Best effort, silent loss | Still common on network devices |
| TCP 514 / RELP | Reliable while connected; RELP confirms per message | Use with a queue |
| TLS 6514 | Encrypted and authenticated | Needs 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.
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
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.