From 6d1909cdbd5ea8776d36c00c9d54f29e67ea3bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Mon, 25 Oct 2021 16:18:52 +0200 Subject: [PATCH] Add deprecation warning to Changelog and documentation for `setup.template.type` (#28618) --- CHANGELOG.next.asciidoc | 1 + libbeat/docs/howto/load-index-templates.asciidoc | 8 ++++++-- libbeat/docs/template-config.asciidoc | 10 ++++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index a30f20c7ce90..8236e090dd05 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -554,6 +554,7 @@ for a few releases. Please use other tools provided by Elastic to fetch data fro *Affecting all Beats* +- Deprecate `setup.template.type`. In the future Beats will load data streams instead of regular indices. *Filebeat* diff --git a/libbeat/docs/howto/load-index-templates.asciidoc b/libbeat/docs/howto/load-index-templates.asciidoc index 885432a26715..200f81548a0f 100644 --- a/libbeat/docs/howto/load-index-templates.asciidoc +++ b/libbeat/docs/howto/load-index-templates.asciidoc @@ -10,7 +10,7 @@ lifecycle policy used to manage indices as they grow and age. The recommended index template file for {beatname_uc} is installed by the {beatname_uc} packages. If you accept the default configuration in the -+{beatname_lc}.yml+ config file, {beatname_uc} loads the template automatically ++{beatname_lc}.yml+ config file, {beatname_uc} loads the {ref}/index-templates.html[composable template] automatically after successfully connecting to {es}. If the template already exists, it's not overwritten unless you configure {beatname_uc} to do so. @@ -33,7 +33,7 @@ For a full list of template setup options, see <>. [[load-custom-template]] === Load your own index template -To load your own index template, set the following options: +To load your own composable index template, set the following options: [source,yaml] ----- @@ -44,6 +44,10 @@ setup.template.fields: "path/to/fields.yml" If the template already exists, it’s not overwritten unless you configure {beatname_uc} to do so. +If your template is still in the legacy format, please set `setup.template.type` to +`legacy`. Please, convert your index template to the composable format, because +in the future support for legacy templates is going to be removed. + [float] [[overwrite-template]] === Overwrite an existing index template diff --git a/libbeat/docs/template-config.asciidoc b/libbeat/docs/template-config.asciidoc index 5699a46dd761..fb8b551e2dcb 100644 --- a/libbeat/docs/template-config.asciidoc +++ b/libbeat/docs/template-config.asciidoc @@ -27,10 +27,12 @@ existing one. you must <>. ifndef::apm-server[] -*`setup.template.type`*:: The type of template to use. Available options: `legacy` (default), index templates -before Elasticsearch v7.8. Use this to avoid breaking existing deployments. New options are `component` -and `index`. Selecting `component` loads a component template which can be included in new index templates. -The option `index` loads the new index template. +*`setup.template.type`*:: Deprecated in 7.16. The type of template to use. The default value is `index`, +that loads {ref}/index-templates.html[index templates]. +Further options: `legacy`, {ref}/indices-templates-v1.html[legacy index templates] before Elasticsearch v7.8. +Use this to avoid breaking existing deployments. +And `component`, selecting it loads a component template which can be included in index templates. +The option `index` loads the new composable index template. endif::[] *`setup.template.name`*:: The name of the template. The default is