-
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
Set ignore_malformed=true on .alerts-* indices #161465
Comments
Pinging @elastic/response-ops (Team:ResponseOps) |
…ex template settings (#163414) Resolves #161465 ## Summary Adds `ignore_malformed: true` to alerts index template settings. This ignores malformed content globally across all allowed mapping types. For existing alerts as data indices, the new setting is not applied directly to the existing concrete indices but will be applied whenever the alias rolls over and a new concrete index is created. ## Verify - Verify that after upgrading alerts indices created in an older version to this branch, alerts continue to be written and read as expected. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Vitalii Dmyterko <[email protected]>
…ex template settings (elastic#163414) Resolves elastic#161465 ## Summary Adds `ignore_malformed: true` to alerts index template settings. This ignores malformed content globally across all allowed mapping types. For existing alerts as data indices, the new setting is not applied directly to the existing concrete indices but will be applied whenever the alias rolls over and a new concrete index is created. ## Verify - Verify that after upgrading alerts indices created in an older version to this branch, alerts continue to be written and read as expected. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Vitalii Dmyterko <[email protected]>
Reverted due to possible bug with When that issue is fixed, we can revert this revert. |
We raised this 2 years ago after seeing indicator_match alerts not being raised because of the user_agent field. Ignore_malformed sounds like the best way to fix this issue. |
As a work-around for the problem with See elastic/elasticsearch#98511 for more details. Sounds like we might change the way this works in the future to allow the original code to work (using the setting AND having a |
@pmuellr thanks for the update, does that mean we're unblocked and we can go forward with the approach you described?
Seems reasonable to me. |
We are unblocked; but we'll need to change the mappings for serverless to remove the |
My original testing for this was broken somehow. I thought it wasn't possible to use an index-level setting for Not sure if we want to use the same template for data streams / indices, or have them differ just by the Here's a complete incantation that works: PUT _index_template/pmuellr-index-template
{
"index_patterns": ["pmuellr-data-stream"],
"data_stream": { },
"template": {
"settings": {
"index.mapping.ignore_malformed": true
},
"mappings": {
"properties": {
"@timestamp": {
"ignore_malformed": false,
"type": "date"
},
"message": {
"type": "text"
}
}
}
}
} |
Resolves elastic#161465 This is a re-do of elastic#163414, which we had to revert since data streams do not support `ignore_malformed` on the `@timestamp` field. We now specifically add `ignore_malformed: false` for that field, and then use `ignore_malformed: true` at the index level. This ignores malformed content globally across all allowed mapping types. For existing alerts as data indices, the new setting is not applied directly to the existing concrete indices but will be applied whenever the alias rolls over and a new concrete index is created. - Verify that after upgrading alerts indices created in an older version to this branch, alerts continue to be written and read as expected.
Resolves #161465 This is a re-do of #163414, which we had to revert since data streams do not support `ignore_malformed` on the `@timestamp` field. We now specifically add `ignore_malformed: false` for that field, and then use `ignore_malformed: true` at the index level. This ignores malformed content globally across all allowed mapping types. For existing alerts as data indices, the new setting is not applied directly to the existing concrete indices but will be applied whenever the alias rolls over and a new concrete index is created.
Feature Description
Currently, the
.alerts-*
indices do not have ignore_malformed set. As a result, alerting rule implementors are responsible for ensuring that the alerts they generate are compatible with the mappings of the associated.alert-*
indices. If the alerts aren't compatible, then the alert documents will NOT be created and our users will miss alerts.The security solution team has had to implement rather complex logic to strip non-compliant fields from their alert documents. By setting
ignored_malformed
on the alert indices, this would potentially reduce the complexity of the logic stripping alert fields and act as a fallback to ensure that alert documents are created in as many situations as possible.However, we should be aware of the caveat that
ignore_malformed
does not work on all data-types, so we should not be solely relying on this setting and alerting rule implementors should still do their absolute best to ensure alerts are compatible with the mappings.Business Value
Reduce the likelihood of missed alerts.
Definition of Done
.alerts-*
indices haveignore_malformed
setThe text was updated successfully, but these errors were encountered: