Add multiline support to awss3 input#25710
Conversation
|
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
5b1a550 to
356cb8c
Compare
|
This pull request is now in conflicts. Could you fix it? 🙏 |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
andrewkroh
left a comment
There was a problem hiding this comment.
Awesome 😄 . I took a very quick pass at it. Plan to look a little deeper and try it out tomorrow.
There was a problem hiding this comment.
Can you combine this into a one-liner, e.g. if err = c.forwardEvent(event); err != nil {.
There was a problem hiding this comment.
Do you think these options should be available in the FileSelectorCfg?
There was a problem hiding this comment.
Hmmmm we could...
The use case would be a single S3 bucket that has a mix of multiline and non-multiline log files.
I'll add it, and we can see if we like it.
There was a problem hiding this comment.
The parser options could be combined into a struct that is embedded in both config and FileSelectorCfg to avoid having to duplicate the same config struct tags.
There was a problem hiding this comment.
I'm thinking of changing this so you always have a file_selector, the default is just to match any filename. That should make the config and code paths cleaner. I know we want to get a build out with multiline "soon". You OK with merging as is, with a new PR this week to clean this up?
marc-gr
left a comment
There was a problem hiding this comment.
Do you think could be worth adding a new test with the multiline config in s3_integration_test.go?
|
This pull request is now in conflicts. Could you fix it? 🙏 |
added it. running it is a little weird you have to setup S3 bucket & SQS ahead of time, then upload the 2 sample files, then run Long term I'd like to improve this. |
- only applies to non JSON logstash Closes elastic#25249
Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
52120e1 to
da10563
Compare
|
I think some files need to be formatted |
marc-gr
left a comment
There was a problem hiding this comment.
LGTM once the formatting is fixed
What does this PR do?
Adds multiline and encoding reader support to aws-s3 input. This does
not change the processing of JSON logs by aws-s3 input.
Why is it important?
This is needed so you can read logs that have embedded new lines. For
example XML Windows events.
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
Related issues