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
5 changes: 5 additions & 0 deletions manage-data/_snippets/create-lifecycle-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ You can create the policy in {{kib}} or with the [create or update policy](https
:sync: kibana
To create the policy from {{kib}}, open the menu and go to **Stack Management > Index Lifecycle Policies**. Click **Create policy**.

By default, only the hot index lifecycle phase is enabled. Enable each additional lifecycle phase that you'd like.


:::{image} /manage-data/images/elasticsearch-reference-create-policy.png
:alt: Create policy page
:screenshot:
Expand Down Expand Up @@ -60,6 +63,8 @@ PUT _ilm/policy/timeseries_policy
:::
::::

Note that for each phase after the hot phase, you have the option to move the data into the next phase after a certain duration of time. This duration is calculated from the time of the index rollover and not from the time the index is created.

:::{tip}
For more details about default {{ilm-init}} policy settings, refer to [Create a lifecycle policy](/manage-data/lifecycle/index-lifecycle-management/configure-lifecycle-policy.md#ilm-create-policy).
:::
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,21 @@ When you enable {{ilm}} for {{beats}} or the {{ls}} {{es}} output plugin, lifecy
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.

For example, you might create a template named `timeseries_template` and use it for a future data stream named `timeseries`.

To enable {{ilm-init}} to manage the data stream, the template configures one {{ilm-init}} setting:

* `index.lifecycle.name` specifies the name of the lifecycle policy that you want to apply to the data stream.
To configure {{ilm-init}} to manage the data stream, you specify the name of the lifecycle policy that you want to apply to the data stream with the `index.lifecycle.name` setting.

Use the {{kib}} **Create template** wizard to add a template or the [Create or update index template](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-index-template) API to add a template and apply the lifecycle policy to indices matching the template.

::::{tab-set}
:group: kibana-api
:::{tab-item} {{kib}}
:sync: kibana
To add an index template to a cluster using the wizard, go to **Stack Management > Index Management**. In the **Index Templates** tab, click **Create template**.
To add an index template to a cluster using the wizard, go to **Stack Management > Index Management**. In the **Index Templates** tab, click **Create template** and follow the instructions.

![Create template page](/manage-data/images/elasticsearch-reference-create-index-template.png "")

This wizard invokes the create or update index template API to create the index template with the options you specify.
You specify the name of the lifecycle policy that you want to apply to the data stream on the **Index settings** page.

![Create template page](/manage-data/images/elasticsearch-reference-tutorial-ilm-datastreams-tutorial-create-index-template.png "")

:::{tip}
To learn about which index template options you can specify, refer to [Create an index template to apply the lifecycle policy](/manage-data/lifecycle/index-lifecycle-management/configure-lifecycle-policy.md#apply-policy-template).
Expand Down
Loading