-
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
[alerting] migrating an alert with a large alert param into 7.13.0 will cause a migration error #100607
Comments
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
We're hoping we can "fix" this by adding an |
Was able to repro the error by creating an alert with a 100K param. Used the es query alert - when creating a new one, it populates it's query parameter with a simple query, so I inserted 100K space characters before the final {
"query":{
"match_all" : {}
}
} So, assuming that if we can prevent this from happening with this repro during create, it will also fix the migration issue. |
Added kibana/x-pack/plugins/alerting/server/saved_objects/mappings.json Lines 49 to 51 in 58f45ee
I wasn't sure what value to use for This should only impact the searching of alerts via the params, nothing else operationally. Now to write a test ... |
…se params resolves elastic#100607 This fixes a problem when very large parameters (over 32K bytes) are saved with an alert. Before this fix, an error from elasticsearch would be thrown with the following message, and a 400 returned from create (and presumably update). Document contains at least one immense term in field=\"alert.params\" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. After the fix, you can alerts with immense params can be saved and executed. Note that the immense params will not be searchable, since they won't be indexed, but that seems both unavoidable, and not a severe issue.
From my understanding, this |
…se params (#100726) resolves #100607 This fixes a problem when very large parameters (over 32K bytes) are saved with an alert. Before this fix, an error from elasticsearch would be thrown with the following message, and a 400 returned from create (and presumably update). Document contains at least one immense term in field=\"alert.params\" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. After the fix, alerts with immense params can be saved and executed. Note that the immense params will not be searchable, since they won't be indexed, but that seems both unavoidable, and not a severe issue.
…se params (elastic#100726) resolves elastic#100607 This fixes a problem when very large parameters (over 32K bytes) are saved with an alert. Before this fix, an error from elasticsearch would be thrown with the following message, and a 400 returned from create (and presumably update). Document contains at least one immense term in field=\"alert.params\" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. After the fix, alerts with immense params can be saved and executed. Note that the immense params will not be searchable, since they won't be indexed, but that seems both unavoidable, and not a severe issue.
…se params (elastic#100726) resolves elastic#100607 This fixes a problem when very large parameters (over 32K bytes) are saved with an alert. Before this fix, an error from elasticsearch would be thrown with the following message, and a 400 returned from create (and presumably update). Document contains at least one immense term in field=\"alert.params\" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. After the fix, alerts with immense params can be saved and executed. Note that the immense params will not be searchable, since they won't be indexed, but that seems both unavoidable, and not a severe issue.
…se params (#100726) (#100772) resolves #100607 This fixes a problem when very large parameters (over 32K bytes) are saved with an alert. Before this fix, an error from elasticsearch would be thrown with the following message, and a 400 returned from create (and presumably update). Document contains at least one immense term in field=\"alert.params\" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. After the fix, alerts with immense params can be saved and executed. Note that the immense params will not be searchable, since they won't be indexed, but that seems both unavoidable, and not a severe issue.
…se params (#100726) (#100773) resolves #100607 This fixes a problem when very large parameters (over 32K bytes) are saved with an alert. Before this fix, an error from elasticsearch would be thrown with the following message, and a 400 returned from create (and presumably update). Document contains at least one immense term in field=\"alert.params\" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. After the fix, alerts with immense params can be saved and executed. Note that the immense params will not be searchable, since they won't be indexed, but that seems both unavoidable, and not a severe issue.
Kibana version: 7.13.0
Elasticsearch version: 7.13.0
Describe the bug:
In 7.13.0, we changed the type of the alert saved object
params
property, fromtype: object; enabled: false
totype: flattened
in PR #92036.kibana/x-pack/plugins/alerting/server/saved_objects/mappings.json
Lines 49 to 51 in a0ddca8
Unfortunately, this will cause a problem for any field in the
params
which is greater than 32766 byte long; we just saw such an alert fail in a migration in an internal repo.I haven't repro'd it yet, but I would expect that you could cause this to fail with a normal alert creation with a param over the length limit. If that doesn't fail, or fails differently, I think we'd want to try to repro the migration failure directly, by creating an alert with a huge param in 7.12, then migrating to 7.13.
The text was updated successfully, but these errors were encountered: