Skip to content

Commit 753df18

Browse files
committed
Adding screenshot + context around the policy creation step
1 parent f38bb62 commit 753df18

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed
133 KB
Loading

manage-data/lifecycle/index-lifecycle-management/tutorial-general-content-with-data-streams.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,32 @@ PUT _ingest/pipeline/ingest_time_1
7272

7373
## Create a lifecycle policy [manage-general-content-with-data-streams-policy]
7474

75-
In this example, the policy is configured to roll over when the shard size reaches 10 GB:
75+
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: `hot`, `warm`, `cold`, `frozen`, and `delete`.
76+
77+
For example, you might define a policy named `indextods` that is configured to roll over when the shard size reaches 10 GB.
78+
79+
You can create the policy in {{kib}} or with the [create or update policy](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-put-lifecycle) API.
80+
81+
::::{tab-set}
82+
:group: kibana-api
83+
:::{tab-item} {{kib}}
84+
:sync: kibana
85+
To create the policy from {{kib}}, open the menu and go to **Stack Management > Index Lifecycle Policies**. Click **Create policy**.
86+
87+
In the **Hot phase**, by default, an ILM-managed index [rolls over](elasticsearch://reference/elasticsearch/index-lifecycle-actions/ilm-rollover.md) when either:
88+
* It reaches 30 days of age.
89+
* One or more primary shards reach 50 GB in size.
90+
91+
Disable **Use recommended defaults** to adjust these values and roll over when the primary shard reaches 10GB.
92+
93+
:::{image} /manage-data/images/elasticsearch-reference-tutorial-ilm-rollover-general-content-create-policy.png
94+
:alt: Create policy page
95+
:screenshot:
96+
:::
97+
:::
98+
99+
:::{tab-item} API
100+
:sync: api
76101

77102
```console
78103
PUT _ilm/policy/indextods
@@ -94,8 +119,10 @@ PUT _ilm/policy/indextods
94119
}
95120
}
96121
```
122+
:::
123+
::::
97124

98-
For more information about lifecycle phases and available actions, check [Create a lifecycle policy](configure-lifecycle-policy.md#ilm-create-policy).
125+
For more information about lifecycle phases and available actions, refer to [Create a lifecycle policy](configure-lifecycle-policy.md#ilm-create-policy).
99126

100127

101128
## Create an index template to apply the ingest pipeline and lifecycle policy [manage-general-content-with-data-streams-template]

0 commit comments

Comments
 (0)