-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Make current journal log file distinguishable from rotated journal log files #7050
Comments
can you explain how you get that journal? |
@f8-ptrk you can find a |
thanks. fascinating the file date doesn't work for loki to find the newest one? |
Well the file date is incremented based on build date of the binary... or something like that, note the file creation dates and the dates in the log filenames:
|
src: https://grafana.com/docs/loki/latest/clients/promtail/configuration/#example-static-config |
bigger problem i see is that promtail maybe will block log files from being rotated at all if running on the output file itself we currently just custom parse them into influx format and wire them over to the db with custom go code. the golog files. but it's pretty high up the list to get the full log complex parsed including systemd journal etc |
I haven't seen promtail have an issue with rotated files. https://grafana.com/docs/loki/latest/clients/promtail/troubleshooting/#a-tailed-file-is-truncated-while-promtail-is-not-running |
Checklist
Ideas
.Lotus component
Other
Improvement Suggestion
I am trying to get Loki to scrape journal logs atm and it is difficult with the current naming of the journal log files as there is no way to distinguish from the current log file and which files have been rotated.
Currently, they all look like the following:
Ideally, they would look like the following:
This way a simple pattern match can be used to capture only the current log file.
The text was updated successfully, but these errors were encountered: