@@ -25,18 +25,6 @@ Elasticsearch provides near real-time search and analytics for all types of
25
25
data. The Elasticsearch output plugin can store both time series datasets (such
26
26
as logs, events, and metrics) and non-time series data in Elasticsearch.
27
27
28
- If you plan to use the Kibana web interface to analyze data transformed by
29
- Logstash, use the Elasticsearch output plugin to get your data into
30
- Elasticsearch.
31
-
32
- This output only speaks the HTTP protocol as it is the preferred protocol for
33
- interacting with Elasticsearch. In previous versions it was possible to
34
- communicate with Elasticsearch through the transport protocol, which is now
35
- reserved for internal cluster communication between nodes
36
- {ref}/modules-transport.html[communication between nodes].
37
- Using the transport protocol to communicate with the cluster has been deprecated
38
- in Elasticsearch 7.0.0 and will be removed in 8.0.0
39
-
40
28
You can https://www.elastic.co/elasticsearch/[learn more about Elasticsearch] on
41
29
the website landing page or in the {ref}[Elasticsearch documentation].
42
30
@@ -74,6 +62,59 @@ By having an ECS-compatible template in place, we can ensure that Elasticsearch
74
62
is prepared to create and index fields in a way that is compatible with ECS,
75
63
and will correctly reject events with fields that conflict and cannot be coerced.
76
64
65
+ [id="plugins-{type}s-{plugin}-data-streams"]
66
+ ==== Data streams
67
+
68
+ The {es} output plugin can store both time series datasets (such
69
+ as logs, events, and metrics) and non-time series data in Elasticsearch.
70
+
71
+ The data stream options are recommended for indexing time series datasets (such
72
+ as logs, metrics, and events) into {es}:
73
+
74
+ * <<plugins-{type}s-{plugin}-data_stream>> |<<string,string>>
75
+ * <<plugins-{type}s-{plugin}-data_stream_auto_routing>>
76
+ * <<plugins-{type}s-{plugin}-data_stream_dataset>>
77
+ * <<plugins-{type}s-{plugin}-data_stream_namespace>>
78
+ * <<plugins-{type}s-{plugin}-data_stream_sync_fields>>
79
+ * <<plugins-{type}s-{plugin}-data_stream_type>>
80
+
81
+ [id="plugins-{type}s-{plugin}-ds-examples"]
82
+ ===== Data stream configuration examples
83
+
84
+ **Example: Basic default configuration**
85
+
86
+ [source,sh]
87
+ -----
88
+ output {
89
+ elasticsearch {
90
+ hosts => "hostname"
91
+ data_stream => "true"
92
+ }
93
+ }
94
+ -----
95
+
96
+ This example shows the minimal settings for processing data streams. Events
97
+ with `data_stream.*`` fields are routed to the appropriate data streams. If the
98
+ fields are missing, routing defaults to `logs-generic-logstash`.
99
+
100
+ **Example: Customize data stream name**
101
+
102
+ [source,sh]
103
+ -----
104
+ output {
105
+ elasticsearch {
106
+ hosts => "hostname"
107
+ data_stream => "true"
108
+ data_stream_type => "metrics"
109
+ data_stream_dataset => "foo"
110
+ data_stream_namespace => "bar"
111
+ }
112
+ }
113
+ -----
114
+
115
+
116
+
117
+
77
118
==== Writing to different indices: best practices
78
119
79
120
[NOTE]
@@ -527,8 +568,7 @@ If you don't set a value for this option:
527
568
** When Logstash provides a `pipeline.ecs_compatibility` setting, its value is used as the default
528
569
** Otherwise, the default value is `disabled`.
529
570
530
- Controls this plugin's compatibility with the
531
- https://www.elastic.co/guide/en/ecs/current/index.html[Elastic Common Schema
571
+ Controls this plugin's compatibility with the {ecs-ref}[Elastic Common Schema
532
572
(ECS)], including the installation of ECS-compatible index templates. The value
533
573
of this setting affects the _default_ values of:
534
574
0 commit comments