-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
tail_files should persist initial offset as end of file #2788
Comments
beats/filebeat/crawler/prospector.go Lines 402 to 405 in 162fb25
If the |
This should be solved together with #2613 by moving Please note that in the 5.0 release the correct state is written as soon as the file is closed. |
tail_files is now only applied on the first run and after that ignored. Also the state for all files falling under tail_files and not having a state, a state will directly be written. * Implement tail_files by setting ignore_older to 1ns for the first run * Fix typo in stats variable names Closes elastic#2613 and elastic#2788
tail_files is now only applied on the first run and after that ignored. Also the state for all files falling under tail_files and not having a state, a state will directly be written. * Implement tail_files by setting ignore_older to 1ns for the first run * Fix typo in stats variable names Closes #2613 and #2788
Closing as this was solved in #2932 and should be available in 5.1. As 5.0 is GA and filebeat 5.0 is backward compatible, I suggest we do not try to backport this. |
At startup Filebeat initializes the registry with info about the file that it opens (but this does not contain an offset so it’s left as 0). This is the expected behavior for
tail_files: false
as we do not want to advance the offset until some data has been read. But fortail_files: true
my personal expectation is that it would initially write the offset as the end of the file, instead of 0, so that if Filebeat exits it can resume reading from that point.out.log
.tail_file: true
.Config:
The text was updated successfully, but these errors were encountered: