Closed ShourieG closed 1 day ago
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)
@ShourieG , would be it possible to replace the script processor with foreach
and grok
with on_failure
to use the default IPV6
pattern provided by the logstash?
would be it possible to replace the script processor with
foreach
andgrok
withon_failure
to use the defaultIPV6
pattern provided by the logstash?
@kcreddy, should we try it for both ipv4/v6 or only ipv6 and leave ipv4 as it is currently ?
@kcreddy, should we try it for both ipv4/v6 or only ipv6 and leave ipv4 as it is currently ?
Makes sense to try for both and use default IPV4
and IPV6
pattern provided. Example in use. It also helps to keep the pattern in sync in case of any future changes to it at source.
To see the full report comment with /test benchmark fullreport
@kcreddy, have updated the logic with a relevant GROK processor but still some scripts were required for cleanup and handling the localhost edge-case scenario. There are some removals in the ip section based on the GROK patterns.
LGTM!
Just a suggestion: Can we consider adding a sample or samples to the pipeline test to capture the pattern observed in the reported issue, handling of localhost etc?
cc @ShourieG
Failed conditions
74.6% Coverage on New Code (required ≥ 80%)
LGTM!
Just a suggestion: Can we consider adding a sample or samples to the pipeline test to capture the pattern observed in the reported issue, handling of localhost etc?
Current tests already contain the localhost pattern @agithomas. The reported issue on the other hand was reporting errors with the existing regex pattern when compiling in elasticsearch.
Package aws - 2.32.0 containing this change is available at https://epr.elastic.co/package/aws/2.32.0/
Type of change
Please label this PR with one of the following labels, depending on the scope of your change:
Proposed commit message
WHAT: Implemented GROK processor based ipv6/v4 parsing. Cleaned up formatting issues across all data streams via elastic-package format.
WHY: The regex pattern used for the ipv6 was overtly complex and caused errors in Elasticsearch. The cleanup was a byproduct of running elastic-package format.
HOW: A new helper pipeline was added containing this new grok processor and helper scripts which are invoked in a foreach processor from the parent pipeline. This approach had to be taken because with existing limitations of one sub processor per foreach and grok being unable to append to existing lists/arrays.
The Elasticsearch error produced is as follows:-
NOTE
The latest commit - elastic-packge build cleaned up a lot of formatting issues, hence there are added changes across many data streams. I think these are good in the long run hence kept them in.
Checklist
changelog.yml
file.Author's Checklist
How to test this PR locally
Related issues
Screenshots