@@ -52,10 +52,18 @@ triggers for such actions.
52
52
TIP: While optional, we recommend using {ilm-init} to manage the backing indices
53
53
associated with a data stream.
54
54
55
- The following <<ilm-put-lifecycle,create lifecycle policy API>> request
56
- configures the `logs_policy` lifecycle policy.
55
+ You can create the policy through the Kibana UI. In Kibana, open the menu and go
56
+ to *Stack Management > Index Lifecycle Policies*. Click *Index Lifecycle
57
+ Policies*.
57
58
58
- The `logs_policy` policy uses the <<ilm-rollover,`rollover` action>> to create a
59
+ [role="screenshot"]
60
+ image::images/ilm/create-policy.png[Index Lifecycle Policies page]
61
+
62
+ You can also create a policy using the <<ilm-put-lifecycle,create lifecycle
63
+ policy API>>.
64
+
65
+ The following request configures the `logs_policy` lifecycle policy. The
66
+ `logs_policy` policy uses the <<ilm-rollover,`rollover` action>> to create a
59
67
new <<data-stream-write-index,write index>> for the data stream when the current
60
68
one reaches 25GB in size. The policy also deletes backing indices 30 days after
61
69
their rollover.
@@ -92,19 +100,18 @@ PUT /_ilm/policy/logs_policy
92
100
A data stream uses an index template to configure its backing indices. A
93
101
template for a data stream must specify:
94
102
95
- * An index pattern that matches the name of the stream.
96
-
97
- * An empty `data_stream` object that indicates the template is used for data
98
- streams.
103
+ * One or more wildcard (`*`) patterns that match the name of the stream.
99
104
100
105
* The mappings and settings for the stream's backing indices.
101
106
107
+ * That the template is used exclusively for data streams.
108
+
102
109
Every document indexed to a data stream must have a `@timestamp` field. This
103
110
field can be mapped as a <<date,`date`>> or <<date_nanos,`date_nanos`>> field
104
111
data type by the stream's index template. This mapping can include other
105
112
<<mapping-params,mapping parameters>>, such as <<mapping-date-format,`format`>>.
106
- If the template does not specify a mapping is specified in the template, the
107
- `@timestamp` field is mapped as a `date` field with default options.
113
+ If the template does not specify a mapping, the `@timestamp` field is mapped as
114
+ a `date` field with default options.
108
115
109
116
We recommend using {ilm-init} to manage a data stream's backing indices. Specify
110
117
the name of the lifecycle policy with the `index.lifecycle.name` setting.
@@ -114,11 +121,24 @@ in this template before creating a data stream. Later changes to the mappings or
114
121
settings of a stream's backing indices may require reindexing. See
115
122
<<data-streams-change-mappings-and-settings>>.
116
123
117
- The following <<indices-templates,put index template API>> request
118
- configures the `logs_data_stream` template.
124
+ You can create an index template through the Kibana UI:
125
+
126
+ . From Kibana, open the menu and go to *Stack Management > Index Management*.
127
+ . In the *Index Templates* tab, click *Create template*.
128
+ . In the Create template wizard, use the *Data stream* toggle to indicate the
129
+ template is used exclusively for data streams.
130
+
131
+ [role="screenshot"]
132
+ image::images/data-streams/create-index-template.png[Create template page]
119
133
120
- Because no field mapping is specified, the `@timestamp` field uses the `date`
121
- field data type by default.
134
+ You can also create a template using the <<indices-put-template,put index
135
+ template API>>. The template must include a `data_stream` object with an empty
136
+ body (`{ }`). This object indicates the template is used exclusively for data
137
+ streams.
138
+
139
+ The following request configures the `logs_data_stream` index template. Because
140
+ no field mapping is specified, the `@timestamp` field uses the `date` field data
141
+ type by default.
122
142
123
143
[source,console]
124
144
----
@@ -176,7 +196,7 @@ You can create a data stream using one of two methods:
176
196
[[index-documents-to-create-a-data-stream]]
177
197
==== Index documents to create a data stream
178
198
179
- You can automatically generate a data stream using an indexing request. Submit
199
+ You can automatically create a data stream using an indexing request. Submit
180
200
an <<add-documents-to-a-data-stream,indexing request>> to a target
181
201
matching the name or wildcard pattern defined in the template's `index_patterns`
182
202
property.
@@ -250,10 +270,16 @@ PUT /_data_stream/logs_alt
250
270
[[get-info-about-a-data-stream]]
251
271
=== Get information about a data stream
252
272
253
- You can use the <<indices-get-data-stream,get data stream API>> to get
254
- information about one or more data streams, including:
273
+ To view information about a data stream in Kibana, open the menu and go to
274
+ *Stack Management > Index Management*. In the *Data Streams* tab, click a data
275
+ stream's name to view information about the stream.
276
+
277
+ [role="screenshot"]
278
+ image::images/data-streams/data-streams-list.png[Data Streams tab]
279
+
280
+ You can also use the <<indices-get-data-stream,get data stream API>> to retrieve
281
+ the following information about one or more data streams:
255
282
256
- * The timestamp field
257
283
* The current backing indices, which is returned as an array. The last item in
258
284
the array contains information about the stream's current write index.
259
285
* The current generation
@@ -262,8 +288,6 @@ information about one or more data streams, including:
262
288
* The current {ilm-init} lifecycle policy in the stream's matching index
263
289
template
264
290
265
- This is also handy way to verify that a recently created data stream exists.
266
-
267
291
The following get data stream API request retrieves information about the
268
292
`logs` data stream.
269
293
@@ -330,11 +354,18 @@ data. See <<data-stream-privileges>>.
330
354
[[delete-a-data-stream]]
331
355
=== Delete a data stream
332
356
333
- You can use the <<indices-delete-data-stream,delete data stream API>> to delete
334
- a data stream and its backing indices.
357
+ You can use the Kibana UI to delete a data stream and its backing indices. In
358
+ Kibana, open the menu and go to *Stack Management > Index Management*. In the
359
+ *Data Streams* tab, click the trash can icon to delete a stream and its backing
360
+ indices.
361
+
362
+ [role="screenshot"]
363
+ image::images/data-streams/data-streams-list.png[Data Streams tab]
335
364
336
- The following delete data stream API request deletes the `logs` data stream. This
337
- request also deletes the stream's backing indices and any data they contain.
365
+ You can also use the the <<indices-delete-data-stream,delete data stream API>>
366
+ to delete a data stream. The following delete data stream API request deletes
367
+ the `logs` data stream. This request also deletes the stream's backing indices
368
+ and any data they contain.
338
369
339
370
[source,console]
340
371
----
0 commit comments