Open maryam-saeidi opened 1 year ago
Pinging @elastic/response-ops (Team:ResponseOps)
@ymao1 What are your thoughts about this?
Definitely worth discussing! Since we'd be using the dynamic mapping in conjunction with alerts as data fields, what happens when we have a kibana.alert.*
field that matches a dynamic mapping path match or falls into the all_strings_to_keywords
bucket but we want a different mapping than defined for the ECS mappings? What takes precendence?
We should probably also get the opinion of @elastic/security-detections-response-alerts since the use the ECS fields most heavily. It would be good to do a POC to make sure transitioning from a static to a dynamic template on upgrade is possible and seamless.
@ymao1 specific field mappings always takes priority over dynamic templates. First the field is checked to see if a mapping exists, if not the matching with dynamic template is applied.
A few things that would need to be considered is that you have dynamic:false set because you don't want to map non-ecs fields, it might be hard to run dynamic templates while also disabling this for non-ecs fields. This could result in a larger field count since the custom fields also gets a field mapping.
But im sure there are ways around it :)
📝 Summary
In Alert-As-Data (AAD), all the ECS fields are added statically to the mapping. In this ticket, I would like to discuss if it is a good idea to change it to dynamic mapping and how it can be done. (Slack discussion)
Motivation
@P1llus mentioned:
@simianhacker mentioned that when we add ECS fields statically, many fields are added to the mapping regardless of whether they are used or not, and as a result, in the KQL suggestion bar, the user will face many fields that many of them probably are not relevant.
Challenge
The challenge is ensuring dynamic mapping will not exceed the limit set for the number of fields in alerting. Here is the limit, which seems 1900 of them are ECS fields. This limitation was discussed in this RFC as well.
Possible solution
One solution to solve this issue is using
true_until_limit
that will be introduced in this PR. But @pmuellr shared this concern:✅ Acceptance Criteria