From 359d6fb765b18bd5d0b5773418038f6b799bfada Mon Sep 17 00:00:00 2001 From: Stef Nestor <26751266+stefnestor@users.noreply.github.com> Date: Fri, 26 Apr 2024 16:45:52 -0600 Subject: [PATCH] (Doc+) Delineate Bootstrapping Data Stream from Alias MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 👋 howdy, team! This is follow-up to [elasticsearch#107327](https://github.com/elastic/elasticsearch/pull/107327). I realized my mistake was that we had duplicate sentences in different sections so I edited the wrong area. However, it seemed like a good opportunity to consider clarifying the page better by fixing header links so that the sub-sections reflect as sub-headers instead of all being equal. Thoughts? --- docs/reference/ilm/ilm-tutorial.asciidoc | 38 +++++++++++++----------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/docs/reference/ilm/ilm-tutorial.asciidoc b/docs/reference/ilm/ilm-tutorial.asciidoc index 0885f685ed091..d7e5052f57cc6 100644 --- a/docs/reference/ilm/ilm-tutorial.asciidoc +++ b/docs/reference/ilm/ilm-tutorial.asciidoc @@ -7,31 +7,33 @@ ++++ When you continuously index timestamped documents into {es}, -you typically use a <> so you can periodically roll over to a +you typically use a <> so you can periodically <> to a new index. -This enables you to implement a hot-warm-cold architecture to meet your performance +This enables you to implement a <> to meet your performance requirements for your newest data, control costs over time, enforce retention policies, and still get the most out of your data. -TIP: Data streams are best suited for +TIP: <> are best suited for <> use cases. If you need to update or delete existing time series data, you can perform update or delete operations directly on the data stream backing index. If you frequently send multiple documents using the same `_id` expecting last-write-wins, you may -want to use an index alias with a write index instead. You can still use ILM to manage and rollover +want to use an index alias with a write index instead. You can still use <> to manage and <> the alias's indices. Skip to <>. +[discrete] +[[manage-time-series-data-with-data-streams]] +=== Manage time series data with data streams + To automate rollover and management of a data stream with {ilm-init}, you: . <> that defines the appropriate -phases and actions. -. <> to create the data stream and +<> and <>. +. <> to <> and apply the ILM policy and the indices settings and mappings configurations for the backing indices. . <> as expected. -For an introduction to rolling indices, see <>. - IMPORTANT: When you enable {ilm} for {beats} or the {ls} {es} output plugin, lifecycle policies are set up automatically. You do not need to take any other actions. @@ -41,7 +43,7 @@ or the {ilm-init} APIs. [discrete] [[ilm-gs-create-policy]] -=== Create a lifecycle policy +==== Create a lifecycle policy A lifecycle policy specifies the phases in the index lifecycle and the actions to perform in each phase. A lifecycle can have up to five phases: @@ -101,7 +103,7 @@ PUT _ilm/policy/timeseries_policy [discrete] [[ilm-gs-apply-policy]] -=== Create an index template to create the data stream and apply the lifecycle policy +==== Create an index template to create the data stream and apply the lifecycle policy To set up a data stream, first create an index template to specify the lifecycle policy. Because the template is for a data stream, it must also include a `data_stream` definition. @@ -148,7 +150,7 @@ PUT _index_template/timeseries_template [discrete] [[ilm-gs-create-the-data-stream]] -=== Create the data stream +==== Create the data stream To get things started, index a document into the name or wildcard pattern defined in the `index_patterns` of the <>. As long @@ -184,12 +186,12 @@ stream's write index. This process repeats each time a rollover condition is met. You can search across all of the data stream's backing indices, managed by the `timeseries_policy`, with the `timeseries` data stream name. -You will point ingest towards the alias which will route write operations to its current write index. Read operations will be handled by all -backing indices. +Write operations should be sent to the data stream name, which will route them to its current write index. +Read operations against the data stream will be handled by all its backing indices. [discrete] [[ilm-gs-check-progress]] -=== Check lifecycle progress +==== Check lifecycle progress To get status information for managed indices, you use the {ilm-init} explain API. This lets you find out things like: @@ -304,7 +306,7 @@ as expected. [discrete] [[ilm-gs-alias-apply-policy]] -=== Create an index template to apply the lifecycle policy +==== Create an index template to apply the lifecycle policy To automatically apply a lifecycle policy to the new write index on rollover, specify the policy in the index template used to create new indices. @@ -362,7 +364,7 @@ DELETE _index_template/timeseries_template [discrete] [[ilm-gs-alias-bootstrap]] -=== Bootstrap the initial time series index with a write index alias +==== Bootstrap the initial time series index with a write index alias To get things started, you need to bootstrap an initial index and designate it as the write index for the rollover alias specified in your index template. @@ -393,11 +395,11 @@ This matches the `timeseries-*` pattern, so the settings from `timeseries_templa This process repeats each time rollover conditions are met. You can search across all of the indices managed by the `timeseries_policy` with the `timeseries` alias. -Write operations are routed to the current write index. +Write operations should be sent towards the alias, which will route them to its current write index. [discrete] [[ilm-gs-alias-check-progress]] -=== Check lifecycle progress +==== Check lifecycle progress Retrieving the status information for managed indices is very similar to the data stream case. See the data stream <> for more information.