-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Ensure that Beats index template loading works with v2 index templates #17829
Comments
Pinging @elastic/integrations-services (Team:Services) |
Note that there are separate APIs for v1 vs. v2 index templates: V1:
V2:
So while the actual template contents might not need to change, Beats code will still need to be adjusted to use the correct API depending on the ES version. |
APM Server actually uses template inheritance for ILM templates per index. We are investigating implications and how we can switch to v2 templates, and whether or not that requires changes in beats. We'll keep track of it in elastic/apm-server#3692. |
For large deployment like our the template inheritance is very common and needed. For example we use beats templates together with our templates. Multiple templates match same indices. The beats should reflect this. Maybe it could just allow the beats template to be generated as a component so other templates could include it as a component template. |
## What does this PR do? The PR adds a new configuration option named `setup.template.type` to select the index template type. From ES v7.8 new index templates were introduced. Possible option: * `legacy`: Loads the legacy index template. This is the default option, so it does not break existing deployments. * `component`: This loads Beats' index template as a composite template, so it can be used in the users' index templates. * `index`: Loads the new index template. ## Why is it important? Index templates v2 was released in Elasticsearch 7.8. Previously Beats had used the legacy endpoint for installing index templates. Now we are moving to the newer version. Closes #17829
The PR adds a new configuration option named `setup.template.type` to select the index template type. From ES v7.8 new index templates were introduced. Possible option: * `legacy`: Loads the legacy index template. This is the default option, so it does not break existing deployments. * `component`: This loads Beats' index template as a composite template, so it can be used in the users' index templates. * `index`: Loads the new index template. Index templates v2 was released in Elasticsearch 7.8. Previously Beats had used the legacy endpoint for installing index templates. Now we are moving to the newer version. Closes elastic#17829 (cherry picked from commit 6bb35c1)
The PR adds a new configuration option named `setup.template.type` to select the index template type. From ES v7.8 new index templates were introduced. Possible option: * `legacy`: Loads the legacy index template. This is the default option, so it does not break existing deployments. * `component`: This loads Beats' index template as a composite template, so it can be used in the users' index templates. * `index`: Loads the new index template. Index templates v2 was released in Elasticsearch 7.8. Previously Beats had used the legacy endpoint for installing index templates. Now we are moving to the newer version. Closes #17829 (cherry picked from commit 6bb35c1)
Elasticsearch is introducing v2 of index templates. To understand the motivation for this change and it's details, see: elastic/elasticsearch#53101.
We need to ensure that when Beats creates index templates in a v2 index templates universe, the templates continue to work as before. If not, we need to figure out a migration path from v1 to v2 templates.
My strong suspicion is that the v1 index templates created by Beats should continue to function as-is as v2 index templates. This is mainly because the index pattern in a Beat's index template contain the Beat version, e.g.
metricbeat-8.0.0-*
orfilebeat-7.5.3-*.
So template inheritance doesn't come into play. And without template inheritance, there is not difference between v1 and v2 templates.However, we still should confirm the above by testing against an actual ES cluster that has v2 templates implemented. That's what this issue is tracking.
Related: #17809
The text was updated successfully, but these errors were encountered: