Skip to main content
RunBook Academy

LinuxXLV · Central LoggingLogging design

Central logging design - the architecture and decisions

Foundation⏱ ~10 minbash

What you'll learn

  • Design a central logging architecture
  • Choose the right transport
  • Decide on processing and storage
  • Plan for retention and access

Prerequisites

Verified against Ubuntu 24.04 LTS · Debian 12 (Bookworm) · RHEL 9.x · Rocky Linux 9.x · AlmaLinux 9.x · Linux kernel 6.1 LTS / 6.6 LTS · systemd 255+ · OpenSSH 8.7p1 (RHEL 9) / 9.6p1 (Ubuntu 24.04) · nftables 1.0.x · chrony 4.x · Pacemaker 2.1.x · Corosync 3.1.x · 2026-08-09

Not yet marked complete on this device.

Central logging aggregates logs from many hosts into one place. This lesson covers the architecture, the design decisions, and the trade-offs.

Why central logging

  • Investigate across hosts: one event often involves multiple hosts.
  • Long-term retention: 30-90 days for compliance.
  • Tamper-evident storage: local logs can be erased by attackers; central logs cannot.
  • Cross-host correlation: e.g. login events from one host to another.
  • Single query interface: search across all hosts.

Architecture

  Hosts                   Transport           Processing            Storage         Access
+---------+              +---------+        +-----------+        +-------+     +--------+
| journald|---TCP/UDP--->| rsyslog |--JSON->|  log      |--->| SIEM  |<----| Grafana|
| rsyslog |              | fluentd |        |  indexer  |        | ES    |     | Kibana |
| app     |              | vector  |        |  (Loki)   |        | Loki  |     |        |
+---------+              +---------+        +-----------+        +-------+     +--------+

Stages:

  1. Sources: journald, rsyslog, application logs.
  2. Transport: rsyslog, fluentd, vector, Filebeat.
  3. Processing: parse, enrich, filter, route.
  4. Storage: Elasticsearch, Loki, Splunk.
  5. Access: Grafana, Kibana, Splunk UI.

Design decisions

Source: journald or rsyslog?

  • journald: systemd-native. Indexed, structured. Lost on reboot by default (configurable).
  • rsyslog: traditional, persisted to disk, syslog format.
  • Both: rsyslog can read from journald and forward.

For modern hosts, journald with rsyslog forwarding is the right default.

Transport: rsyslog, fluentd, vector, or Filebeat?

  • rsyslog: traditional, reliable, low resource use.
  • fluentd / vector: newer, more flexible, structured data.
  • Filebeat: part of Elastic Stack, simple log shipping.

Pick based on existing stack. For new deployments, vector or fluentd are flexible.

Storage: Elasticsearch, Loki, or Splunk?

  • Elasticsearch: full-text search, mature, resource-heavy.
  • Loki: log aggregation designed for Grafana, label-based, less resource than ES.
  • Splunk: commercial, full-featured, expensive.

For Grafana-based monitoring, Loki integrates naturally. For standalone log analysis, Elasticsearch or Splunk.

Retention

  • Hot (1-7 days): searchable, fast storage.
  • Warm (8-30 days): searchable, slower storage.
  • Cold (31-90 days): archived, slower queries.
  • Frozen (>90 days): offline storage, compliance only.

Storage costs scale with retention. Plan capacity.

Knowledge check

Knowledge check · 3 questions

  1. Q1. Which tool is the typical log shipper from a host to a central system?

  2. Q2. Central logging is optional for production hosts.

  3. Q3. Which of the following are valid central log storage backends? Select all that apply.

Passing score: 75%. Answers are checked in this browser.