-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ResponseOps] alert index mapping for events keyword fields do not include ignore_above #187768
Comments
Pinging @elastic/response-ops (Team:ResponseOps) |
@vitaliidm The field mappings for |
@ymao1 , thanks for pointing out on that file. By adding But still, experience failures with the second one, where mapping in
And I think, the reason for it, these mappings are getting overridden somewhere in alerting framework. I was able to find this template, where the wrong mappings possibly originated
"original": {
"doc_values": false,
"index": false,
"type": "keyword"
}, But code that reads ECS properties does not account for that field So, "original": {
"type": "keyword"
}, and susceptible to error due to Lucene symbols limit |
Looks like those are here: |
Regarding |
|
Yes, it does not have |
Sure, that sounds reasonable. |
… document has a non-ECS compliant text field (#187630) (#187673) ## Summary - #187630 - #187768 These changes fix the error on saving the alert > An error occurred during rule execution: message: "[1:6952] failed to parse field [event.original] of type [keyword] in document with id '330b17dc2ac382dbdd2f2577c28e83b42c5dc66eaf95e857ec0f222abfc486fa'..." The issue happens when source index has non-ECS compliant text field which is expected to be a keyword. If the text value is longer than 32766 bytes and keyword field does not have ignore_above parameter set, then on trying to store the text value in keyword field we will hit the Lucene's term byte-length limit (for more details see [this page](https://www.elastic.co/guide/en/elasticsearch/reference/current/ignore-above.html)). See the main ticket for steps to reproduce the issue. --------- Co-authored-by: Vitalii Dmyterko <[email protected]>
Closed with #187673 |
kibana.alert.original_event.*
keyword fields are mismatched with the original event’s mapping in many cases - the ignore_above attribute is not specified in kibana.alert.original_event.*.For example, the event.module mapped as
where as
kibana.alert.original_event.module
mapped asSame event object mappings
Most of the properties have "ignore_above", but some of them like
event.action
not.This leads to issues like #187630, where user can potentially save long text in event.module and everything will work fine as long as ignore_above is specified. If keyword field does not have ignore_above attribute (like kibana.alert.original_event.module) ES will throw an error when user will try to store huge text into that field. The limit is 32766 bytes which is a Lucene’s term byte-length limit https://www.elastic.co/guide/en/elasticsearch/reference/current/ignore-above.html
We would like to have mappings of all event fields to include
ignore_above
, to prevent hitting the limit of 32766.The text was updated successfully, but these errors were encountered: