-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add journald receiver #2332
Comments
could assign this one to me if no one is working on it. I saw OTel-log-collection supported journaled_input, which seems to use internal/stanze/createLogsReceiver can resolved this issue |
Thank you @wph95. We'll happily accept the help. You've got the idea exactly right. internal/stanza should make it fairly easy to create the new receiver using journald_input, which will look very similar to filelogreceiver. |
@wph95 Do you need some help? I made some research around using
I believe this can be useful |
Thank you for your helpful message. I'm waiting for the Syslog receiver to finish and start doing the journal, and this tip is very useful for me. by the way, I'm thinking about opentelemetry-log-collection use |
Yes, preferably we should not have a dependency on an external binary. (Is However, we need to consider whether https://github.com/coreos/go-systemd/ is mature enough and how much more work it would be to use it instead of the existing opentelemetry-log-collection solution. |
Any progress on this? Would love be able to pull in |
@ttomsu, thanks for bringing this up. I think the next steps are to address Tigran's points. If we end up depending on To that end:
I believe the short answer is Yes.
|
We bundle systemd (which includes journalctl) into Stanza image. Before that, we required CGO. The decision was made that relying on a binary (inside the docker image) was preferable. Image size is much larger using this method. |
Friendly ping - we have users interested in this functionality. |
we will be working on this. |
We are implementing it with
|
Hello, like said in the associated PR, maybe an alternative to the dirty docker trick could be to propose install What do you think about that ? The collector stay platform / OS independant, and a good help ton configure the journal-gateway service could be enougth. EDIT: man of journal-gateway https://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html |
@gillg What in case, user cannot/doesn't want to modify systemd configuration, for example on kubernetes nodes? |
It can be a solution, seems a little bit tricky. Else, we could provide help with a dedicated daemonset init container, which mount the full host FS (like a node exporter does), then chroot on it to install the journal-gateway service, configure it to point on otel collector, and terminate. It's the same design than kube makes to install CNI on every new nodes. Any other ideas are welcome. |
Journald is used for many Kubernetes deployments, for example:
|
Regarding the final feature I don't see any missing things if we use the remote journalctl interface instead of the binary journalctl. If you want expose journald in a readable format, journalctl is the way localy and journald-gateway is the way remotely. Final possible solution :
receiver:
journald:
mode: gateway #in mode gateway endpoint is needed, in eventual mode local, directory and files can be used instead
endpoint: http://journald-gateway:19531/
units:
- ssh
- kublet
- dockerd
priority: info
# directory and files parameters can be passed to the journald-gateway container at startup but not at otel-collector level All documentation here https://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html#Supported%20URLs This imply to contribute on stanza side to change a little the way to call journalctl (web endpoint instead of subprocess, but with equivalent features) Finally... If a user really want to use journalctl in otel container, he can create and maintain its own layer with all |
@gillg @djaglowski this will give us the checkpoints support that is available in the stanza library, right? I like the suggested approach, but I think that being able to store checkpoints should be a requirement to avoid data duplication/loss. |
@dmitryax It appears that |
@djaglowski Nice! I think we can introduce the first version relying on |
@dmitryax assuming we skip the changes in Dockerfile and if a user want use it he creates his own image ? In my opinion it makes sense for a beginning :) |
By the way... @tigrannajaryan do you think that a sidecar image with journald gateway should be part of opentelemtry "tools" and hosted in otel docker repo ? |
Link to tracking Issue: #2332 Testing: Unit tests are included Documentation: Journald receiver README.md is included
Resolved by #5160 If there is an additional interest in discussing the docker packaging please open a separate issue. |
Dependent on #2268
The text was updated successfully, but these errors were encountered: