Skip to content

Commit 7726b8e

Browse files
committed
Add tabs to contrast the Kibana examples from the API requests
1 parent 0a127f2 commit 7726b8e

File tree

1 file changed

+43
-13
lines changed

1 file changed

+43
-13
lines changed

manage-data/lifecycle/index-lifecycle-management/tutorial-automate-rollover.md

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,24 @@ The `min_age` value is relative to the rollover time, not the index creation tim
4747
::::
4848

4949

50-
You can create the policy through {{kib}} or with the [create or update policy](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-put-lifecycle) API. To create the policy from {{kib}}, open the menu and go to **Stack Management > Index Lifecycle Policies**. Click **Create policy**.
50+
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.
51+
52+
::::{tab-set}
53+
:group: kibana-api
54+
:::{tab-item} {{kib}}
55+
:sync: kibana
56+
To create the policy from {{kib}}, open the menu and go to **Stack Management > Index Lifecycle Policies**. Click **Create policy**.
5157

5258
:::{image} /manage-data/images/elasticsearch-reference-create-policy.png
5359
:alt: Create policy page
5460
:screenshot:
5561
:::
62+
:::
63+
64+
:::{tab-item} API
65+
:sync: api
66+
Use the [Create or update policy](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-put-lifecycle) API to add an ILM policy to the {{es}} cluster:
5667

57-
::::{dropdown} API example
5868
```console
5969
PUT _ilm/policy/timeseries_policy
6070
{
@@ -84,7 +94,7 @@ PUT _ilm/policy/timeseries_policy
8494
3. Move the index into the `delete` phase 90 days after rollover.
8595
4. Trigger the `delete` action when the index enters the delete phase.
8696

87-
97+
:::
8898
::::
8999

90100
:::{tip}
@@ -102,19 +112,27 @@ To enable {{ilm-init}} to manage the data stream, the template configures one {{
102112

103113
* `index.lifecycle.name` specifies the name of the lifecycle policy that you want to apply to the data stream.
104114

105-
You can use the {{kib}} **Create template** wizard to add the template. From {{kib}}, open the menu and go to **Stack Management > Index Management**. In the **Index Templates** tab, click **Create template**.
115+
You can use the {{kib}} **Create template** wizard to add the 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 an index template to a cluster and apply the lifecycle policy to indices matching the template.
106116

107-
:::{image} /manage-data/images/elasticsearch-reference-create-index-template.png
108-
:alt: Create template page
109-
:::
117+
::::{tab-set}
118+
:group: kibana-api
119+
:::{tab-item} {{kib}}
120+
:sync: kibana
121+
To add an index template to a cluster, go to **Stack Management > Index Management**. In the **Index Templates** tab, click **Create template**.
110122

111-
This wizard invokes the [create or update index template API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-index-template) to create the index template with the options you specify.
123+
![Create template page](/manage-data/images/elasticsearch-reference-create-index-template.png "")
112124

113-
:::{tip}
125+
This wizard invokes the create or update index template API to create the index template with the options you specify.
126+
127+
:::{tip}
114128
For more information about the available index template options that 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).
115129
:::
130+
:::
131+
132+
:::{tab-item} API
133+
:sync: api
134+
Use the API to add an index template to your cluster:
116135

117-
::::{dropdown} API example
118136
```console
119137
PUT _index_template/timeseries_template
120138
{
@@ -133,7 +151,7 @@ PUT _index_template/timeseries_template
133151
1. Apply the template when a document is indexed into the `timeseries` target.
134152
2. The name of the {{ilm-init}} policy used to manage the data stream.
135153

136-
154+
:::
137155
::::
138156

139157

@@ -245,10 +263,21 @@ To enable automatic rollover, the template configures two {{ilm-init}} settings:
245263
* `index.lifecycle.name` specifies the name of the lifecycle policy to apply to new indices that match the index pattern.
246264
* `index.lifecycle.rollover_alias` specifies the index alias to be rolled over when the rollover action is triggered for an index.
247265

248-
You can use the {{kib}} Create template wizard to add the template. To access the wizard, open the menu and go to **Stack Management > Index Management**. In the **Index Templates** tab, click **Create template**.
266+
::::{tab-set}
267+
:group: kibana-api
268+
:::{tab-item} {{kib}}
269+
:sync: kibana
270+
To use the {{kib}} **Create template** wizard to add the template, go to **Stack Management > Index Management**. In the **Index Templates** tab, click **Create template**.
249271

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

274+
:::{tip}
275+
For more information about the available index template options that 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).
276+
:::
277+
:::
278+
279+
:::{tab-item} API
280+
:sync: api
252281
The create template request for the example template looks like this:
253282

254283
```console
@@ -270,7 +299,8 @@ PUT _index_template/timeseries_template
270299
2. The name of the lifecycle policy to apply to each new index.
271300
3. The name of the alias used to reference these indices. Required for policies that use the rollover action.
272301

273-
302+
:::
303+
::::
274304

275305
### Bootstrap the initial time series index with a write index alias [ilm-gs-alias-bootstrap]
276306

0 commit comments

Comments
 (0)