-
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 option to enable disk queue for elastic-agent-shipper #141508
Comments
Pinging @elastic/fleet (Team:Fleet) |
@nimarezainia to follow up with more details here on what should be configurable and make sure we get UI mocks created. |
@cmacknz @ @leehinman I discussed this with @dborodyansky and the UI mock up we have in the definition document seems pretty straight forward to use for all the configurations discussed for the new shipper. Higher fidelity examples can be created and we will get someone from docs to look over the copy as there are some text boxes to consider. @kpollich added this to our design discussions. Let's clarify then. |
@nimarezainia i'm starting to look at this and I have some questions about the designs. Comparing the current output settings and this desired UI, it's not completely clear what to do of the YML editor. Should we keep it, since it allows to configure many more features? |
Yes it's used to configure some ssl configuration, we should probably keep it.
The agent policies are not specific for an agent version, does the agent < 8.6 will handle the option and use memory queue if we pass disk queue or it will crash? |
|
Drive by comment tangentially related to the thread above: One thing that is not captured in this issue is that the agent functionality that supports the new configurations here will be behind a feature flag that is disabled by default. Specifically, users would need to opt in to using the Elastic agent data shipper for each output they have. I don't think we would want to present this UI unless a user has enabled the shipper feature flag in the agent policy. Without enabling the shipper these configuration options do nothing, and I don't think we should present them to users if they have no effect. Presenting these options by default would be very confusing, as users could configure a disk queue but the agent would ignore the configuration option. Ideally we should also have checkbox or similar toggle to opt in to the new elastic agent shipper on a per output basis. Only if that option is selected should these new UI elements be shown. Only once we get out of Beta we would default to having this flag enabled by default and the new queue configuration UI visible default. Possibly this context aws intended to be provided in #142649 which isn't complete yet. Pinging @nimarezainia for additional input here. |
One exception to my comment above, the Compression and Loadbalancing options here are always valid, regardless of if the agent is using the data shipper or the existing output architecture. |
Thanks @cmacknz, I'll take in account that these features are available under a feature flag. |
I'll take a pass at rewriting this issue description to be less of a placeholder today. I will be sure to include the feature flag functionality as a requirement here. |
I'm currently gathering more information about this ticket and I'd like to have confirmation that I got them right:
|
@criamico @cmacknz in elastic/elastic-agent#217 (comment) it was decided that this UI would be exposed only when the user configures the YAML to indicate shipper needs to be enabled. We want the final UI to be developed so we avoid any breaking change, but hide everything in UI that depends on shipper under a feature flag until we GA. @criamico happy to discuss options here. they can be placed under an advanced section drop down which is greyed out if feature flag is not set. |
@nimarezainia Thanks for the clarification, I wasn't aware of that comment.
|
This is correct they are pretty much 1:1
I forwarded the requirements document to you that explains these. "Maximum batch size" is not the same as the variable "bulk_max_size" - Maximum batch size should be in bytes, "bulk max size" is in number of events. @cmacknz & @leehinman could you please direct @criamico here as to what parameters should be configured? |
I believe that this is the feature flag. @blakerouse @cmacknz is that correct? |
That is even simpler, thanks for the clarification! I appreciate the help :) |
The Fleet UI issue is running a bit ahead of the shipper project. We should have produced a one page summary of all of this before hand :)
The PR adding support for the shipper to the agent is elastic/elastic-agent#1527. All shipper specific configuration is contained in a new shipper configuration object for each output. That object optionally contains an # Enables the shipper with default settings
shipper: {}
# Disables the shipper
shipper:
enabled: false
# Also enables the shipper
shipper:
enabled: true The full logic the agent uses to determine whether to start a shipper is in this function.
The exact shipper configuration is still a bit in flux. elastic/elastic-agent-shipper#161 is the issue to align it with what was implemented in the agent in elastic/elastic-agent#1527. This is where we will finalize the configuration. In the meantime, the preliminary definition of the shipper queue parameters can be found in the reference configuration file: https://github.com/elastic/elastic-agent-shipper/blob/01b1a062f770377818e6b32c6508f4df40626854/elastic-agent-shipper.yml#L57 What will happen in elastic/elastic-agent-shipper#161 is that the queue configuration there will become a sub-object of the # Set the shipper memory queue size.
shipper:
queue:
mem:
events: 4096
# Set the shipper disk queue size.
shipper:
queue:
disk:
max_size: 4096 The maximum batch size and flush timeout parameters are not defined yet for the shipper, as they differ from what we do in Beats and require a new implementation. We can create placeholders for them and come back and change them later if needed so this can move forward. These parameters will be shipper specific, and similar to the queue can be specified as properties of the shipper's Elasticsearch output like: shipper:
output:
elasticsearch:
# Note: I prefer using maximum_batch_bytes instead of maximum_batch_size so the units are obvious.
maximum_batch_bytes: 100
output_queue_flush_timeout: 1s Note that the output configuration above is subject to change. I will link back to this comment in the shipper implementation issue so we can follow up if we need to change them. Let me know if there are any questions, happy to sync up as needed to clarify anything. |
@cmacknz any thoughts on this? |
Yes the default is the memory queue, which is the case for the agent today. For the shipper the memory queue parameters are defined here.
What should happen is that the new configuration under the |
Linking this proposed change for visibility: elastic/elastic-agent#1729 |
@nimarezainia I have some questions about the UI where I would need your input.
|
@criamico Could we have the toggle which when enabled we pop a password dialogue box
@criamico I'm ok with that as long as it's somewhat hidden. Mainly because we want to avoid introducing a breaking change. @cmacknz you ok with this?
Skip these. I am hoping a sensible default would suffice. Thanks @criamico |
@nimarezainia Having the toggle inside the "Advanced options" would be enough? |
Clarifications after meeting with @cmacknz and @nimarezainia:
EDIT: Updated the ticket description based on these points |
@criamico thanks for the summary. I updated the definition document as discussed to rearrange the mockup. regarding the copy for Memory Queue Events: --> wouldn't want to elaborate too much on that copy and memory queue events setting as it's just a temporary config element and will be removed in favor of Memory Queue Size. |
Hey @criamico - I know the UI here isn't quite wired up yet, but could we do a recorded demo of the new options, structure, etc as you've outlined above in #141508 (comment)? It'd be good to show the rest of the agent team how we're thinking about these options in the UI via a mailing list at some point. Let me know if you think that's workable - happy to help however I can. Thanks much! |
@kpollich Yes I think I can do a recorded demo with using the current branch, since the UI works and it shouldn't change much anymore. |
@criamico @nimarezainia Where are we at here? Do we now have enough information to unblock this? |
@jlind23 I'm waiting to have the finalised parameters from the shipper to complete my PR. I could merge it but it would surely need another PR to align to the shipper configuration. @cmacknz is there any news on the final version of the shipper? |
We have been prioritizing bug fixes for the 8.6 release over making progress on the shipper. I'll let you know once we have finalized the parameters. |
…145755) ## Summary Closes #141508 ### Description Implements a form for the new Elastic Agent Shipper. **It only gets enabled only when the user explicitly enables it from the yaml editor.** - To enable the form, add to the yaml editor under outputs one of the following, save and then the new section should appear under "advanced options" ``` # Enables the shipper with default settings shipper: {} # Also enables the shipper shipper: enabled: true ``` I added the following new parameters to `Output` and to `ingest-outputs` SO as well: ``` shipper?: { disk_queue_enabled?: boolean; disk_queue_path?: string; disk_queue_max_size?: number; disk_queue_encryption_enabled?: boolean; disk_queue_compression_enabled?: boolean; compression_level?: number; loadbalance?: boolean; mem_queue_events?: number; queue_flush_timeout?: number; max_batch_bytes?: number; } ``` Note that another PR will likely follow to align with the structure defined in the new shipper (see [this comment](#141508 (comment)) for further explanation) <details><summary>Screenshots</summary> <img width="745" alt="Screenshot 2022-11-23 at 12 35 38" src="https://user-images.githubusercontent.com/16084106/203537091-47ed64f8-bb13-4960-b1aa-5bc73fd2e37b.png"> <img width="720" alt="Screenshot 2022-11-23 at 12 35 06" src="https://user-images.githubusercontent.com/16084106/203537130-e5cfcf89-a88d-43a2-8348-2f79c324ff80.png"> Generated policy under "view policy": <img width="737" alt="Screenshot 2022-11-23 at 12 34 09" src="https://user-images.githubusercontent.com/16084106/203536868-2d11d236-5056-473d-97a0-edae327665fc.png"> </details> ### Checklist - [ ] [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 - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Christiane (Tina) Heiligers <[email protected]> Co-authored-by: Alejandro Fernández Haro <[email protected]> Co-authored-by: Nicolas Chaulet <[email protected]> Co-authored-by: nima <[email protected]> Co-authored-by: Josh Dover <[email protected]>
…lastic#145755) ## Summary Closes elastic#141508 ### Description Implements a form for the new Elastic Agent Shipper. **It only gets enabled only when the user explicitly enables it from the yaml editor.** - To enable the form, add to the yaml editor under outputs one of the following, save and then the new section should appear under "advanced options" ``` # Enables the shipper with default settings shipper: {} # Also enables the shipper shipper: enabled: true ``` I added the following new parameters to `Output` and to `ingest-outputs` SO as well: ``` shipper?: { disk_queue_enabled?: boolean; disk_queue_path?: string; disk_queue_max_size?: number; disk_queue_encryption_enabled?: boolean; disk_queue_compression_enabled?: boolean; compression_level?: number; loadbalance?: boolean; mem_queue_events?: number; queue_flush_timeout?: number; max_batch_bytes?: number; } ``` Note that another PR will likely follow to align with the structure defined in the new shipper (see [this comment](elastic#141508 (comment)) for further explanation) <details><summary>Screenshots</summary> <img width="745" alt="Screenshot 2022-11-23 at 12 35 38" src="https://user-images.githubusercontent.com/16084106/203537091-47ed64f8-bb13-4960-b1aa-5bc73fd2e37b.png"> <img width="720" alt="Screenshot 2022-11-23 at 12 35 06" src="https://user-images.githubusercontent.com/16084106/203537130-e5cfcf89-a88d-43a2-8348-2f79c324ff80.png"> Generated policy under "view policy": <img width="737" alt="Screenshot 2022-11-23 at 12 34 09" src="https://user-images.githubusercontent.com/16084106/203536868-2d11d236-5056-473d-97a0-edae327665fc.png"> </details> ### Checklist - [ ] [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 - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Christiane (Tina) Heiligers <[email protected]> Co-authored-by: Alejandro Fernández Haro <[email protected]> Co-authored-by: Nicolas Chaulet <[email protected]> Co-authored-by: nima <[email protected]> Co-authored-by: Josh Dover <[email protected]>
Part of #elastic/elastic-agent-shipper#118
Description
We need to support the new Elastic Agent Shipper in Fleet, that is going to replace the beats options currently configured in
settings/outputs
through YML editor. The aim is to allow the user to configure the new options from the Settings Output Flyout.use_compression
andencryption_password
.maximum batch size
andflush timeout
parameters are not yet defined for the shipper, so we're going to have placeholders (maximum_batch_bytes
andoutput_queue_flush_timeout
) until they get implemented.Memory queue size
for now is going to beMemory queue events
. Copy: "Maximum number of events that can be stored in the queue. Default is set to 4096"disk queue
vsmemory queue
(memory queue is the default). For the shipper the memory queue parameters are defined here.shipper:
object should be ignoredDisk Queue
section should be collapsed whenDisk Queue
toggle is not enabled. Once enabled, all the options are available to the user to configure.Disk Queue
andEncryption
are enabled due to an integration, thenDisk Queue
andEncryption
should be grayed out.Compression
is disabled, do not display the compression levels.shipper
section to agent policy. The exact format is still being discussed ( see Namespace config values in fleet output elastic-agent#1729)Demo
Updated Mockups
The text was updated successfully, but these errors were encountered: