@@ -58,6 +58,20 @@ https://www.elastic.co/cloud/elasticsearch-service[hosted {es} Service] on
58
58
Elastic Cloud. The Elasticsearch Service is available on AWS, Google Cloud
59
59
Platform, and Microsoft Azure. {ess-trial}[Try the {es} Service for free].
60
60
61
+ ==== Compatibility with the Elastic Common Schema (ECS)
62
+
63
+ This plugin will persist events to Elasticsearch in the shape produced by
64
+ your pipeline, and _cannot_ be used to re-shape the event structure into a
65
+ shape that complies with ECS. To produce events that fully comply with ECS,
66
+ you will need to populate ECS-defined fields throughout your pipeline
67
+ definition.
68
+
69
+ However, the Elasticsearch Index Templates it manages can be configured to
70
+ be ECS-compatible by setting <<plugins-{type}s-{plugin}-ecs_compatibility>>.
71
+ By having an ECS-compatible template in place, we can ensure that Elasticsearch
72
+ is prepared to create and index fields in a way that is compatible with ECS,
73
+ and will correctly reject events with fields that conflict and cannot be coerced.
74
+
61
75
==== Writing to different indices: best practices
62
76
63
77
[NOTE]
@@ -234,6 +248,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
234
248
| <<plugins-{type}s-{plugin}-doc_as_upsert>> |<<boolean,boolean>>|No
235
249
| <<plugins-{type}s-{plugin}-document_id>> |<<string,string>>|No
236
250
| <<plugins-{type}s-{plugin}-document_type>> |<<string,string>>|No
251
+ | <<plugins-{type}s-{plugin}-ecs_compatibility>> | <<string,string>>|No
237
252
| <<plugins-{type}s-{plugin}-failure_type_logging_whitelist>> |<<array,array>>|No
238
253
| <<plugins-{type}s-{plugin}-healthcheck_path>> |<<string,string>>|No
239
254
| <<plugins-{type}s-{plugin}-hosts>> |<<uri,uri>>|No
@@ -393,6 +408,25 @@ If you don't set a value for this option:
393
408
- for elasticsearch clusters 6.x: the value of 'doc' will be used;
394
409
- for elasticsearch clusters 5.x and below: the event's 'type' field will be used, if the field is not present the value of 'doc' will be used.
395
410
411
+ [id="plugins-{type}s-{plugin}-ecs_compatibility"]
412
+ ===== `ecs_compatibility`
413
+
414
+ * Value type is <<string,string>>
415
+ * Supported values are:
416
+ ** `disabled`: does not provide ECS-compatible templates
417
+ ** `v1`: provides defaults that are compatible with v1 of the Elastic Common Schema
418
+ * Default value depends on which version of Logstash is running:
419
+ ** When Logstash provides a `pipeline.ecs_compatibility` setting, its value is used as the default
420
+ ** Otherwise, the default value is `disabled`.
421
+
422
+ Controls this plugin's compatibility with the {ecs-ref}}[Elastic Common Schema (ECS)],
423
+ including the installation of ECS-compatible index templates.
424
+ The value of this setting affects the _default_ values of:
425
+
426
+ * <<plugins-{type}s-{plugin}-index>>
427
+ * <<plugins-{type}s-{plugin}-template_name>>
428
+ * <<plugins-{type}s-{plugin}-ilm_rollover_alias>>
429
+
396
430
[id="plugins-{type}s-{plugin}-failure_type_logging_whitelist"]
397
431
===== `failure_type_logging_whitelist`
398
432
@@ -500,7 +534,9 @@ NOTE: If this setting is specified, the policy must already exist in Elasticsear
500
534
===== `ilm_rollover_alias`
501
535
502
536
* Value type is <<string,string>>
503
- * Default value is `logstash`
537
+ * Default value depends on whether <<plugins-{type}s-{plugin}-ecs_compatibility>> is enabled:
538
+ ** ECS Compatibility disabled: `logstash`
539
+ ** ECS Compatibility enabled: `ecs-logstash`
504
540
505
541
The rollover alias is the alias where indices managed using Index Lifecycle Management will be written to.
506
542
@@ -514,7 +550,9 @@ NOTE: `ilm_rollover_alias` does NOT support dynamic variable substitution as `in
514
550
===== `index`
515
551
516
552
* Value type is <<string,string>>
517
- * Default value is `"logstash-%{+yyyy.MM.dd}"`
553
+ * Default value depends on whether <<plugins-{type}s-{plugin}-ecs_compatibility>> is enabled:
554
+ ** ECS Compatibility disabled: `"logstash-%{+yyyy.MM.dd}"`
555
+ ** ECS Compatibility enabled: `"ecs-logstash-%{+yyyy.MM.dd}"`
518
556
519
557
The index to write events to. This can be dynamic using the `%{foo}` syntax.
520
558
The default value will partition your indices by day so you can more easily
@@ -548,7 +586,8 @@ Set the keystore password
548
586
* Default value is `true`
549
587
550
588
From Logstash 1.3 onwards, a template is applied to Elasticsearch during
551
- Logstash's startup if one with the name `template_name` does not already exist.
589
+ Logstash's startup if one with the name <<plugins-{type}s-{plugin}-template_name>>
590
+ does not already exist.
552
591
By default, the contents of this template is the default template for
553
592
`logstash-%{+YYYY.MM.dd}` which always matches indices based on the pattern
554
593
`logstash-*`. Should you require support for other index names, or would like
@@ -799,7 +838,10 @@ If not set, the included template will be used.
799
838
===== `template_name`
800
839
801
840
* Value type is <<string,string>>
802
- * Default value is `"logstash"`
841
+ * Default value depends on whether <<plugins-{type}s-{plugin}-ecs_compatibility>> is enabled:
842
+ ** ECS Compatibility disabled: `logstash`
843
+ ** ECS Compatibility enabled: `ecs-logstash`
844
+
803
845
804
846
This configuration option defines how the template is named inside Elasticsearch.
805
847
Note that if you have used the template management features and subsequently
0 commit comments