-
Notifications
You must be signed in to change notification settings - Fork 487
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
Agent cannot scrape journal for Systemd 246 #524
Comments
Hey, did you figure it out? You may not be the only one that runs into this so I'd like to know how to help people in the future. |
@rfratto oddly after some prodding the agent started picking up journald logs, so I went ahead to close the ticket first. This at least proves that it's not a libsystemd issue that I initially thought. I'll see if I can accurately reproduce it again on another environment. |
Was able to replicate this behavior again. I will re-open the ticket and update my findings. |
Figured out the reason. The default UID/GID for grafana-agent does not have access to systemd-journal group used by Ubuntu 20.10. To solve this:
|
Just a heads up, I'm seeing something kind of like this issue on RHEL8. Although it appears to be related to Promtail, because the behavior I'm seeing is the same in both. I found that I'm unable to scrap journal logs as a non-privileged user. Even when I run the agent/Promtail as root, it only initially ships logs, then goes back to silently failing until I restart it. |
Agent 0.13.x is not scraping any journald logs on Ubuntu 20.10.
Unsure if it is related to this issue grafana/loki#2792 where Loki < 2.1.0 is unable to parse Journald logs due to a backwards-incompatible compression flag enabled in Systemd 246.Seems to me that the loki component is not enabled when only journal targets are defined.
No loki logs were sent to stdout:
This can be verified by enabling static_configs, only the static provider is enabled for the loki component.
Config:
A suitable fix may be to bump up the Loki version here? https://github.com/grafana/agent/blob/main/go.mod#L15 Or to rebuild with updated libsystemd.libsystemd may not be the issue as the journal logs began collecting at some point.
The text was updated successfully, but these errors were encountered: