-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fleet] Support Elasticsearch output performance presets (#172359)
## Summary Closes #166870 Closes #172525 - Adds a new `preset` field to output saved objects - Updates REST spec payloads to allow `preset` field in `POST/PUT` requests to the `/api/fleet/outputs` endpoint - Adds logic to set default `preset` to `balanced` or `custom` based on whether a reserved key exists in `output.config_yaml` - Adds UI to the output settings flyout for providing a preset - Adds backfill logic to Fleet `setup` that updates all existing outputs + redeploys their associated policies to ensure the proper `preset` is provided on all policies ## To do - [x] Fix failing tests - [x] Add a lot of tests + testing instructions - [x] Allow preconfigured outputs to specify a preset - [x] Update OpenAPI spec for outputs API - [x] Disable `EuiSelect` when output is managed - [x] Add in-product link to performance preset docs once they exist (might have to be a follow-up? (Follow up: #172523) - [x] Parse YML box contents instead of using basic string lookup for forcing `custom` preset (Follow up: #172525) ## How to test 1. Create a new Elasticsearch output 2. Observe the `Performance preset` dropdown defaults to `balanced` 3. Add a performance setting to the custom YAML box e.g. `bulk_max_size: 1000` 4. Note the callout with the list of reserved keys 5. Note that the dropdown switches to `Custom` and is now disabled 6. Remove the offending key 7. Note the dropdown returns to its normal state 8. Save the output 9. Edit the output and observe the same behaviors For the backfill 1. Create a local environment with multiple elasticsearch outputs on `main` 2. Stop Kibana 3. Checkout this PR branch 4. Restart Kibana 5. Observe the ES outputs have been updated to include the appropriate `preset` value ## Screenshots + Screen recordings https://github.com/elastic/kibana/assets/6766512/0c25a15e-938d-4747-8846-d51a9ad01968 --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
1 parent
d9e2d06
commit 6fe6cdd
Showing
32 changed files
with
812 additions
and
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -528,6 +528,7 @@ | |
"output_id", | ||
"partition", | ||
"password", | ||
"preset", | ||
"proxy_id", | ||
"random", | ||
"random.group_events", | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1854,6 +1854,10 @@ | |
} | ||
} | ||
} | ||
}, | ||
"preset": { | ||
"type": "keyword", | ||
"index": false | ||
} | ||
} | ||
}, | ||
|
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
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
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
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
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.