From f18427b5c924e341a3fece7879ae793201b54573 Mon Sep 17 00:00:00 2001 From: Deb Adair Date: Mon, 27 Jan 2020 19:38:40 -0800 Subject: [PATCH 01/15] [DOCS] Edit ILM GS tutorial --- .../ilm/getting-started-ilm.asciidoc | 121 +++++++++--------- .../reference/ilm/policy-definitions.asciidoc | 1 + 2 files changed, 65 insertions(+), 57 deletions(-) diff --git a/docs/reference/ilm/getting-started-ilm.asciidoc b/docs/reference/ilm/getting-started-ilm.asciidoc index f7ca3f4d216fc..fd0b3ee7793ec 100644 --- a/docs/reference/ilm/getting-started-ilm.asciidoc +++ b/docs/reference/ilm/getting-started-ilm.asciidoc @@ -3,46 +3,57 @@ [[getting-started-index-lifecycle-management]] == Getting started with {ilm} -Let's jump into {ilm} ({ilm-init}) by working through a hands-on scenario. -This section will leverage many new concepts unique to {ilm-init} that -you may not be familiar with. The following sections will explore -these in more details. - -The goal of this example is to set up a set of indices that will encapsulate -the data from a time series data source. We can imagine there is a system -like {filebeat-ref}[Filebeat] that continuously indexes documents into -our writing index. We wish to roll over the index after it reaches a size -of 50 gigabytes, or has been created 30 days ago, and then delete the index -after 90 days. +This tutorial demonstrates how to use {ilm} ({ilm-init}) +to manage indices that contain time-series data. + +When you use a mechanism like Filebeat to continuously index documents into {es}, +you typically use an index alias so you can periodically roll over to a new index. +This enables you to implement a hot-warm-cold architecture 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. + +To automate roll over and management of time-series indices with {ilm-init}, you: + +. <> with the {ilm-init} Put policy API. +. <> to apply the policy to each new time-series index. +. <> by explicitly designating it as the write index. +. <> as expected with the +you use the {ilm-init} explain API. [float] [[ilm-gs-create-policy]] -=== Setting up a policy +=== Create a lifecycle policy -There are many new features introduced by {ilm-init}, but we will only focus on -a few that are needed for our example. For starters, we will use the -<> API to define our first policy. Lifecycle -policies are defined in JSON and include specific -<>. +In your lifecycle policy, you specify the phases in your index lifecycle +and the actions to perform in each phase. A lifecycle can have up to four phases: +`hot`, `warm`, `cold`, and `delete`. Policies are defined in JSON +and added through the {ilm-init} Put policy API. + +For example, the following request creates a `data_stream` policy with two phases: + +* The `hot` phase defines a `rollover` action to specify that an index rolls over when it +reaches either a `max_size` of 50 gigabytes or a `max_age` of 30 days. +* The `delete` phase uses `min_age` to move an index into the +delete phase when it is 90 days old and immediately triggers the `delete` action to remove the index. [source,console] ------------------------ -PUT _ilm/policy/datastream_policy <1> +PUT _ilm/policy/datastream_policy { - "policy": { <2> + "policy": { "phases": { - "hot": { <3> + "hot": { <1> "actions": { - "rollover": { <4> - "max_size": "50GB", + "rollover": { + "max_size": "50GB", <2> "max_age": "30d" } } }, "delete": { - "min_age": "90d", <5> + "min_age": "90d", <3> "actions": { - "delete": {} <6> + "delete": {} <4> } } } @@ -50,30 +61,29 @@ PUT _ilm/policy/datastream_policy <1> } ------------------------ -<1> call to the <> endpoint to create - a new policy named "datastream_policy" -<2> policy definition sub-object -<3> the hot phase defined in the "phases" section. Optional `min_age` field - not defined -- defaults to `0ms` -<4> rollover action definition -<5> delete phase begins after 90 days -<6> delete action definition +<1> The `min_age` field defaults to `0ms` in the hot phase, so new indices immediately enter the hot phase. +<2> The `rollover` action is triggered when any of the conditions are met. +<3> An index is moved into the delete phase after 90 days. +<4> No additional conditions are specified, so the `delete` action is triggered when the index enters the delete phase. -Here we created the policy called `datastream_policy` which rolls over -the index being written to after it reaches 50 gigabytes, or it is 30 -days old. The rollover will occur when either of these conditions is true. -The index will be deleted 90 days after it is rolled over. +See <> for the complete list of actions available in each phase. [float] [[ilm-gs-apply-policy]] -=== Applying a policy to our index +=== Create an index template to apply the lifecycle policy + +To automaticaly apply a lifecycle policy to the new write index on rollover, +you specify the policy in an index template. -There are <> to associate a -policy to an index. Since we wish specific settings to be applied to -the new index created from Rollover, we will set the policy via -index templates. +For example, the following request creates a `datastream_template` that is applied to new indices +whose names match the `datastream-*` index pattern. +The template configures two {ilm-init} settings: +* `index.lifecycle.name` specifies the name of the lifecycle policy to apply to all new indices that match +the index pattern. +* `index.lifecycle.rollover_alias` specifies the index alias that will be rolled over +when the rollover action is triggered for an index. [source,console] ----------------------- @@ -90,22 +100,19 @@ PUT _template/datastream_template ----------------------- // TEST[continued] -<1> match all indices starting with "datastream-". These will include all - newly created indices from actions like rollover -<2> the name of the lifecycle policy managing the index -<3> alias to use for the rollover action, required since a rollover action is - defined in the policy. - -The above index template introduces a few new settings specific to {ilm-init}. -The first being `index.lifecycle.name`. This setting will configure -the "datastream_policy" to the index applying this template. This means -that all newly created indices prefixed "datastream-" will be managed by -our policy. The other setting used here is `index.lifecycle.rollover_alias`. -This setting is required when using a policy containing the rollover -action and specifies which alias to rollover on behalf of this index. -The intention here is that the rollover alias is also defined on the index. - -To begin, we will want to bootstrap our first index to write to. +<1> Apply the template to a new index if its name starts with "datastream-". +<2> The name of the lifecycle policy to apply to each new index. +<3> The index alias must be specified if a policy uses the rollover action. + +[float] +[[ilm-gs-bootstrap]] +=== Bootstrap the initial time-series index + +To get things started, you need to bootstrap an initial index and designate it as the write index +for the index alias specified as the rollover alias. + +For example, the following request creates an index that matches the `datastream_template` +and sets `is_write_index` to `true` for the `datastream` alias. [source,console] diff --git a/docs/reference/ilm/policy-definitions.asciidoc b/docs/reference/ilm/policy-definitions.asciidoc index 4cfa87489165a..9abc57707bb0b 100644 --- a/docs/reference/ilm/policy-definitions.asciidoc +++ b/docs/reference/ilm/policy-definitions.asciidoc @@ -88,6 +88,7 @@ of these operations are done in isolation in a unit called a "step". The to see which step our index is either to execute next, or is currently executing. +[[ilm-policy-actions]] === Actions The below list shows the actions which are available in each phase. From b812d90480e09de05d8f6795d0863d14a805cb79 Mon Sep 17 00:00:00 2001 From: Deb Adair Date: Wed, 29 Jan 2020 21:29:35 -0800 Subject: [PATCH 02/15] More edits --- .../ilm/getting-started-ilm.asciidoc | 144 ++++++++---------- 1 file changed, 63 insertions(+), 81 deletions(-) diff --git a/docs/reference/ilm/getting-started-ilm.asciidoc b/docs/reference/ilm/getting-started-ilm.asciidoc index fd0b3ee7793ec..ae4d2a8618497 100644 --- a/docs/reference/ilm/getting-started-ilm.asciidoc +++ b/docs/reference/ilm/getting-started-ilm.asciidoc @@ -1,30 +1,38 @@ [role="xpack"] [testenv="basic"] + [[getting-started-index-lifecycle-management]] -== Getting started with {ilm} +== Roll over indices automatically with {ilm-init} + +++++ +Roll over automatically +++++ +[[ilm-roll-over-automatically]] This tutorial demonstrates how to use {ilm} ({ilm-init}) to manage indices that contain time-series data. -When you use a mechanism like Filebeat to continuously index documents into {es}, +When you use a mechanism like Filebeat to continuously index timestamped documents into {es}, you typically use an index alias so you can periodically roll over to a new index. This enables you to implement a hot-warm-cold architecture 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. +This is a <>. + To automate roll over and management of time-series indices with {ilm-init}, you: . <> with the {ilm-init} Put policy API. -. <> to apply the policy to each new time-series index. -. <> by explicitly designating it as the write index. -. <> as expected with the -you use the {ilm-init} explain API. +. <> to apply the policy to each new index. +. <> as the initial write index. +. <> +as expected with the {ilm-init} Explain API. [float] [[ilm-gs-create-policy]] === Create a lifecycle policy -In your lifecycle policy, you specify the phases in your index lifecycle +A lifecycle policy specifies the phases in the index lifecycle and the actions to perform in each phase. A lifecycle can have up to four phases: `hot`, `warm`, `cold`, and `delete`. Policies are defined in JSON and added through the {ilm-init} Put policy API. @@ -33,8 +41,8 @@ For example, the following request creates a `data_stream` policy with two phase * The `hot` phase defines a `rollover` action to specify that an index rolls over when it reaches either a `max_size` of 50 gigabytes or a `max_age` of 30 days. -* The `delete` phase uses `min_age` to move an index into the -delete phase when it is 90 days old and immediately triggers the `delete` action to remove the index. +* The `delete` phase uses `min_age` to determine when the index should be removed. +Note that this value is relative to the rollover time, not the index creation time. [source,console] ------------------------ @@ -62,10 +70,10 @@ PUT _ilm/policy/datastream_policy ------------------------ -<1> The `min_age` field defaults to `0ms` in the hot phase, so new indices immediately enter the hot phase. -<2> The `rollover` action is triggered when any of the conditions are met. -<3> An index is moved into the delete phase after 90 days. -<4> No additional conditions are specified, so the `delete` action is triggered when the index enters the delete phase. +<1> The `min_age` defaults to `0ms`, so new indices enter the hot phase immediately. +<2> Trigger the `rollover` action when either of the conditions are met. +<3> Move the index into the delete phase 90 days after rollover. +<4> Trigger the `delete` action when the index enters the delete phase. No other conditions need to be met. See <> for the complete list of actions available in each phase. @@ -74,7 +82,7 @@ See <> for the complete list of actions available in each ph === Create an index template to apply the lifecycle policy To automaticaly apply a lifecycle policy to the new write index on rollover, -you specify the policy in an index template. +you specify the policy in the index template used to create new indices. For example, the following request creates a `datastream_template` that is applied to new indices whose names match the `datastream-*` index pattern. @@ -102,18 +110,20 @@ PUT _template/datastream_template <1> Apply the template to a new index if its name starts with "datastream-". <2> The name of the lifecycle policy to apply to each new index. -<3> The index alias must be specified if a policy uses the rollover action. +<3> The name of the index alias used to reference these indices. +Required for policies that use the rollover action. [float] [[ilm-gs-bootstrap]] === Bootstrap the initial time-series index -To get things started, you need to bootstrap an initial index and designate it as the write index -for the index alias specified as the rollover alias. - -For example, the following request creates an index that matches the `datastream_template` -and sets `is_write_index` to `true` for the `datastream` 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. +The name of this index must match the template's index pattern and end with a number. +On rollover, this value is incremented to generate a name for the new index. +For example, the following request creates an index called `datastream_000001` +and makes it the write index for the `datastream` alias. [source,console] ----------------------- @@ -128,35 +138,30 @@ PUT datastream-000001 ----------------------- // TEST[continued] -When creating our index, we have to consider a few important configurations -that tie our index and our policy together correctly. We need to make sure -that our index name matches our index template pattern of "datastream-*", -which it does. We are using the <> in our policy, which -requires that our index name ends with a number. In our case, we used -`000001`. This is important so that Rollover can increment this number when -naming the new index created from rolling over. - -Our index creation request leverages its template to apply our settings, -but we must also configure our rollover alias: "datastream". To do this, -we take advantage of <>. This is a way -to define an alias to be used for both reading and writing, with only one -index being the index that is being written to at a time. Rollover swaps -the write index to be the new index created from rollover, and sets the -alias to be read-only for the source index. +When the rollover conditions are met, the rollover action: + +* Creates a new index called `datastream-000002`. +This matches the `datastream-*` pattern, so the settings from `datastream_template` are applied to the new index. +* Designates the new index as the write index and makes the bootstrap index read-only. + +This process will repeat each time the rollover conditions are met. +You can search across all of the indices managed by the `datastream_policy` with the `datastream` alias. +Write operations are routed to the current write index. + +For more information about write indices and rollover, see the <>. [float] [[ilm-gs-check-progress]] === Checking progress -Now that we have an index managed by our policy, how do we tell what is going -on? Which phase are we in? Is something broken? This section will go over a -few APIs and their responses to help us inspect our indices with respect -to {ilm-init}. +To get status information for {ilm-init}-managed indices, you use the Explain API. +This lets you find out things like: -With the help of the <>, we can know -things like which phase we're in and when we entered that phase. The API -will also provide further info if errors occurred, or if we are blocked on -certain checks within actions. +* What phase an index is in and when it entered that phase. +* The current action and what step is being performed. +* If any errors have occurred or progress is blocked. + +For example, the following request gets information about the `datastream` indices: [source,console] -------------------------------------------------- @@ -164,9 +169,9 @@ GET datastream-*/_ilm/explain -------------------------------------------------- // TEST[continued] -The above request will retrieve {ilm-init} execution information for all our -managed indices. - +The response below shows that the bootstrap index is waiting in the `hot` phase's `rollover` action. +It will remain in this state and {ilm-init} will continue to call `attempt-rollover` +until the rollover conditions are met. [source,console-result] -------------------------------------------------- @@ -174,19 +179,19 @@ managed indices. "indices": { "datastream-000001": { "index": "datastream-000001", - "managed": true, <1> - "policy": "datastream_policy", <2> + "managed": true, + "policy": "datastream_policy", <1> "lifecycle_date_millis": 1538475653281, - "age": "30s", <3> - "phase": "hot", <4> + "age": "30s", <2> + "phase": "hot", "phase_time_millis": 1538475653317, - "action": "rollover", <5> + "action": "rollover", "action_time_millis": 1538475653317, - "step": "attempt-rollover", <6> + "step": "attempt-rollover", <3> "step_time_millis": 1538475653317, "phase_execution": { "policy": "datastream_policy", - "phase_definition": { <7> + "phase_definition": { <4> "min_age": "0ms", "actions": { "rollover": { @@ -195,7 +200,7 @@ managed indices. } } }, - "version": 1, <8> + "version": 1, "modified_date_in_millis": 1539609701576 } } @@ -204,33 +209,10 @@ managed indices. -------------------------------------------------- // TESTRESPONSE[skip:no way to know if we will get this response immediately] -<1> this index is managed by ILM -<2> the policy in question, in this case, "datastream_policy" -<3> the current age of the index -<4> what phase the index is currently in -<5> what action the index is currently on -<6> what step the index is currently on -<7> the definition of the phase - (in this case, the "hot" phase) that the index is currently on -<8> the version of the policy being used to execute the current phase - -You can read about the full details of this response in the -<>. For now, let's focus on how -the response details which phase, action, and step we're in. We are in the -"hot" phase, and "rollover" action. Rollover will continue to be called -by {ilm-init} until its conditions are met and it rolls over the index. -Afterwards, the original index will stay in the hot phase until 90 more -days pass and it is deleted in the delete phase. -As time goes on, new indices will be created and deleted. -With `datastream-000002` being created when the index mets the rollover -conditions and `datastream-000003` created after that. We will be able -to search across all of our managed indices using the "datastream" alias, -and we will be able to write to our to-be-rolled-over write indices using -that same alias. - - - -That's it! We have our first use-case managed by {ilm-init}. +<1> The policy used to manage the index +<2> The age of the index +<3> The step {ilm-init} is performing on the index +<4> The definition of the current phase (the `hot` phase) To learn more about all our APIs, check out <>. From 0245b34144ac48e72d6e95b5a06b5bdb1791e3e2 Mon Sep 17 00:00:00 2001 From: Deb Adair Date: Thu, 30 Jan 2020 15:07:16 -0800 Subject: [PATCH 03/15] [DOCS] Incorporated review feedback from @andreidan. --- docs/reference/ilm/getting-started-ilm.asciidoc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/reference/ilm/getting-started-ilm.asciidoc b/docs/reference/ilm/getting-started-ilm.asciidoc index ae4d2a8618497..1378bb8595f32 100644 --- a/docs/reference/ilm/getting-started-ilm.asciidoc +++ b/docs/reference/ilm/getting-started-ilm.asciidoc @@ -12,7 +12,8 @@ This tutorial demonstrates how to use {ilm} ({ilm-init}) to manage indices that contain time-series data. -When you use a mechanism like Filebeat to continuously index timestamped documents into {es}, +When you continuously index timestamped documents into {es} using +Filebeat, Logstash, or some other mechanism, you typically use an index alias so you can periodically roll over to a new index. This enables you to implement a hot-warm-cold architecture to meet your performance requirements for your newest data, control costs over time, enforce retention policies, @@ -41,7 +42,7 @@ For example, the following request creates a `data_stream` policy with two phase * The `hot` phase defines a `rollover` action to specify that an index rolls over when it reaches either a `max_size` of 50 gigabytes or a `max_age` of 30 days. -* The `delete` phase uses `min_age` to determine when the index should be removed. +* The `delete` phase uses `min_age` to remove the index 90 days after rollover. Note that this value is relative to the rollover time, not the index creation time. [source,console] @@ -73,7 +74,7 @@ PUT _ilm/policy/datastream_policy <1> The `min_age` defaults to `0ms`, so new indices enter the hot phase immediately. <2> Trigger the `rollover` action when either of the conditions are met. <3> Move the index into the delete phase 90 days after rollover. -<4> Trigger the `delete` action when the index enters the delete phase. No other conditions need to be met. +<4> Trigger the `delete` action when the index enters the delete phase. See <> for the complete list of actions available in each phase. @@ -110,7 +111,7 @@ PUT _template/datastream_template <1> Apply the template to a new index if its name starts with "datastream-". <2> The name of the lifecycle policy to apply to each new index. -<3> The name of the index alias used to reference these indices. +<3> The name of the alias used to reference these indices. Required for policies that use the rollover action. [float] From 78b73af4784330f99e50b56900e3effc6cd8562b Mon Sep 17 00:00:00 2001 From: Deb Adair Date: Thu, 30 Jan 2020 15:14:56 -0800 Subject: [PATCH 04/15] [DOCS] Removed test link & fixed anchor & title. --- docs/reference/ilm/getting-started-ilm.asciidoc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/reference/ilm/getting-started-ilm.asciidoc b/docs/reference/ilm/getting-started-ilm.asciidoc index 1378bb8595f32..bf6c437fb2f00 100644 --- a/docs/reference/ilm/getting-started-ilm.asciidoc +++ b/docs/reference/ilm/getting-started-ilm.asciidoc @@ -2,13 +2,12 @@ [testenv="basic"] [[getting-started-index-lifecycle-management]] -== Roll over indices automatically with {ilm-init} +== Get started: Automate roll over with {ilm-init} ++++ -Roll over automatically +Automate roll over ++++ -[[ilm-roll-over-automatically]] This tutorial demonstrates how to use {ilm} ({ilm-init}) to manage indices that contain time-series data. @@ -19,8 +18,6 @@ This enables you to implement a hot-warm-cold architecture to meet your performa requirements for your newest data, control costs over time, enforce retention policies, and still get the most out of your data. -This is a <>. - To automate roll over and management of time-series indices with {ilm-init}, you: . <> with the {ilm-init} Put policy API. From 0abe008efdb9643cdac0c3c00d5777c241042086 Mon Sep 17 00:00:00 2001 From: Deb Adair Date: Thu, 30 Jan 2020 15:43:34 -0800 Subject: [PATCH 05/15] Edits --- docs/reference/ilm/getting-started-ilm.asciidoc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/reference/ilm/getting-started-ilm.asciidoc b/docs/reference/ilm/getting-started-ilm.asciidoc index bf6c437fb2f00..86358e97355b8 100644 --- a/docs/reference/ilm/getting-started-ilm.asciidoc +++ b/docs/reference/ilm/getting-started-ilm.asciidoc @@ -66,8 +66,6 @@ PUT _ilm/policy/datastream_policy } } ------------------------ - - <1> The `min_age` defaults to `0ms`, so new indices enter the hot phase immediately. <2> Trigger the `rollover` action when either of the conditions are met. <3> Move the index into the delete phase 90 days after rollover. @@ -111,6 +109,16 @@ PUT _template/datastream_template <3> The name of the alias used to reference these indices. Required for policies that use the rollover action. +////////////////////////// + +[source,console] +-------------------------------------------------- +DELETE /_template/datastream_template +-------------------------------------------------- +// TEST[continued] + +////////////////////////// + [float] [[ilm-gs-bootstrap]] === Bootstrap the initial time-series index @@ -171,6 +179,7 @@ The response below shows that the bootstrap index is waiting in the `hot` phase' It will remain in this state and {ilm-init} will continue to call `attempt-rollover` until the rollover conditions are met. +[[36818c6d9f434d387819c30bd9addb14]] [source,console-result] -------------------------------------------------- { From 99f219e29bdb7294feb1d99fd6a9fadbcab07e66 Mon Sep 17 00:00:00 2001 From: Deb Adair Date: Thu, 30 Jan 2020 16:04:27 -0800 Subject: [PATCH 06/15] Reverted explicit actions anchor. --- docs/reference/ilm/getting-started-ilm.asciidoc | 2 +- docs/reference/ilm/policy-definitions.asciidoc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/reference/ilm/getting-started-ilm.asciidoc b/docs/reference/ilm/getting-started-ilm.asciidoc index 86358e97355b8..1230a1281633b 100644 --- a/docs/reference/ilm/getting-started-ilm.asciidoc +++ b/docs/reference/ilm/getting-started-ilm.asciidoc @@ -71,7 +71,7 @@ PUT _ilm/policy/datastream_policy <3> Move the index into the delete phase 90 days after rollover. <4> Trigger the `delete` action when the index enters the delete phase. -See <> for the complete list of actions available in each phase. +See <<_actions>> for the complete list of actions available in each phase. [float] [[ilm-gs-apply-policy]] diff --git a/docs/reference/ilm/policy-definitions.asciidoc b/docs/reference/ilm/policy-definitions.asciidoc index 9abc57707bb0b..4cfa87489165a 100644 --- a/docs/reference/ilm/policy-definitions.asciidoc +++ b/docs/reference/ilm/policy-definitions.asciidoc @@ -88,7 +88,6 @@ of these operations are done in isolation in a unit called a "step". The to see which step our index is either to execute next, or is currently executing. -[[ilm-policy-actions]] === Actions The below list shows the actions which are available in each phase. From 0cc6a8c98fdb1c68761c78916492815ba5ffd536 Mon Sep 17 00:00:00 2001 From: debadair Date: Tue, 4 Feb 2020 13:07:42 -0800 Subject: [PATCH 07/15] Update docs/reference/ilm/getting-started-ilm.asciidoc Co-Authored-By: James Rodewig --- docs/reference/ilm/getting-started-ilm.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/ilm/getting-started-ilm.asciidoc b/docs/reference/ilm/getting-started-ilm.asciidoc index 1230a1281633b..fb1218b47f6e0 100644 --- a/docs/reference/ilm/getting-started-ilm.asciidoc +++ b/docs/reference/ilm/getting-started-ilm.asciidoc @@ -2,7 +2,7 @@ [testenv="basic"] [[getting-started-index-lifecycle-management]] -== Get started: Automate roll over with {ilm-init} +== Get started: Automate rollover with {ilm-init} ++++ Automate roll over From 6db949ab475c0a04f73cd1e79a9382521dd8a77a Mon Sep 17 00:00:00 2001 From: debadair Date: Tue, 4 Feb 2020 13:07:54 -0800 Subject: [PATCH 08/15] Update docs/reference/ilm/getting-started-ilm.asciidoc Co-Authored-By: James Rodewig --- docs/reference/ilm/getting-started-ilm.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/ilm/getting-started-ilm.asciidoc b/docs/reference/ilm/getting-started-ilm.asciidoc index fb1218b47f6e0..79e83b5602127 100644 --- a/docs/reference/ilm/getting-started-ilm.asciidoc +++ b/docs/reference/ilm/getting-started-ilm.asciidoc @@ -5,7 +5,7 @@ == Get started: Automate rollover with {ilm-init} ++++ -Automate roll over +Automate rollover ++++ This tutorial demonstrates how to use {ilm} ({ilm-init}) From 52374ce429a75f53e73506050dcc6202adce5bac Mon Sep 17 00:00:00 2001 From: Deb Adair Date: Tue, 4 Feb 2020 14:59:08 -0800 Subject: [PATCH 09/15] Incorporated feedback from @jrodewig --- .../ilm/getting-started-ilm.asciidoc | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/docs/reference/ilm/getting-started-ilm.asciidoc b/docs/reference/ilm/getting-started-ilm.asciidoc index 79e83b5602127..b39d409465000 100644 --- a/docs/reference/ilm/getting-started-ilm.asciidoc +++ b/docs/reference/ilm/getting-started-ilm.asciidoc @@ -18,13 +18,13 @@ This enables you to implement a hot-warm-cold architecture to meet your performa requirements for your newest data, control costs over time, enforce retention policies, and still get the most out of your data. -To automate roll over and management of time-series indices with {ilm-init}, you: +To automate rollover and management of time-series indices with {ilm-init}, you: -. <> with the {ilm-init} Put policy API. +. <> with the {ilm-init} put policy API. . <> to apply the policy to each new index. . <> as the initial write index. . <> -as expected with the {ilm-init} Explain API. +as expected with the {ilm-init} explain API. [float] [[ilm-gs-create-policy]] @@ -33,9 +33,9 @@ as expected with the {ilm-init} Explain API. A lifecycle policy specifies the phases in the index lifecycle and the actions to perform in each phase. A lifecycle can have up to four phases: `hot`, `warm`, `cold`, and `delete`. Policies are defined in JSON -and added through the {ilm-init} Put policy API. +and added through the {ilm-init} put policy API. -For example, the following request creates a `data_stream` policy with two phases: +For example, the following request creates a `datastream_policy` with two phases: * The `hot` phase defines a `rollover` action to specify that an index rolls over when it reaches either a `max_size` of 50 gigabytes or a `max_age` of 30 days. @@ -66,9 +66,9 @@ PUT _ilm/policy/datastream_policy } } ------------------------ -<1> The `min_age` defaults to `0ms`, so new indices enter the hot phase immediately. +<1> The `min_age` defaults to `0ms`, so new indices enter the `hot` phase immediately. <2> Trigger the `rollover` action when either of the conditions are met. -<3> Move the index into the delete phase 90 days after rollover. +<3> Move the index into the `delete` phase 90 days after rollover. <4> Trigger the `delete` action when the index enters the delete phase. See <<_actions>> for the complete list of actions available in each phase. @@ -104,7 +104,7 @@ PUT _template/datastream_template ----------------------- // TEST[continued] -<1> Apply the template to a new index if its name starts with "datastream-". +<1> Apply the template to a new index if its name starts with `datastream-`. <2> The name of the lifecycle policy to apply to each new index. <3> The name of the alias used to reference these indices. Required for policies that use the rollover action. @@ -128,7 +128,7 @@ designate it as the write index for the rollover alias specified in your index t The name of this index must match the template's index pattern and end with a number. On rollover, this value is incremented to generate a name for the new index. -For example, the following request creates an index called `datastream_000001` +For example, the following request creates an index called `datastream-000001` and makes it the write index for the `datastream` alias. [source,console] @@ -144,7 +144,7 @@ PUT datastream-000001 ----------------------- // TEST[continued] -When the rollover conditions are met, the rollover action: +When the rollover conditions are met, the `rollover` action: * Creates a new index called `datastream-000002`. This matches the `datastream-*` pattern, so the settings from `datastream_template` are applied to the new index. @@ -154,13 +154,13 @@ This process will repeat each time the rollover conditions are met. You can search across all of the indices managed by the `datastream_policy` with the `datastream` alias. Write operations are routed to the current write index. -For more information about write indices and rollover, see the <>. +For more information about write indices and rollover, see the <>. [float] [[ilm-gs-check-progress]] === Checking progress -To get status information for {ilm-init}-managed indices, you use the Explain API. +To get status information for managed indices, you use the {ilm-init} explain API. This lets you find out things like: * What phase an index is in and when it entered that phase. @@ -221,5 +221,4 @@ until the rollover conditions are met. <3> The step {ilm-init} is performing on the index <4> The definition of the current phase (the `hot` phase) -To learn more about all our APIs, -check out <>. +See the <> for more information. From cdb2829a52135446cc366412e6d76864122334e7 Mon Sep 17 00:00:00 2001 From: debadair Date: Tue, 4 Feb 2020 15:14:22 -0800 Subject: [PATCH 10/15] Update docs/reference/ilm/getting-started-ilm.asciidoc Co-Authored-By: James Rodewig --- docs/reference/ilm/getting-started-ilm.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/ilm/getting-started-ilm.asciidoc b/docs/reference/ilm/getting-started-ilm.asciidoc index b39d409465000..e3352a5f996c9 100644 --- a/docs/reference/ilm/getting-started-ilm.asciidoc +++ b/docs/reference/ilm/getting-started-ilm.asciidoc @@ -31,7 +31,7 @@ as expected with the {ilm-init} explain API. === 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 four phases: +and the actions to perform in each phase. A lifecycle can have up to four phases: `hot`, `warm`, `cold`, and `delete`. Policies are defined in JSON and added through the {ilm-init} put policy API. From 6f8e53b3e3fcf2816ecc19c4474edb6f6b7766a6 Mon Sep 17 00:00:00 2001 From: debadair Date: Tue, 4 Feb 2020 15:15:03 -0800 Subject: [PATCH 11/15] Update docs/reference/ilm/getting-started-ilm.asciidoc Co-Authored-By: James Rodewig --- docs/reference/ilm/getting-started-ilm.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/ilm/getting-started-ilm.asciidoc b/docs/reference/ilm/getting-started-ilm.asciidoc index e3352a5f996c9..bbd8043aa7fef 100644 --- a/docs/reference/ilm/getting-started-ilm.asciidoc +++ b/docs/reference/ilm/getting-started-ilm.asciidoc @@ -78,7 +78,7 @@ See <<_actions>> for the complete list of actions available in each phase. === Create an index template to apply the lifecycle policy To automaticaly apply a lifecycle policy to the new write index on rollover, -you specify the policy in the index template used to create new indices. +specify the policy in the index template used to create new indices. For example, the following request creates a `datastream_template` that is applied to new indices whose names match the `datastream-*` index pattern. From 643b6064a96ca5b84ec1e3be976c92d2e893f5a7 Mon Sep 17 00:00:00 2001 From: debadair Date: Tue, 4 Feb 2020 15:15:54 -0800 Subject: [PATCH 12/15] Update docs/reference/ilm/getting-started-ilm.asciidoc Co-Authored-By: James Rodewig --- docs/reference/ilm/getting-started-ilm.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/ilm/getting-started-ilm.asciidoc b/docs/reference/ilm/getting-started-ilm.asciidoc index bbd8043aa7fef..58a3e3827a68b 100644 --- a/docs/reference/ilm/getting-started-ilm.asciidoc +++ b/docs/reference/ilm/getting-started-ilm.asciidoc @@ -23,7 +23,7 @@ To automate rollover and management of time-series indices with {ilm-init}, you: . <> with the {ilm-init} put policy API. . <> to apply the policy to each new index. . <> as the initial write index. -. <> +. <> as expected with the {ilm-init} explain API. [float] From d89292fd4ccc08da703db0a68ceb0975e2374496 Mon Sep 17 00:00:00 2001 From: debadair Date: Tue, 4 Feb 2020 15:16:29 -0800 Subject: [PATCH 13/15] Update docs/reference/ilm/getting-started-ilm.asciidoc Co-Authored-By: James Rodewig --- docs/reference/ilm/getting-started-ilm.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/ilm/getting-started-ilm.asciidoc b/docs/reference/ilm/getting-started-ilm.asciidoc index 58a3e3827a68b..9fe80e7e97d38 100644 --- a/docs/reference/ilm/getting-started-ilm.asciidoc +++ b/docs/reference/ilm/getting-started-ilm.asciidoc @@ -86,7 +86,7 @@ The template configures two {ilm-init} settings: * `index.lifecycle.name` specifies the name of the lifecycle policy to apply to all new indices that match the index pattern. -* `index.lifecycle.rollover_alias` specifies the index alias that will be rolled over +* `index.lifecycle.rollover_alias` specifies the index alias to be rolled over when the rollover action is triggered for an index. [source,console] From 8996f294c59e8412bcb0d7e966a01ecc83c7203c Mon Sep 17 00:00:00 2001 From: debadair Date: Tue, 4 Feb 2020 15:17:22 -0800 Subject: [PATCH 14/15] Update docs/reference/ilm/getting-started-ilm.asciidoc Co-Authored-By: James Rodewig --- docs/reference/ilm/getting-started-ilm.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/ilm/getting-started-ilm.asciidoc b/docs/reference/ilm/getting-started-ilm.asciidoc index 9fe80e7e97d38..5466367f46446 100644 --- a/docs/reference/ilm/getting-started-ilm.asciidoc +++ b/docs/reference/ilm/getting-started-ilm.asciidoc @@ -150,7 +150,7 @@ When the rollover conditions are met, the `rollover` action: This matches the `datastream-*` pattern, so the settings from `datastream_template` are applied to the new index. * Designates the new index as the write index and makes the bootstrap index read-only. -This process will repeat each time the rollover conditions are met. +This process repeats each time rollover conditions are met. You can search across all of the indices managed by the `datastream_policy` with the `datastream` alias. Write operations are routed to the current write index. From 2d2dd82ba60788895f7b409904518b5513768d43 Mon Sep 17 00:00:00 2001 From: debadair Date: Tue, 4 Feb 2020 15:17:44 -0800 Subject: [PATCH 15/15] Update docs/reference/ilm/getting-started-ilm.asciidoc Co-Authored-By: James Rodewig --- docs/reference/ilm/getting-started-ilm.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/ilm/getting-started-ilm.asciidoc b/docs/reference/ilm/getting-started-ilm.asciidoc index 5466367f46446..278d6b7a83123 100644 --- a/docs/reference/ilm/getting-started-ilm.asciidoc +++ b/docs/reference/ilm/getting-started-ilm.asciidoc @@ -176,7 +176,7 @@ GET datastream-*/_ilm/explain // TEST[continued] The response below shows that the bootstrap index is waiting in the `hot` phase's `rollover` action. -It will remain in this state and {ilm-init} will continue to call `attempt-rollover` +It remains in this state and {ilm-init} continues to call `attempt-rollover` until the rollover conditions are met. [[36818c6d9f434d387819c30bd9addb14]]