Star us on GitHub
Star
Menu

Systemd / Journald

Configure Systemd to ship logs to highlight.
1
Install OpenTelemetry Collector Contrib locally

See here for instructions on installing the collector. We assume that systemd/systemctl are already set up. Check out the following OpenTelemetry journald receiver docs that provide additional guidance on installation.

2
Define your OpenTelemetry configuration.

Setup the Contrib OpenTelemetry collector. Check out our example here. Make sure that the journald directory is correct for your systemd/systemctl setup.

receivers: journald: directory: /var/log/journal exporters: logging: sampling_initial: 10 sampling_thereafter: 1000 otlp/highlight: endpoint: 'https://otel.highlight.io:4317' processors: attributes/highlight-project: actions: - key: highlight.project_id value: '<YOUR_PROJECT_ID>' action: insert batch: service: pipelines: logs: receivers: [journald] processors: [attributes/highlight-project, batch] exporters: [otlp/highlight, logging]
Copy
3
Run the collector

Run the OpenTelemetry collector to start streaming the logs to highlight.

./otelcol-contrib --config=config.yaml
Copy
4
Verify your backend logs are being recorded.

Visit the highlight logs portal and check that backend logs are coming in.