Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/reference/ilm/apis/delete-lifecycle.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<titleabbrev>Delete Policy</titleabbrev>
++++

beta[]

Deletes a lifecycle policy.

==== Request
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/ilm/apis/explain.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<titleabbrev>Explain Lifecycle</titleabbrev>
++++

beta[]

Shows an index's current lifecycle status.

==== Request
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/ilm/apis/get-lifecycle.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<titleabbrev>Get Policy</titleabbrev>
++++

beta[]

Retrieves a lifecycle policy.

==== Request
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/ilm/apis/get-status.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<titleabbrev>Get {ILM} Status</titleabbrev>
++++

beta[]

Retrieves the current {ilm} status.

==== Request
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/ilm/apis/ilm-api.asciidoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[[index-lifecycle-management-api]]
== Index Lifecycle Management API

beta[]

You can use the following APIs to manage policies on indices.

[float]
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/ilm/apis/move-to-step.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<titleabbrev>Move to Step</titleabbrev>
++++

beta[]

Triggers execution of a specific step in the lifecycle policy.

==== Request
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/ilm/apis/put-lifecycle.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<titleabbrev>Create Policy</titleabbrev>
++++

beta[]

Creates or updates lifecycle policy.

==== Request
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/ilm/apis/remove-policy.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<titleabbrev>Delete Policy</titleabbrev>
++++

beta[]

Removes the assigned lifecycle policy from an index.

==== Request
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/ilm/apis/retry-policy.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<titleabbrev>Retry Policy</titleabbrev>
++++

beta[]

Retry executing the policy for an index that is in the ERROR step.

==== Request
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/ilm/apis/start.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<titleabbrev>Start {ILM}</titleabbrev>
++++

beta[]

Start the {ILM} plugin.

==== Request
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/ilm/apis/stop.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<titleabbrev>Stop {ILM}</titleabbrev>
++++

beta[]

Stop the {ILM} plugin.

==== Request
Expand Down
3 changes: 3 additions & 0 deletions docs/reference/ilm/error-handling.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
[[index-lifecycle-error-handling]]
== Index Lifecycle Error Handling

beta[]

During Index Lifecycle Management's execution of the policy for an index, it's
possible for a step to encounter an error during its execution. When this
happens, ILM will move the management state into an "error" step. This halts
Expand Down Expand Up @@ -142,6 +144,7 @@ PUT _ilm/policy/shrink-the-index
// CONSOLE
// TEST[continued]

[float]
=== Retrying failed index lifecycle management steps

Once the underlying issue that caused an index to move to the error step has
Expand Down
8 changes: 8 additions & 0 deletions docs/reference/ilm/getting-started-ilm.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
[[getting-started-index-lifecycle-management]]
== Getting started with {ilm}

beta[]

Let's jump into {ILM} by working through a hands-on scenario.
This section will leverage many new concepts unique to {ILM} that
you may not be familiar with. The following sections will explore
Expand All @@ -17,6 +19,8 @@ after 90 days.

=== Setting up a new policy

beta[]

There are many new features introduced by {ILM}, but we will only focus on
a few that are needed for our example. For starters, we will use the
<<ilm-put-lifecycle,Put Policy>> API to define our first policy. Lifecycle
Expand Down Expand Up @@ -66,6 +70,8 @@ The index will be deleted 90 days after it is rolled over.

=== Applying a policy to our index

beta[]

There are <<set-up-lifecycle-policy,a few ways>> 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
Expand Down Expand Up @@ -137,6 +143,8 @@ alias to be read-only for the source index.

=== Checking progress

beta[]

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
Expand Down
4 changes: 3 additions & 1 deletion docs/reference/ilm/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
:ILM: ILM
[partintro]
--
beta[]

The <<index-lifecycle-management-api, {ilm} (ILM) APIs>> enable you to automate how you
want to manage your indices over time. Rather than simply performing management
actions on your indices on a set schedule, you can base actions on other factors
Expand Down Expand Up @@ -60,7 +62,7 @@ include::using-policies-rollover.asciidoc[]

include::update-lifecycle-policy.asciidoc[]

include::get-index-lifecycle-information.asciidoc[]
// include::get-index-lifecycle-information.asciidoc[]

include::error-handling.asciidoc[]

Expand Down
9 changes: 9 additions & 0 deletions docs/reference/ilm/policy-definitions.asciidoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
beta[]
[role="xpack"]
[testenv="basic"]
[[ilm-policy-definition]]
== Policy Phases and Actions

beta[]

There are four stages in the index lifecycle, in the order
they are executed.

Expand All @@ -23,6 +26,8 @@ phase and the delete phase, while another may define all four phases.

=== Timing

beta[]

