[ML] Fix anomaly detection module manifest queries for kibana sample data sets (#164332)

Follow up to https://github.com/elastic/kibana/pull/119635
All modules which contain a query in their manifest file should have a
filter to avoid querying cold and frozen tiers.
The original PR did not include the sample data sets as it was assumed
it was not necessary due to these data sets never being added to cold or
frozen tiers.
However it was overlooked that these queries will be run on any index
pattern passed to the `/internal/ml/modules/recognize` endpoint and so
has the potential to negatively impact the speed of all calls to this
endpoint, especially if the index pattern contains multiple indices and
wildcards.
This commit is contained in:
James Gowdy 2023-08-22 14:39:58 +01:00 committed by GitHub
parent b5ef8a61c6
commit cd219942d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -7,7 +7,8 @@
"defaultIndexPattern": "kibana_sample_data_ecommerce",
"query": {
"bool": {
"filter": [{ "term": { "event.dataset": "sample_ecommerce" } }]
"filter": [{ "term": { "event.dataset": "sample_ecommerce" } }],
"must_not": { "terms": { "_tier": [ "data_frozen", "data_cold" ] } }
}
},
"jobs": [

View file

@ -7,7 +7,8 @@
"defaultIndexPattern": "kibana_sample_data_logs",
"query": {
"bool": {
"filter": [{ "term": { "event.dataset": "sample_web_logs" } }]
"filter": [{ "term": { "event.dataset": "sample_web_logs" } }],
"must_not": { "terms": { "_tier": [ "data_frozen", "data_cold" ] } }
}
},
"jobs": [