question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[meta] Consolidate generated ES index templates

See original GitHub issue

Overview

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:closed
  • Created 2 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
yaauiecommented, Jan 10, 2022

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).

1reaction
kgellercommented, Jan 11, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found