-
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
Fix httpjson split issue on empty root array #32001
Conversation
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
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 should have a line in CHANGELOG.next.asciidoc and probably wants a backport to the relevant versions.
@marc-gr does this only need to be applied for split on Array, or also on map/string? |
This pull request is now in conflicts. Could you fix it? 🙏
|
This pull request is now in conflicts. Could you fix it? 🙏
|
This pull request is now in conflicts. Could you fix it? 🙏
|
This pull request is now in conflicts. Could you fix it? 🙏
|
@kcreddy , please resolve the conflict , otherwise LGTM |
CHANGELOG.next.asciidoc
Outdated
- Do not emit error log when filestream reader reaches EOF and `close.reader.on_eof` is enabled. {pull}31109[31109] | ||
- sophos.xg: Update module to handle new log fields. {issue}31038[31038] {pull}31388[31388] | ||
- Fix MISP documentation for `var.filters` config option. {pull}31434[31434] | ||
- Fix type mapping of client.as.number in okta module. {pull}31676[31676] | ||
- Fix handling of empty array in httpjson input. {pull}32001[32001] | ||
- Fix last write pagination commit checkpoint on `aws-s3` input for s3 direct polling when using the same bucket and different list prefixes. {pull}31776[31776] | ||
- If a file is ignored by `filestream` because of ignore_older settings, when it is updated, only the new lines are shipped to the output. {issue}31924[31924] {pull}31972[31972] | ||
- Adding a fix for threatintel module where MISP was paginating forever. {pull}31784[31784]xs | ||
- Fix deduplication in Google workspace module by changing fingerprint processor target field from `@metadata.id` to `@metadata._id`. {pull}31898[31898] | ||
- Fix handling and mapping of syslog priority, facility and severity values in Cisco module. {pull}32025[32025] | ||
- Fix http_endpoint input TLS handshake failures. {pull}32105[32105] |
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.
- Do not emit error log when filestream reader reaches EOF and `close.reader.on_eof` is enabled. {pull}31109[31109] | |
- sophos.xg: Update module to handle new log fields. {issue}31038[31038] {pull}31388[31388] | |
- Fix MISP documentation for `var.filters` config option. {pull}31434[31434] | |
- Fix type mapping of client.as.number in okta module. {pull}31676[31676] | |
- Fix handling of empty array in httpjson input. {pull}32001[32001] | |
- Fix last write pagination commit checkpoint on `aws-s3` input for s3 direct polling when using the same bucket and different list prefixes. {pull}31776[31776] | |
- If a file is ignored by `filestream` because of ignore_older settings, when it is updated, only the new lines are shipped to the output. {issue}31924[31924] {pull}31972[31972] | |
- Adding a fix for threatintel module where MISP was paginating forever. {pull}31784[31784]xs | |
- Fix deduplication in Google workspace module by changing fingerprint processor target field from `@metadata.id` to `@metadata._id`. {pull}31898[31898] | |
- Fix handling and mapping of syslog priority, facility and severity values in Cisco module. {pull}32025[32025] | |
- Fix http_endpoint input TLS handshake failures. {pull}32105[32105] | |
- Fix handling of empty array in httpjson input. {pull}32001[32001] |
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.
Added the line at the end
Other than the changelog conflicts, does this need anything else before merging? @kcreddy |
@andrewkroh Sorry my bad, I thought this was merged long back. Resolved merge conflicts. This can be merged once approved |
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.
LGTM
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.
LGTM after changelog is fixed.
* Fix httpjson split issue on empty root arrayPublish events * update asciidoc * update changelog * remove old lines (cherry picked from commit 0334634) # Conflicts: # x-pack/filebeat/input/httpjson/split.go # x-pack/filebeat/input/httpjson/split_test.go
* Fix httpjson split issue on empty root arrayPublish events * update asciidoc * update changelog * remove old lines (cherry picked from commit 0334634)
…33102) * Fix httpjson split issue on empty root array (#32001) * Fix httpjson split issue on empty root arrayPublish events * update asciidoc * update changelog * remove old lines (cherry picked from commit 0334634) # Conflicts: # x-pack/filebeat/input/httpjson/split.go # x-pack/filebeat/input/httpjson/split_test.go * move to internal/v2 * remove as duplicated in internal/v2 * linting error never wrapped Co-authored-by: Krishna Chaitanya Reddy Burri <krish.reddy91@gmail.com>
* Fix httpjson split issue on empty root arrayPublish events * update asciidoc * update changelog * remove old lines
What does this PR do?
Fix httpjson split issue on empty root array. This fix publishes the event with key in case of empty root array
Why is it important?
This is a bug fix on filebeat httpjson input where no event is being published when splitting empty root array. The desired outcome is to publish event with array.
Checklist
[ ] I have commented my code, particularly in hard-to-understand areas[ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Related issues