[meta] Consolidate generated ES index templates
See original GitHub issueOverview
With ECS aligning versioning with the Elastic stack releases starting in 8.0, the ECS tooling could be simplified to generate a single set of Elasticsearch index template artifacts. This single generated version would align with the stack release of the same version.
For example, ECS 8.0 produces sample Elasticsearch index mappings that are compatible with Elastic Stack 8.0.
Advantages
- Simplify the ECS tooling. No additional code to generate multiple versions of the index templates to support multiple versions of ES or multiple versions of the ES index template APIs.
- Reduce the copies of index templates in the repo; simplified user experience.
- Prevent users from trying to use the curated artifacts with the wrong APIs: example
- The sample templates are maintained as examples. They should be used as a starting point for experimentation. Users are still free to generate their own variations of index templates but shouldn’t rely on ECS maintaining multiple copies.
Concerns
- Should the tooling allow users to maintain their own legacy index template artifacts (e.g. for users who maintain customer mappings)?
- The
logstash-output-elasticsearch
plugin depends on the ECS projects generated, legacy index template artifacts as part of their build for ECS compatibility mode. We will need to remove this dependency before we can remove the generated, legacy templates from ECS.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Index templates | Elasticsearch Guide [8.5] | Elastic
An index template is a way to tell Elasticsearch how to configure an index when it is created. For data streams, the index...
Read more >Index templates - OpenSearch documentation
Index templates let you initialize new indexes with predefined mappings and settings. For example, if you continuously index log data, you can define...
Read more >Adding template for index patterns - how to solve related issues
How to troubleshoot Elasticsearch/OpenSearch log "Adding template for index patterns" a detailed guide including background on ES concepts: cluster, index, ...
Read more >Logstash combine data stream and index templates
When using data_stream in your elasticsearch output, you cannot specify any of index , template or template_name since data stream have a ...
Read more >Data rollover in Elasticsearch - Medium
An index template is a way to tell Elasticsearch how to configure an index when it is created manually or by indexing a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No. We can work from the “legacy” v1 templates, and in fact doing so simplifies our codepath. We already translate the “legacy”-style index templates for ECS 1.x when vendoring them for use with Elasticaearch 8, and can use the same code-path with the stack-aligned “legacy”-style templates. Moving the Stack-aligned monolith template to V2 adds complexity because we would need to translate those back into legacy for use with ES 7.x (due to our plugins implementation).
Conclusion:
Since ECS is aligning versioning with the Elastic stack releases starting in 8.0, we have simplified the ECS tooling to generate two sets of Elasticsearch index template artifacts. We will now produce 1) a composable template compatible with the v2
_index_template
API and 2) a legacy index template compatible with v1 “legacy”_template
API.Previously, at every ECS version, we were generating legacy templates compatible with ES 6 and ES 7, as well as a composable template. We have now consolidated down to, for every ECS version, a single ES 8 compatible legacy template and a single composable template.