Prerequisites
- A ClickHouse Observability service
- Docker to run the collector examples, or an existing OpenTelemetry Collector Contrib deployment
- For your own logs, syslog files and permission for the collector to read them
- For the demo,
curlto download the sample
Connection details
- Fully managed
- Self-managed
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.http://host.docker.internal:4318. The Docker commands below include the host mapping.
Integration with existing hosts
1
Locate your syslog file
Common locations are Replace the path as needed. If your Linux host writes only to the systemd journal, use the Systemd/Journald guide. This guide reads text files; it does not collect the macOS unified log store.
/var/log/syslog on Ubuntu/Debian, /var/log/messages on RHEL-based systems, and /var/log/system.log for macOS text logs. Inspect the file that exists on your host:2
Configure the collector
Save the matching configuration as The receiver extracts
host-logs.yaml. Choose by the timestamps in your file. Change include to /var/log/host/messages or /var/log/host/system.log if needed. Add other files only if they use the same format.- ISO timestamps
- Traditional syslog
For lines beginning with a timestamp such as
2026-10-15T12:34:56.123456+00:00:hostname, unit, pid (when present), and message, while retaining the original line in Body. It sets service.name to host-service and copies the hostname to host.name. These text formats do not include a severity field, so this configuration does not infer severity from message text.3
Run the collector
Set the connection variables. From the directory containing On macOS, use
host-logs.yaml, run:-v /private/var/log:/var/log/host:ro and allow Docker Desktop access to that directory. Ensure the selected log file is readable by the collector.Keep this terminal open. With start_at: end, the receiver collects new lines written after startup. Generate normal activity that writes to the selected log file.4
Verify logs
Open Search, select your Logs source, filter for
ServiceName:host-service, and select Last 15 minutes. Expand a log to inspect the parsed hostname, unit, PID, and message.Demo dataset
The sample contains 11,658 syslog lines covering 24 hours, including boot messages, SSH activity, firewall blocks, scheduled jobs, and service restarts.1
Download the sample
2
Configure the demo collector
Save this as
host-logs-demo.yaml in the download directory:The demo-only timestamp transform shifts the sample into roughly the past 24 hours, ending two minutes before ingestion. Use the existing-host configuration for your own logs to preserve their original timestamps.
3
Run the demo collector
Set the connection variables, then run from the download directory:Keep the terminal open while the collector exports the sample, and check its output for errors. Starting a fresh container again can duplicate the sample logs.
4
Verify the demo logs
Open Search, select your Logs source, filter for
ServiceName:host-demo, and select Last 2 days. Expand a log to inspect its parsed attributes. Stop the collector with Ctrl+C after verifying the data.Dashboards and visualization
1
2
Import the dashboard
- Open Dashboards and click Import in the upper-right corner.
- Upload
host-logs-dashboard.json. - Map the charts to your Logs source and click Finish Import.
3
View the dashboard
The imported dashboard displays your logs for the selected time range. To isolate the sample from other services, optionally filter for
ServiceName:host-demo. Select Last 2 days to see the full sample.The dashboard includes log volume, system units, SSH activity, firewall blocks, and service restarts. Severity is unset unless your ingestion pipeline supplies it.For your own logs, remove
ServiceName = 'host-demo' AND from the aggregation filters in the SSH activity, Firewall blocks, and security-events charts if present. Then use the dashboard’s service-name filter to select your host logs.Troubleshooting
Collector fails to start
Check the collector terminal for configuration errors. Confirm that the YAML file exists at the mounted path and that the connection variables are set in the terminal where you run Docker.No logs appearing
- Confirm that the file exists on the host and its mounted path matches
include. - Check file permissions and, on macOS, Docker Desktop file sharing.
- For live logs, generate new entries after the collector starts;
start_at: endskips existing content. - Check the collector output for authentication or export errors.
- Check the Logs source, service-name filter, and time range. For the demo, select Last 2 days.
Logs not parsing correctly
Compare a line from your file with the selected timestamp format. Use the matching configuration and adjust the traditional syslog time zone if necessary. Avoid collecting unrelated application log formats with a broad file glob.Next steps
- Set up alerts for authentication failures or service errors.
- Filter by
host.nameor the parsedunitattribute to inspect a particular host or service. - See Sending OpenTelemetry data for deployment guidance.