Skip to content

Commit 5cff49a

Browse files
karenzoneacchen97kares
authored
Doc: Add data stream section and config samples (#1009)
Co-authored-by: Alvin Chen <[email protected]> Co-authored-by: Karol Bucek <[email protected]>
1 parent 763352a commit 5cff49a

File tree

1 file changed

+54
-14
lines changed

1 file changed

+54
-14
lines changed

docs/index.asciidoc

Lines changed: 54 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,6 @@ Elasticsearch provides near real-time search and analytics for all types of
2525
data. The Elasticsearch output plugin can store both time series datasets (such
2626
as logs, events, and metrics) and non-time series data in Elasticsearch.
2727

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-
4028
You can https://www.elastic.co/elasticsearch/[learn more about Elasticsearch] on
4129
the website landing page or in the {ref}[Elasticsearch documentation].
4230

@@ -74,6 +62,59 @@ By having an ECS-compatible template in place, we can ensure that Elasticsearch
7462
is prepared to create and index fields in a way that is compatible with ECS,
7563
and will correctly reject events with fields that conflict and cannot be coerced.
7664

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+
77118
==== Writing to different indices: best practices
78119

79120
[NOTE]
@@ -527,8 +568,7 @@ If you don't set a value for this option:
527568
** When Logstash provides a `pipeline.ecs_compatibility` setting, its value is used as the default
528569
** Otherwise, the default value is `disabled`.
529570

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
532572
(ECS)], including the installation of ECS-compatible index templates. The value
533573
of this setting affects the _default_ values of:
534574

0 commit comments

Comments
 (0)