Description
Component(s)
cmd/otelcontribcol, receiver/journald
What happened?
Description
My test setup has a collection through journald-remote/upload.
I set otelcol-contrib on journald-remote server. It collects correctly local journald (from /var/log/journald/$MACHINEID/.journal) but not the ones from upload (in /var/log/journald/remote/.journal).
If on /var/log/journal/, only getting local host logs
If on /var/log/journal/remote, only getting one remote host logs. If using follow and merge, get multiple hosts
Tested with otelcol-contrib 0.111.0 and 0.122.0
systemd-journal-remote 252.36-1~deb12u1
otel calls journalctl --utc --output=json --follow --unit ssh.service --unit sudo.service --unit su --unit systemd-journald.service --unit rsyslog.service --unit otel-collector.service --unit openntpd.service --unit cron.service --priority info --directory /var/log/journal/remote
nok but sudo partially ok. ensure to add otel collector user to systemd-journal-remote group
=>
systemd/systemd#359
systemd/systemd#14911
workaround: call journalctl --utc --output=json --follow --merge
when used on /var/log/journal/remote
Steps to Reproduce
- Setup journald-remote and collect logs from two hosts
- Setup otel to retrieve from journald, either /var/log/journal, either /var/log/journal/remote with above results
Expected Result
- collect logs from all hosts
Actual Result
- Either only local host logs, either a single remote host.
Collector version
0.122.0
Environment information
Environment
OS: "Ubuntu 22.04", "Debian 12"
OpenTelemetry Collector configuration
receivers:
journald:
directory: /var/log/journal
# directory: /var/log/journal/remote
units:
- ssh.service
- sudo.service
- su
- systemd-journald.service
- rsyslog.service
- otel-collector.service
- openntpd.service
- cron.service
[...]
Log output
Additional context
No response