Journal Gateway and Remote Access
What you'll learn: How to expose systemd journal logs via HTTP and push logs to a remote collector for centralized monitoring.
The Core Idea
While rsyslog (lesson 1480) handles traditional syslog-style remote logging, systemd provides its own native mechanisms for centralized journal access. systemd-journal-gatewayd serves journal entries over HTTP/HTTPS, letting you query logs remotely via web requests. systemd-journal-remote receives journal entries from other systems, building a centralized log store while preserving the journal's structured format and metadata.
Think of journal-gatewayd as a "read-only API" for logs, and journal-remote as a "write collector" that gathers logs from multiple machines.
How They Work
Journal Gateway (gatewayd): Runs as a service that exposes journal entries via HTTP on port 19531. Clients can browse logs using curl, web browsers, or custom tools. It supports filtering by time, service, and other fields—exactly like journalctl, but remotely.
Journal Remote (remote): Acts as a receiver that accepts logs sent from other hosts running systemd-journal-upload. It stores incoming logs in separate journals per source machine, maintaining full metadata fidelity.
These tools complement each other: journal-remote consolidates logs centrally, while journal-gatewayd provides flexible remote access to those consolidated logs (or local logs on any system).
Security Considerations
- Authentication: Both services support TLS and client certificates for secure communication.
- Network exposure: Gateway opens HTTP access—always use HTTPS and restrict access by firewall or authentication.
- Data integrity: Remote transfer preserves binary journal format, preventing log tampering during transit when properly configured.
Key Takeaway:
systemd-journal-gatewayd provides HTTP-based remote log querying, while systemd-journal-remote enables centralized journal collection—together they offer native systemd alternatives to traditional syslog infrastructure.