-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
systemd input not showing in output #497
Comments
For what it's worth, this is reproducible without using a custom systemd unit:
Empty output when sshd events are entered into journald. |
the following command works properly:
note that -p needs to be right after the plugin that you want to modify the property. Adding -p after -o stdout means "set that property to stdout". |
@edsiper ah ok. Unfortunately when I use your exact command, I still get nothing. Looks like the systemd input plugin is not working altogether. Debug output is showing me nothing relevant. What's the way to troubleshoot this? I must be missing something. Or I should just use the rpm that you package up 😄 |
can you try adding a path to the systemd journal files ?, e.g:
|
Unfortunately that didn't work either (my path was |
what about if you append -vv at the end of the command line, do you see any extra message ? |
@trstringer please give me the details of that Linux distro (specific version) to try to replicate the problem |
@edsiper sorry for the delay. Regarding
Regarding the Linux machine itself:
|
Same here.
Host OS ubuntu artful:
In another console:
I can see this messages with journalctl:
Also with |
On this machine:
all works fine |
there is a new fix associated to systemd, would you please rebuild GIT master and test if the problem you describe is fixed ? ref: #500 |
@edsiper After rebuilding docker image from fluent-bit git master problem is not solved:
|
@s-kostyaev did you check that journalctl works inside the docker image ? |
there is no journalctl inside container https://github.com/fluent/fluent-bit-docker-image/blob/master/0.12/Dockerfile
|
@s-kostyaev make sure fluent-bit have access to the journal files (file system), otherwise it will not work. |
That did work for me! Worth noting, I had to run fluent-bit with root privileges. I'm guessing that has to do with journal access requirements. |
@trstringer did you use the latest from GIT master ? |
@edsiper yes I did. It worked running as root, but without root privs it didn't work. That's expected though right? |
well, I think it depends on how each distribution set permissions in Journal files. I am happy to hear the problem has gone :) |
@edsiper I can see journal files from container:
|
@s-kostyaev since fluent bit is not part of "input or root" groups, it cannot get access to the files. |
@edsiper fluent-bit inside container is running by root user. |
I just hit the very same issue. I've done the following experiment (inside container):
Logs show that it tries to watch
But it never gets any notification (I'm sure there were updates while tracing):
...which make sense, given what
In fact, it starts to work if I specify |
I found a little time to dig into the source code, and the issue is obvious now. The plugin uses systemd API (namely And now - I'm not sure what is the best solution here, but mounting the file from host into container seems the best option (e.g. |
I can confirm that mounting the file /etc/machine-id read-only works. Example of what needs to be added:
|
To add notes for others here, I ran into problems here as well. I didn't need to add |
@lucaim , what should be the path in the Config map/ INPUT ?
|
Sorry to resurrect a dead thread, but since I found this one, maybe others will too. I'm still facing the same problem with /etc/machine-id and /var/log/journal mounted in the container. Surprisingly my strace shows that fluent-bit in the container IS getting notified correctly, it mmaps the system.journal then immediately munmaps it and never prints anything out. I ran fluent-bit for a minute and it didn't print anything and journalctl/systemd-cat on the host OS both confirm messages were going by. I've also tried this experiment without the Read_From_Tail. Any advise would be amazing
Here's some juicy lines from my straceout
And then an example successful, ie no EAGAIN, read from fd=20
I'm using the Dockerfile.x86_64 from the github for FLB_VERSION 1.7.1. My command to launch the container is
Extra notes:
|
Okay I believe I have resolved this as an upstream issue with systemd. It looks like those package maintainers changed the default binary storage format between buster (the fluent-bit container) and bullseye (my host machine). Once I rebuilt Dockerfile.x86_64 with bullseye-slim the problem went away. For future techno-archeologists, I installed the systemd and tried to used the container's journalctl to debug the issue (which gave more useful prompts about the binary format). See upstream discussion: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968055 |
I have the following configuration:
For some reason, Fluent Bit isn't picking up the journal entries for the
bashdaemon.service
unit. This screenshot below (direct link) shows this:journalctl
output tailing with a filter on thebashdaemon.service
unitAny thoughts on why Fluent Bit may not be ingesting these systemd unit journal entries? Or how to troubleshoot this?
Thanks in advance!
The text was updated successfully, but these errors were encountered: