-
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
[Filebeat] Check expand_event_list_from_field before checking content-type #16441
Conversation
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.
the code change lgtm!
I have a question if these config options and how all of them are combined and prioritised are documented for the users. Would this be useful? 🤔
Ahh good point! I don't think we have how these options combined and prioritized documented! Let me add some under |
What does this PR do?
This PR is to fix s3 input reading json format logs. When
expand_event_list_from_field
config is given, such as cloudtrail fileset, s3 input should usejson.NewDecoder
first. If thisexpand_event_list_from_field
is not given, then check content-type and usegzip.NewReader
.Why is it important?
This will fix s3 input when using cloudtrail fileset.
Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature worksRelated issues
Screenshots
When Metadata is set as below:
I was able to read the cloudtrail json.gz file as shown below in Kibana: