-
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
Skipping unparsable lines in docker input #12268
Skipping unparsable lines in docker input #12268
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
jenkins test this |
filebeat/input/log/harvester.go
Outdated
@@ -276,6 +276,10 @@ func (h *Harvester) Run() error { | |||
logp.Info("End of file reached: %s. Closing because close_eof is enabled.", h.state.Source) | |||
case ErrInactive: | |||
logp.Info("File is inactive: %s. Closing because close_inactive of %v reached.", h.state.Source, h.config.CloseInactive) | |||
case reader.ErrLineUnparsable: | |||
logp.Err("Skipping unparsable line in file: %v", h.state.Source) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I think this log message should be Info, as we have already emitted an error message from DockerJSON
with the error message. To me this is rather a notification telling the user that a line was skipped due to an error before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you have changed the wrong line for the case default
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this time, I changed what i was supposed to change ;)
cbaafbf
to
eda4a25
Compare
7789894
to
5c3ab65
Compare
Thank you for opening, this is defensive code that should help when this problems arises. Could you add an entry in |
would love to see some unit tests in |
5c3ab65
to
281f5b9
Compare
@exekias changelog entry added, unit tests for docker_json changed to cover error message verification |
jenkins, test this please |
(cherry picked from commit 3451d06)
Will this be backported to 6.x? Really hitting this with a bunch of our containers |
(cherry picked from commit 3451d06)
I've opened a backport to 6.8 branch: #12813 |
Hello. Regardless, thanks for this: looking forward to update Filebeat and get rid of this issue. We have had long running containers that logged nothing for the last 4 days because of the issue that this code fixes. |
Hello. Any update about the release of the 7.2.1 Docker image? Thanks in advance :) |
… input (elastic#12608) * Skipping unparsable lines in docker input (elastic#12268) (cherry picked from commit 0cc16fd)
fix proposal for problem referenced in https://discuss.elastic.co/t/input-docker-stuck-when-bad-offset-is-saved-in-registry-file-bug/181828 where docker input is unparsable (either input itself is corrupted, or offset in registry is corrupted)