Pcornel
Observability · Logs

syslog and rsyslog

Cheat sheet · https://pcornel.dk/topic.php?topic=6209

Back to the Topic

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.

Remember

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

First 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

Verify in this order

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

Where it usually breaks

UDP syslog drops messages silently under load.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6209

Confirmation

Confirm action

Continue?