You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: manage-data/lifecycle/data-stream/tutorial-update-existing-data-stream.md
+19-7Lines changed: 19 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ To update the lifecycle of an existing data stream you need to perform the follo
18
18
19
19
## Set a data stream’s lifecycle [set-lifecycle]
20
20
21
-
To add or to change the retention period of your data stream you can use **Index Management** in {{kib}} or the {{es}} [PUT lifecycle API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-lifecycle).
21
+
To add or to change the retention period of your data stream you can use the **Index Management** tools in {{kib}} or the {{es}} [PUT lifecycle API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-lifecycle).
22
22
23
23
24
24
:::::{tab-set}
@@ -32,9 +32,14 @@ To change the data retention settings for a data stream:
32
32
1. Use the search tool to find the data stream you're looking for.
33
33
1. Select the data stream to view details.
34
34
1. In the data stream details pane, select **Manage > Edit data retention** to adjust the settings. You can do any of the following:
35
-
. Select the duration that your data should be retained, in days, hours, minutes, or seconds.
36
-
. Choose to **Keep data indefinitely**, so that your data will not be deleted.
37
-
. Disable **Enable data retention** to turn off data stream lifecycle management for your data stream.
35
+
36
+
- Select the duration that your data should be retained, in days, hours, minutes, or seconds.
37
+
- Choose to **Keep data indefinitely**, so that your data will not be deleted. Your data stream is still managed but the data will never be deleted. Managing a time series data stream such as for logs or metrics enables {{es}} to better store your data even if you do not use a retention period.
38
+
- Disable **Enable data retention** to turn off data stream lifecycle management for your data stream.
39
+
40
+
Note that if the data stream is already managed by [{{ilm-init}}](/manage-data/lifecycle/index-lifecycle-management.md), to edit the data retention settings you must edit the associated {{ilm-init}} policy.
41
+
42
+
38
43
:::
39
44
40
45
:::{tab-item} API
@@ -49,7 +54,7 @@ To change the data retention settings for a data stream:
49
54
{ } <1>
50
55
```
51
56
52
-
1. An empty payload means that your data stream is still managed but the data will never be deleted. Managing a time series data stream such as logs or metrics enables {{es}} to better store your data even if you do not use a retention period.
57
+
1. An empty payload means that your data stream is still managed but the data will never be deleted. Managing a time series data stream such as for logs or metrics enables {{es}} to better store your data even if you do not use a retention period.
53
58
54
59
* Or you can set the retention period of your choice. For example:
55
60
@@ -139,26 +144,33 @@ The response will look like:
139
144
140
145
## Remove lifecycle for a data stream [delete-lifecycle]
141
146
142
-
To remove the lifecycle of a data stream you can use in {{kib}} or the {{es}} [delete lifecycle API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-lifecycle).
147
+
To remove the lifecycle of a data stream you can use the **Index Management** tools in {{kib}} or the {{es}} [delete lifecycle API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-lifecycle).
143
148
144
149
145
150
:::::{tab-set}
146
151
:group: kibana-api
147
152
:::{tab-item} {{kib}}
148
153
:sync: kibana
154
+
155
+
To remove a data stream's lifecycle:
156
+
149
157
1. Go to **Stack Management > Index Management** and open the **Data Streams** tab.
150
158
1. Use the search tool to find the data stream you're looking for.
151
159
1. Select the data stream to view details.
152
160
1. In the data stream details pane, select **Manage > Edit data retention**.
153
161
1. Turn off the **Enable data retention** option and save your changes. The maintenance operations that were applied by the lifecycle will no longer be applied to the data stream and all of its backing indices.
154
-
You can confirm your changes by reopening the data stream pane. The **Effective data retention** will show a **Disabled** status.
162
+
163
+
You can confirm your changes by reopening the data stream pane. The **Effective data retention** will show a **Disabled** status.
155
164
156
165

0 commit comments