Indices enter phases based on a phase's `min_age` parameter.
The index will not enter the phase until the index's age is older than that
of the `min_age`. The parameter is configured using a time
Expand Down Expand Up @@ -68,6 +73,8 @@ relative to when data was written last to a rolled over index.

=== Actions

beta[]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need a beta[] tag per sub-header?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those break onto separate pages, so...yes. :-)


The below list shows the actions which are available in each phase.

* Hot
Expand Down Expand Up @@ -491,6 +498,8 @@ PUT _ilm/policy/my_policy

=== Full Policy

beta[]

With all of these actions, we can support complex management strategies for our
indices. This policy will define an index that will start in the hot phase,
rolling over every 20g or 7 days. After 30 days it enters the warm phase
Expand Down
11 changes: 8 additions & 3 deletions docs/reference/ilm/set-up-lifecycle-policy.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
[[set-up-lifecycle-policy]]
== Set up {ilm} policy

beta[]

In order for an index to use an {ilm} policy to manage its lifecycle we must
first define a lifecycle policy for it to use. The following request creates
a policy called `my_policy` in Elasticsearch which we can later use to manage
Expand Down Expand Up @@ -30,12 +32,12 @@ PUT _ilm/policy/my_policy
}
}
}
------------------------
------------------------
// CONSOLE
<1> Rollover the index when it reaches 25GB in size
<2> Delete the index when its 30 days old

{ilm} will manage an index using the policy defined in the
{ilm} will manage an index using the policy defined in the
`index.lifecycle.name` index setting. If this setting does not exist in the
settings for a particular index {ilm} will not manage that index.

Expand All @@ -45,6 +47,8 @@ To set the policy for an index there are two options:

=== Applying a policy to an index template

beta[]

The `index.lifecycle.name` setting can be set in an index template so that it
is automatically applied to indexes matching the templates index pattern:

Expand Down Expand Up @@ -89,6 +93,8 @@ create a new index and roll the alias over to use the new index automatically.

=== Apply a policy to a create index request

beta[]

The `index.lifecycle.name` setting can be set on an individual create index
request so {ilm} immediately starts managing the index:

Expand All @@ -109,4 +115,3 @@ IMPORTANT: Its recommended not to use the create index API with a policy that
defines a rollover action. If you do so, the new index as the result of the
rollover will not carry forward the policy. Always use index templates to
define policies with rollover actions.

6 changes: 5 additions & 1 deletion docs/reference/ilm/start-stop-ilm.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
[[start-stop-ilm]]
== Start And Stop {ilm}

beta[]

All indices that are managed by ILM will continue to execute
their policies. There may be times when this is not desired on certain
indices, or maybe even all the indices in a cluster. For example,
Expand Down Expand Up @@ -77,7 +79,8 @@ The operating modes of ILM:
|STOPPED |This represents a state where no policies are executed
|===

=== Stopping ILM
[float]
=== Stopping ILM=

The ILM service can be paused such that no further steps will be executed
using the <<ilm-stop,Stop API>>.
Expand Down Expand Up @@ -134,6 +137,7 @@ GET _ilm/status
// CONSOLE
// TESTRESPONSE

[float]
=== Starting ILM

To start ILM and continue executing policies, use the <<ilm-start, Start API>>.
Expand Down
8 changes: 8 additions & 0 deletions docs/reference/ilm/update-lifecycle-policy.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<titleabbrev>Update Policy</titleabbrev>
++++

beta[]

You can update an existing lifecycle policy to fix mistakes or change
strategies for newly created indices. It is possible to update policy definitions
and an index's `index.lifecycle.name` settings independently. To prevent the situation
Expand All @@ -17,6 +19,8 @@ their effects on policy execution on indices.

=== Updates to policies not managing indices

beta[]

Indices not referencing an existing policy that is updated will not be affected.
If an index is assigned to the policy, it will be assigned the latest version of that policy

Expand Down Expand Up @@ -130,6 +134,8 @@ the policy.

=== Updates to executing policies

beta[]

Indices preserve the phase definition from the latest policy version that existed
at the time that it entered that phase. Changes to the currently-executing phase within policy updates will
not be reflected during execution. This means that updates to the `hot` phase, for example, will not affect
Expand Down Expand Up @@ -362,6 +368,8 @@ GET my_index/_ilm/explain

=== Switching policies for an index

beta[]

Setting `index.lifecycle.name` to a different policy behaves much like a policy update, but instead of just
switching to a different version, it switches to a different policy.

Expand Down
2 changes: 2 additions & 0 deletions docs/reference/ilm/using-policies-rollover.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
[[using-policies-rollover]]
== Using policies to manage index rollover

beta[]

The rollover action enables you to automatically roll over to a new index based
on the index size, document count, or age. When a rollover is triggered, a new
index is created, the write alias is updated to point to the new index, and all
Expand Down