Skip to main content
Collect systemd journal logs with the OpenTelemetry journald receiver and send them to ClickHouse Observability. Use the demo dataset to try the integration without a Linux host.

Prerequisites

  • A ClickHouse Observability service
  • For your own logs, a Linux host running systemd, with journalctl and permission to read its journal
  • curl, and Docker for the demo

Connection details

Open ClickHouse Observability and go to Team Settings → Data → Managed Telemetry. Copy your OTLP HTTP endpoint and API key. You can use Copy connection details to copy the configuration, or Reveal key to view the masked key.For the OTLP exporter examples below, set these variables in the terminal where you will run the collector:
Replace the placeholders with the exact endpoint, including its port, and API key from your service. Use the base HTTP endpoint without a /v1/logs suffix; the exporter appends the signal path.
The endpoint must be reachable from the monitored host or demo collector. For a destination collector running on the Docker host, use http://host.docker.internal:4318.

Integration with existing systems

1

Verify the journal

On the Linux host you want to monitor:
The receiver uses the host’s journalctl to read available journals. Both persistent and volatile journal storage are supported; you do not need to change storage settings.
2

Download the collector

Run these commands on the monitored Linux host:
The collector runs directly on the host so it can use the installed journalctl. The standard Contrib Docker image does not include that binary.
3

Configure the collector

Save this as systemd-monitoring.yaml:
Journal fields are retained as log attributes, the message becomes the log body, and the hostname becomes a resource attribute. The receiver collects all units at priority info or higher. To restrict collection, add a units list under journald using actual unit names from your host, such as ssh.service or nginx.service.
4

Run the collector

Set the connection variables, then run from the download directory. This command uses administrator permissions to read the system journal and preserves only the two connection variables:
Keep the terminal open. In another terminal, generate a journal entry:
Stop the collector with Ctrl+C when finished testing. For ongoing collection, run it as a systemd service with journal access and configure cursor storage to resume after restarts.
5

Verify logs

Open Search, select Logs, filter for ServiceName:systemd-logs, and select Last 15 minutes. Look for the test message and attributes such as unit and priority.

Demo dataset

The sample contains 1,334 text log entries spanning approximately 48 hours, including SSH activity, scheduled jobs, and service events. It uses the filelog receiver, so no systemd or journalctl installation is needed. The collector refreshes timestamps while preserving the original bodies and spacing between events.
1

Download the sample

2

Configure the demo collector

Save this as systemd-demo.yaml:
The text sample has no journal priority field, so the demo does not assign severity from the message text.
3

Run the demo collector

Set the connection variables, then run from the directory containing both files:
Leave the terminal open while verifying ingestion. Stop with Ctrl+C when finished. Running the demo again re-ingests the sample with refreshed timestamps.
4

Verify demo logs

Open Search, select Logs, filter for ServiceName:systemd-demo, and select Last 2 days. You should see the sample entries with unit, hostname, and message attributes.

Dashboards and visualization

1

2

Import the dashboard

  1. Open Dashboards and click Import in the upper-right corner.
  2. Upload systemd-logs-dashboard.json.
  3. Map the charts to your Logs source and click Finish Import.
3

View the dashboard

Select Last 2 days for the sample and optionally filter for ServiceName:systemd-demo. For live logs, use ServiceName:systemd-logs and a time range covering your records. The dashboard includes log volume, units, SSH events, and service failures.For live journal logs, change the SSH authentication chart’s Body LIKE '%sshd%' condition to LogAttributes['SYSLOG_IDENTIFIER'] = 'sshd'. The live receiver stores the message in Body and the process identifier separately.

Troubleshooting

journalctl not found

Run the live collector on the monitored Linux host with journalctl installed and available in its execution path. The demo uses filelog and does not require it.

No logs appearing

Check the collector output for journal access, authentication, or export errors. Confirm sudo journalctl -n 20 returns entries on the monitored host. If you configured a unit filter, confirm it matches your service names. Generate a new entry after starting collection. In ClickHouse Observability, check the Logs source, service-name filter, and time range. For the demo, select Last 2 days and confirm the sample file is mounted at the configured path.

Next steps