Skip to content

[receiver/journald] support reading from all journals#42721

Merged
andrzej-stencel merged 4 commits into
open-telemetry:mainfrom
belimawr:journald-remote
Sep 16, 2025
Merged

[receiver/journald] support reading from all journals#42721
andrzej-stencel merged 4 commits into
open-telemetry:mainfrom
belimawr:journald-remote

Conversation

@belimawr
Copy link
Copy Markdown
Member

Description

This commit adds the merge option to the configuration, when enabled, it allows reading from all journals, including remote ones. This is accomplished by passing the --merge CLI flag to journalctl.

Link to tracking issue

Fixes #39188

Testing

A unit test is added to the Config struct, the test ensures that if the configuration option is true, the correct CLI flag is added when calling journalctl

A manual test was also performed by configuring systemd-journal-remote on the server running the OTel collector and systemd-journal-upload on a remote server. With the changes from this PR the OTel collector is capable of ingesting the journal from all servers, including the remote one.

For the manual test I used a couple of local VMs running Arch Linux and followed this tutorial to setup systemd-journal-remote/systemd-journal-upload.

This commit adds the `merge` option to the configuration, when
enabled, it allows reading from all journals, including remote
ones. This is accomplished by passing the `--merge` CLI flag to
`journalctl`.
@belimawr belimawr requested review from a team and andrzej-stencel as code owners September 16, 2025 12:50
@github-actions github-actions Bot added the first-time contributor PRs made by new contributors label Sep 16, 2025
@github-actions
Copy link
Copy Markdown
Contributor

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!

Copy link
Copy Markdown
Member

@andrzej-stencel andrzej-stencel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with this option, but it exists and I suppose it's useful.

Thanks for the contribution Tiago!

Comment thread receiver/journaldreceiver/README.md Outdated
Copy link
Copy Markdown
Member

@andrzej-stencel andrzej-stencel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@belimawr
Copy link
Copy Markdown
Member Author

Please add a changelog entry.

Done 3d4b234.

@andrzej-stencel andrzej-stencel merged commit 0f028f4 into open-telemetry:main Sep 16, 2025
186 checks passed
@github-actions github-actions Bot added this to the next release milestone Sep 16, 2025
@belimawr belimawr deleted the journald-remote branch September 19, 2025 15:23
songy23 pushed a commit that referenced this pull request Oct 9, 2025
#### Description

Add mysef as codeowner for the `journaldreceiver`, the receiver is
currently [in need of new
maintainers](#42597)
and I have been contributing where I can. I also meet the codeowner
[requirements](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#requirements):

1. [Be a member of the OpenTelemetry
organization.](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#member)
    -   https://github.com/orgs/open-telemetry/people?query=belimawr
2. (Code Owner Discretion) It is best to have resolved an issue related
to the component, contributed directly to the component, and/or review
component PRs. How much interaction with the component is required
before becoming a Code Owner is up to any existing Code Owners.

My recent contributions to `journaldreceiver`:
-
#42721
-
#42692
-
#42774
-
#43126

Because the `journaldreceiver` has no code owners, I'm tagging the folks
who have been reviewing my PRs.

cc: @andrzej-stencel @atoulme

Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co>
tommyers-elastic pushed a commit to tommyers-elastic/opentelemetry-collector-contrib that referenced this pull request Oct 10, 2025
…43382)

#### Description

Add mysef as codeowner for the `journaldreceiver`, the receiver is
currently [in need of new
maintainers](open-telemetry#42597)
and I have been contributing where I can. I also meet the codeowner
[requirements](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#requirements):

1. [Be a member of the OpenTelemetry
organization.](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#member)
    -   https://github.com/orgs/open-telemetry/people?query=belimawr
2. (Code Owner Discretion) It is best to have resolved an issue related
to the component, contributed directly to the component, and/or review
component PRs. How much interaction with the component is required
before becoming a Code Owner is up to any existing Code Owners.

My recent contributions to `journaldreceiver`:
-
open-telemetry#42721
-
open-telemetry#42692
-
open-telemetry#42774
-
open-telemetry#43126

Because the `journaldreceiver` has no code owners, I'm tagging the folks
who have been reviewing my PRs.

cc: @andrzej-stencel @atoulme

Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co>
ChrsMark pushed a commit to ChrsMark/opentelemetry-collector-contrib that referenced this pull request Oct 20, 2025
…43382)

#### Description

Add mysef as codeowner for the `journaldreceiver`, the receiver is
currently [in need of new
maintainers](open-telemetry#42597)
and I have been contributing where I can. I also meet the codeowner
[requirements](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#requirements):

1. [Be a member of the OpenTelemetry
organization.](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#member)
    -   https://github.com/orgs/open-telemetry/people?query=belimawr
2. (Code Owner Discretion) It is best to have resolved an issue related
to the component, contributed directly to the component, and/or review
component PRs. How much interaction with the component is required
before becoming a Code Owner is up to any existing Code Owners.

My recent contributions to `journaldreceiver`:
-
open-telemetry#42721
-
open-telemetry#42692
-
open-telemetry#42774
-
open-telemetry#43126

Because the `journaldreceiver` has no code owners, I'm tagging the folks
who have been reviewing my PRs.

cc: @andrzej-stencel @atoulme

Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[journaldreceiver] journald-remote not captured. need merge option

3 participants