-
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
[Fleet] Add presets for performance tuning to ES output configuration #166870
Comments
Pinging @elastic/fleet (Team:Fleet) |
@nimarezainia @strawgate is this something you discuss with Kuldeep already? |
We have discussed with Kuldeep, and the planning doc includes (I think) the current UI intentions but we can wait for him to chime in |
@zombieFox tagged you in the definition document. Please have a look and if accepted we can move this to development. thanks |
@zombieFox wondering if this UX was finalized and ready for development? @jen-huang @kpollich this issue is in the current sprint. I assume that the design work is expected in this sprint and not the implementation. I'm trying to figure out whether we are targeting this for 8.12. thanks |
I've got some thoughts in development in this Figma (WIP). Looking to address removing the YAML box in favour of explicit controls on the UI. As well as tuning controls. This exploration/form is looking very long so far. It might not be suitable in a flyout anymore. |
Made some comments on the figma itself. I am very much in favour of adding more dials to replace anything that can be placed in the YAML box today. |
@zombieFox what's the latest on this? are we ready for development? |
The designs are in a good enough state to move to development. A sync with Kyle suggest that the Advanced Settings work he is develop should support the changes defined in the design file. I will have to resolve edge cases as they become apparent during development. |
@jen-huang @kpollich I changed the status of this issue to "Ready" and moved it to next sprint by default. I let you decide whether this should be done now. |
As elastic/beats#36990 landed in 8.12, we need to make this happened in 8.12 too otherwise users will be required to use the custom yaml box. |
What we are asking for in this issue really is just the UI work to expose the presets and NOT necessarily exposing all the configuration options that are available in the advanced yaml box (which is what the figma is showing). In particular reference to the figma the ask is to implement the following drop down with the presets for tuning: we can develop the remainder of the changes in figma which convert the advanced yaml box to UI configuration elements at a later stage and the YAML box completely removed. |
Just wanted to clarify some aspects of the presets:
|
If we know the set of variables/YAML keys that would prompt an alert then yes. Based on the description it seems like we'd want to alert if one or more of the following settings appears in the YAML box?
Fleet could do a rudimentary string match on the YML box contents to detect any of these keys and alert the user that their custom values will be ignored. I think we could also actually parse the YML and check for the keys more explicitly so things like this would still trigger the alert: queue:
mem:
events: 3650 But that would be slightly more involved and might be better suited for a follow-up improvement in a future release. The string match would be quickest here. |
@kpollich Should we add the |
## 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]>
@kpollich Part of the tasks here was to add a telemetry task that collects the presets values used, after looking at the PR you linked i'm unsure this has been done. Could you please update me? |
No I wasn't able to get to that and the PR became quite large. I can follow up with another PR. |
@kpollich That would be great, thanks. |
Hi Team, We have created 07 testcases under testrail for this feature under Fleet test suite at links:
Please let us know if any other scenario needs to be added from our end. Thanks! |
@amolnater-qasource should we also verify that the expected behavior for reserved keys in yaml already existing before upgrade to 8.12 and verifying the end result after upgrade to 8.12? i.e. I add a reserved key to the yaml box in 8.11 and then upgrade to 8.12 and verify that the preset is set to custom and my customization is still present |
Hi @strawgate Thank you for suggesting the scenario. We have tested this on 8.11.3>8.12.0 BC2 upgrade and found it working fine. Observations:
Screen Recording: Agents.-.Fleet.-.Elastic.-.Google.Chrome.2023-12-15.11-10-51.mp4Further, could you please confirm if we should add a regression testcase to this for validating on 8.12.0+(8.13.0 and so on..) kibana versions? As per our understanding, the feature will be already available from 8.12.0 onwards, so we can keep this scenario as a part of exploratory testing. Please let us know if we are missing anything here. |
Yes this would be great and indeed only available from 8.12.0 onwards. |
👋 So I stumbled upon this because we firmly believe not all the filebeat performance options are configurable. More specifically, we don't think |
@nicpenning your observation is correct. None of the queue.mem related configs were available under agent, so if configured in the yaml, they weren't taking effect. All the configurable parameters are now available under the output config in agent. We are seeing that the best throughput is achieved when (queue.mem.events = workers * 2 * bulk_max_size) |
Hey Nima! Are you saying this is available in 8.12 or now (8.11.3)? If so, now, where is the location you ate speaking of. |
This is an 8.12 feature, currently targeted for early in the new year. It will only apply to agents at 8.12. the docs are here if you wanted to have a look. The presets themselves will appear in the Output flyout. Hope that answers your question. |
It does and that is what I figured. We can plan for 8.12.0 to try this out. If successful, we may be able to be fully fleet managed agents next year! Thank you! |
This PR is for some "presets" for different use-cases available like "Optimized for Throughput", "Optimized for Latency", that set queue settings, bulk size, timeout settings, etc to optimize the particular scenario. We would love to hear from you if the new "Optimized for Throughput" preset that will be available in 8.12 fills your need or if you still need to manually tune queue settings with 8.12. |
I am tracking. FYI, the presets provided don't fit much of our use cases because we use multiple integrations per policy and it's never really been identified how each integration handles the Fleet output across all integrations in the same policy. If the Integration is heavy enough it is in its own policy and requires much higher numbers that the top provided are in the presets. I definitely admire the effort here but it seems like the higher performance settings seem very low. Once we have 8.12 we can try the higher throughout options to confirm 👍🏻. I really like the idea of selecting a scalable performance 1x through 20x and the settings scale to the right workers/bulk max size/queue, etc.. just some thoughts. |
Hi Team, We have executed 07 testcases under the Feature test run for the 8.12.0 release at the link: Status: PASS: 07 Build details: As the testing is completed on this feature, we are marking this as QA:Validated. Please let us know if anything else is required from our end. |
We have recently updated the beats default settings elastic/beats#36990 but we'd like to offer users even more options that optimize for different scenarios.
To power this we want to introduce performance presets within the Elasticsearch output within Fleet. These presets are selectable by the user and optimize Agent outputs for particular scenarios (latency, throughput, scale). If a user wants to tune these values themselves they will utilize the yaml box to modify these settings.
By creating presets we can abstract away the underlying complexity of configuration from our users and target specific use cases that they need to optimize the performance towards. This abstraction also has the added benefit of allowing us to tweak individual settings and even switch out the underlying implementation without introducing a breaking change.
Design
Presets
Note about the
custom
preset:custom
preset (refer to the figma)custom
preset, whatever setting is configured in the advanced yml box will be applied to the agent. So essentially thecustom
preset is a no-op.custom
. What ever value is in the configured yml box will be applied to the agent as is.custom
preset will have a UI for the user to enter relevant output parameters.Outcome
balanced
preset should be selected by defaultcustom
preset is selected by defaultpreset: balanced
Docs issue
The text was updated successfully, but these errors were encountered: