Skip to content
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] Create API endpoint to set fleet.timeout across all policies #155654

Closed
kpollich opened this issue Apr 24, 2023 · 10 comments
Closed

[Fleet] Create API endpoint to set fleet.timeout across all policies #155654

kpollich opened this issue Apr 24, 2023 · 10 comments
Assignees
Labels
Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@kpollich
Copy link
Member

Ref elastic/elastic-agent#2257
Ref elastic/elastic-agent#2408

In order to support self-managed proxy users who may not be able to control their proxies' timeout configurations, Fleet needs to expose an endpoint that allows them to limit Fleet's long polling timeout to 5 minutes. As part of the above issue/PR, the long polling timeout is being increased to 10 minutes by default for all agents. Users who rely on a proxy with a 5 minute timeout will need a way to revert this change on an opt-in basis.

Create an API + persisted setting, e.g

POST /api/fleet/settings
{
  "agent_check_in_long_poll_interval": "5m|10m" // Only options are 5 or 10 minutes
}

When this setting is updated, all policies need to be redeployed, and each policy generated should include the appropriate fleet.timeout value. See the docs in the above PR for an example:

https://github.com/elastic/elastic-agent/pull/2408/files#diff-f0d296ac94b8457b06ae3376b0642cb39fea46a5c630bcca24701d3464b28b5bR47-R54

@kpollich kpollich added the Team:Fleet Team label for Observability Data Collection Fleet team label Apr 24, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@kpollich
Copy link
Member Author

This can be handled via the Fleet settings framework now, afaik.

@jlind23
Copy link
Contributor

jlind23 commented May 29, 2024

@kpollich shall we change this estimate to an S then?

@nchaulet
Copy link
Member

nchaulet commented Dec 2, 2024

@kpollich @nimarezainia Curious what do you think of storing and eventually adding this as part of the fleet server host model? It seems it's related to the fleet connectivity part

We currently do not have global settings for agent policy, we have per agent policy settings in the agent policy UI or global shared part of the policy fleet server hosts, outputs.

@nimarezainia
Copy link
Contributor

@kpollich @nimarezainia Curious what do you think of storing and eventually adding this as part of the fleet server host model? It seems it's related to the fleet connectivity part

@nchaulet sorry what do you mean by "fleet server host model"? if you are suggesting that this should be configurable as part of the fleet settings in the fleet global settings UI (for each fleet server host defined) - then i tend to agree with that.

@nchaulet
Copy link
Member

nchaulet commented Dec 31, 2024

if you are suggesting that this should be configurable as part of the fleet settings in the fleet global settings UI (for each fleet server host defined) - then i tend to agree with that.

Yes it is what I mean

@nchaulet nchaulet self-assigned this Jan 2, 2025
@nchaulet
Copy link
Member

nchaulet commented Jan 3, 2025

@pchila @cmacknz Does that issue is still relevant I saw elastic/elastic-agent#2408 was closed and there is no support for fleet.timeout in the agent config right?

@cmacknz
Copy link
Member

cmacknz commented Jan 3, 2025

We never ended up changing the checkin timeout to 10 minutes as the descriptions suggests would happen.

Fleet server still defaults to 5 minutes plus some jitter: https://github.com/elastic/fleet-server/blob/7f44587b41293fcd436568700f363c0322949cb7/internal/pkg/config/timeouts.go#L58-L59

Elastic Agent still defaults to 10 minutes expecting Fleet server to return a response before then: https://github.com/elastic/elastic-agent/blob/d354d9f48c92b69aed61fbca5f46853b54cba956/internal/pkg/remote/config.go#L48-L49

Possibly the agent transport settings referenced there can be set in the fleet section of the policy without changing anything in agent, but AFAIK there is no current use case for this besides maybe increasing the number agents fleet can manage at once.

@nchaulet
Copy link
Member

nchaulet commented Jan 6, 2025

Possibly the agent transport settings referenced there can be set in the fleet section of the policy without changing anything in agent, but AFAIK there is no current use case for this besides maybe increasing the number agents fleet can manage at once.

@cmacknz @kpollich should we close this one?

@kpollich
Copy link
Member Author

kpollich commented Jan 6, 2025

Yes seems like we should close this. Thanks for flagging.

@kpollich kpollich closed this as not planned Won't fix, can't repro, duplicate, stale Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

No branches or pull requests

7 participants