-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Support systemd without files #1286
Comments
Could you provide any more information that might help me figure out what needs to be changed? I took a look at the fluentbit code and the only obvious difference I could find is that Promtail always calls |
I came to the same conclusion as you. https://www.freedesktop.org/software/systemd/man/sd_journal_open.html
It means that sd_journal_open can read journald volatiles logs (not persisted to disk) |
One good reason to support this is that it is Red Hat Entreprise Linux 7 default. |
Gotcha, thanks for the help. Looking into it more, it's not necessarily the flags that you pass (fluentbit hard-coded See add_search_paths for how systemd reads volatile logs, and how I'll work on a PR for this tomorrow. Thanks for reporting! |
Yes I pasted the flag because it mentions volatile logs, we don't need it. Also in RHEL7 there is no /var/log/journal by default so promtail-journal does not work out of the box here. |
Ok, so in my case I could use /run/log/journal to read those logs with loki. |
for the record:
works |
The forced default path for the journal target (/var/log/journal) did not apply to all Linux systems: systemd actually defaults to reading from _two_ default paths: /var/log/journal and /run/log/journal. Not setting an explicit default will enable both of those paths to be searched for journal logs. The comment mentioning the local machine ID was technically accurate, but is normally dealt with by bind mounting /etc/machine-id. That's the standard approach for running fluent-bit in a container, and should be the standard approach for Promtail as well. Fixes grafana#1286.
* pkg/promtail: remove journal target forced path The forced default path for the journal target (/var/log/journal) did not apply to all Linux systems: systemd actually defaults to reading from _two_ default paths: /var/log/journal and /run/log/journal. Not setting an explicit default will enable both of those paths to be searched for journal logs. The comment mentioning the local machine ID was technically accurate, but is normally dealt with by bind mounting /etc/machine-id. That's the standard approach for running fluent-bit in a container, and should be the standard approach for Promtail as well. Fixes #1286.
Currently promtail requires systemd to flush its files to disk.
As fluentbit is doing it, it is possible to read journald without requiring it to flush on disk.
The text was updated successfully, but these errors were encountered: