-
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
S3 input: try to detect GZIPped objects #18764
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ycombinator
added
in progress
Pull request is currently in progress.
Team:Platforms
Label for the Integrations - Platforms team
labels
May 27, 2020
botelastic
bot
added
the
needs_team
Indicates that the issue/PR needs a Team:* label
label
May 27, 2020
Pinging @elastic/integrations-platforms (Team:Platforms) |
botelastic
bot
removed
the
needs_team
Indicates that the issue/PR needs a Team:* label
label
May 27, 2020
andresrc
added
[zube]: Inbox
needs_team
Indicates that the issue/PR needs a Team:* label
labels
May 27, 2020
botelastic
bot
removed
the
needs_team
Indicates that the issue/PR needs a Team:* label
label
May 27, 2020
andresrc
added
[zube]: In Progress
needs_team
Indicates that the issue/PR needs a Team:* label
and removed
[zube]: Inbox
labels
May 27, 2020
botelastic
bot
removed
the
needs_team
Indicates that the issue/PR needs a Team:* label
label
May 27, 2020
ycombinator
added
[zube]: In Review
needs_backport
PR is waiting to be backported to other branches.
v7.9.0
v8.0.0
Filebeat
Filebeat
and removed
[zube]: In Progress
in progress
Pull request is currently in progress.
labels
May 28, 2020
ycombinator
changed the title
WIP: S3 input: try to detect GZIPped objects
S3 input: try to detect GZIPped objects
May 28, 2020
zube
bot
changed the title
S3 input: try to detect GZIPped objects
WIP: S3 input: try to detect GZIPped objects
May 28, 2020
jsoriano
reviewed
May 28, 2020
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.
Nice! I have added a couple of questions and suggestions.
jsoriano
approved these changes
May 28, 2020
exekias
approved these changes
May 28, 2020
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.
Nice improvement!
ycombinator
changed the title
WIP: S3 input: try to detect GZIPped objects
S3 input: try to detect GZIPped objects
Jun 3, 2020
This was referenced Jun 3, 2020
ycombinator
added a commit
that referenced
this pull request
Jun 3, 2020
ycombinator
added a commit
that referenced
this pull request
Aug 4, 2020
* S3 input: try to detect GZIPped objects (#18764) * Try to detect GZIP based on content encoding header * Check GZIP contents * Log error before returning it * Fixing typo * Add comment * Adding comment * Adding CHANGELOG entry * Add test case for empty contents * Cleaning up CHANGELOG
melchiormoulin
pushed a commit
to melchiormoulin/beats
that referenced
this pull request
Oct 14, 2020
* Try to detect GZIP based on content encoding header * Check GZIP contents * Log error before returning it * Fixing typo * Add comment * Adding comment * Adding CHANGELOG entry * Add test case for empty contents
leweafan
pushed a commit
to leweafan/beats
that referenced
this pull request
Apr 28, 2023
…c#18944) * S3 input: try to detect GZIPped objects (elastic#18764) * Try to detect GZIP based on content encoding header * Check GZIP contents * Log error before returning it * Fixing typo * Add comment * Adding comment * Adding CHANGELOG entry * Add test case for empty contents * Cleaning up CHANGELOG
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
needs_backport
PR is waiting to be backported to other branches.
Team:Platforms
Label for the Integrations - Platforms team
test-plan
Add this PR to be manual test plan
test-plan-added
This PR has been added to the test plan
v7.9.0
v8.0.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR enhances the S3 input to try harder to automatically detect GZIPped objects.
Why is it important?
Sometimes objects returned by the S3 API are gzipped but don't come with proper headers indicating their gzipped nature. So we try different ways to auto-detect if the object is gzipped.
Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Follow the instructions in https://www.elastic.co/blog/getting-aws-logs-from-s3-using-filebeat-and-the-elastic-stack to setup an S3 bucket and SQS queue and configure Filebeat. When configuring Filebeat use the
console
output for easy debugging.Create a sample log file.
Gzip the sample log file while keeping the original around.
Make a copy of the gzipped file, but remove the gzip extension to try and "fool" our S3 input.
Start Filebeat
One by one, upload the 3 files to your S3 bucket. After each upload, check the Filebeat log to make sure there are no errors. Also make sure that the S3 input successfully generates the expected events.
Related issues