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] Rollover datastream when index template settings changed #158653

Open
juliaElastic opened this issue May 30, 2023 · 5 comments
Open

[Fleet] Rollover datastream when index template settings changed #158653

juliaElastic opened this issue May 30, 2023 · 5 comments
Labels
enhancement New value added to drive a business result Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@juliaElastic
Copy link
Contributor

juliaElastic commented May 30, 2023

Currently Fleet rolls over datastreams if:

There are other use cases where rollover would be required on index template settings changes, like non-dynamic changes.

The reason we don’t apply settings changes is because users might have customized settings via a @custom component template.

cc @felixbarny

@juliaElastic juliaElastic added the Team:Fleet Team label for Observability Data Collection Fleet team label May 30, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@felixbarny
Copy link
Member

@dakrone This issue is one reason why an API that applies a given index template or component template to all data streams it applies to would be useful. Depending on whether or not the changes can be applied dynamically, Elasticsearch might perform a rollover on the data stream.

Currently, Fleet tries to do that but I think that's something that should be handled by Elasticsearch. Not only could avoid complexity in Fleet, the way Fleet does it is fundamentally limited in the way it computes the "diff" between the current state of a data stream from a index template that may consist of several component templates.

@joshdover
Copy link
Contributor

Big +1 to having Elasticsearch handle this. Fleet requires too much knowledge about Elasticsearch in order to do this without missing edge cases, in ways that can easily change without us knowing as new features are added to Elasticsearch.

@dakrone
Copy link
Member

dakrone commented May 30, 2023

It sounds similar to elastic/elasticsearch#89346, where the stream is flagged as some kind of change was made that would mean a rollover when the next doc is indexed. But in this case, it sounds like you want ES to automatically determine if the rollover is necessary?

@felixbarny
Copy link
Member

While related, there's a bigger underlying issue behind this. I think we need a way to declare the desired state of data stream in an Infrastructure as Code-like way. I've created an issue with more thoughts in the Elasticsearch repo:

@juliaElastic juliaElastic added the enhancement New value added to drive a business result label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

No branches or pull requests

5 participants