forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] AIOps: Fix missing field caps filters for log rate analysis. (el…
…astic#181109) ## Summary Part of elastic#172981. Field caps requests can be heavy calls in larger clusters. For all other queries for log rate analysis we were applying filters based on the time range selection. This was missing from the field caps call. The following parameters were added to improve the call: - `index_filter`: Adds a range filter to only get field caps from indices spanning the deviation time range. - `filters`: `-metadata` was added to not return fields like `_id` and esp. `_tier`. We previously had a manually check for `_tier` which is now unnecessary using this option. - `types`: Previously we fetched all field types and then filtered out the ones we don't support. This option allows us to pass in the supported fields right away and not return unsupported ones in the first place. ---- Here are examples that show how `index_filter` get applied correctly: Here the deviation selection spans only 1 month and that is reflected in the response from the field caps call: <img width="1026" alt="image" src="https://github.com/elastic/kibana/assets/230104/50a00e5a-2b59-4ae5-9d50-e2ed766f68f5"> ``` { indices: [ 'gallery-2021-11' ], fields: { ... } } ``` Now the deviation selection covers more months: <img width="1010" alt="image" src="https://github.com/elastic/kibana/assets/230104/0034a19e-b136-4261-9761-6b48fdf45989"> ``` { indices: [ 'gallery-2021-09', 'gallery-2021-10', 'gallery-2021-11', 'gallery-2021-12', 'gallery-2022-01' ], fields: { ... } } ``` ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- Loading branch information
Showing
5 changed files
with
562 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.