logstash-output-elasticsearch-test 10.3.0-x86_64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +397 -0
- data/CONTRIBUTORS +33 -0
- data/Gemfile +15 -0
- data/LICENSE +13 -0
- data/NOTICE.TXT +5 -0
- data/README.md +106 -0
- data/docs/index.asciidoc +899 -0
- data/lib/logstash/outputs/elasticsearch/common.rb +441 -0
- data/lib/logstash/outputs/elasticsearch/common_configs.rb +167 -0
- data/lib/logstash/outputs/elasticsearch/default-ilm-policy.json +14 -0
- data/lib/logstash/outputs/elasticsearch/elasticsearch-template-es2x.json +95 -0
- data/lib/logstash/outputs/elasticsearch/elasticsearch-template-es5x.json +46 -0
- data/lib/logstash/outputs/elasticsearch/elasticsearch-template-es6x.json +45 -0
- data/lib/logstash/outputs/elasticsearch/elasticsearch-template-es7x.json +44 -0
- data/lib/logstash/outputs/elasticsearch/elasticsearch-template-es8x.json +44 -0
- data/lib/logstash/outputs/elasticsearch/http_client/manticore_adapter.rb +131 -0
- data/lib/logstash/outputs/elasticsearch/http_client/pool.rb +495 -0
- data/lib/logstash/outputs/elasticsearch/http_client.rb +432 -0
- data/lib/logstash/outputs/elasticsearch/http_client_builder.rb +159 -0
- data/lib/logstash/outputs/elasticsearch/ilm.rb +113 -0
- data/lib/logstash/outputs/elasticsearch/template_manager.rb +61 -0
- data/lib/logstash/outputs/elasticsearch.rb +263 -0
- data/logstash-output-elasticsearch.gemspec +33 -0
- data/spec/es_spec_helper.rb +189 -0
- data/spec/fixtures/_nodes/2x_1x.json +27 -0
- data/spec/fixtures/_nodes/5x_6x.json +81 -0
- data/spec/fixtures/_nodes/7x.json +92 -0
- data/spec/fixtures/htpasswd +2 -0
- data/spec/fixtures/nginx_reverse_proxy.conf +22 -0
- data/spec/fixtures/scripts/groovy/scripted_update.groovy +2 -0
- data/spec/fixtures/scripts/groovy/scripted_update_nested.groovy +2 -0
- data/spec/fixtures/scripts/groovy/scripted_upsert.groovy +2 -0
- data/spec/fixtures/scripts/painless/scripted_update.painless +2 -0
- data/spec/fixtures/scripts/painless/scripted_update_nested.painless +1 -0
- data/spec/fixtures/scripts/painless/scripted_upsert.painless +1 -0
- data/spec/fixtures/template-with-policy-es6x.json +48 -0
- data/spec/fixtures/template-with-policy-es7x.json +45 -0
- data/spec/fixtures/test_certs/ca/ca.crt +32 -0
- data/spec/fixtures/test_certs/ca/ca.key +51 -0
- data/spec/fixtures/test_certs/test.crt +36 -0
- data/spec/fixtures/test_certs/test.key +51 -0
- data/spec/integration/outputs/compressed_indexing_spec.rb +69 -0
- data/spec/integration/outputs/create_spec.rb +67 -0
- data/spec/integration/outputs/delete_spec.rb +65 -0
- data/spec/integration/outputs/groovy_update_spec.rb +150 -0
- data/spec/integration/outputs/ilm_spec.rb +531 -0
- data/spec/integration/outputs/index_spec.rb +178 -0
- data/spec/integration/outputs/index_version_spec.rb +102 -0
- data/spec/integration/outputs/ingest_pipeline_spec.rb +74 -0
- data/spec/integration/outputs/metrics_spec.rb +70 -0
- data/spec/integration/outputs/no_es_on_startup_spec.rb +58 -0
- data/spec/integration/outputs/painless_update_spec.rb +189 -0
- data/spec/integration/outputs/parent_spec.rb +102 -0
- data/spec/integration/outputs/retry_spec.rb +169 -0
- data/spec/integration/outputs/routing_spec.rb +61 -0
- data/spec/integration/outputs/sniffer_spec.rb +133 -0
- data/spec/integration/outputs/templates_5x_spec.rb +98 -0
- data/spec/integration/outputs/templates_spec.rb +98 -0
- data/spec/integration/outputs/update_spec.rb +116 -0
- data/spec/support/elasticsearch/api/actions/delete_ilm_policy.rb +19 -0
- data/spec/support/elasticsearch/api/actions/get_alias.rb +18 -0
- data/spec/support/elasticsearch/api/actions/get_ilm_policy.rb +18 -0
- data/spec/support/elasticsearch/api/actions/put_alias.rb +24 -0
- data/spec/support/elasticsearch/api/actions/put_ilm_policy.rb +25 -0
- data/spec/unit/http_client_builder_spec.rb +185 -0
- data/spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb +149 -0
- data/spec/unit/outputs/elasticsearch/http_client/pool_spec.rb +274 -0
- data/spec/unit/outputs/elasticsearch/http_client_spec.rb +250 -0
- data/spec/unit/outputs/elasticsearch/template_manager_spec.rb +25 -0
- data/spec/unit/outputs/elasticsearch_proxy_spec.rb +72 -0
- data/spec/unit/outputs/elasticsearch_spec.rb +675 -0
- data/spec/unit/outputs/elasticsearch_ssl_spec.rb +82 -0
- data/spec/unit/outputs/error_whitelist_spec.rb +54 -0
- metadata +300 -0
data/docs/index.asciidoc
ADDED
@@ -0,0 +1,899 @@
|
|
1
|
+
:plugin: elasticsearch
|
2
|
+
:type: output
|
3
|
+
:no_codec:
|
4
|
+
|
5
|
+
///////////////////////////////////////////
|
6
|
+
START - GENERATED VARIABLES, DO NOT EDIT!
|
7
|
+
///////////////////////////////////////////
|
8
|
+
:version: %VERSION%
|
9
|
+
:release_date: %RELEASE_DATE%
|
10
|
+
:changelog_url: %CHANGELOG_URL%
|
11
|
+
:include_path: ../../../../logstash/docs/include
|
12
|
+
///////////////////////////////////////////
|
13
|
+
END - GENERATED VARIABLES, DO NOT EDIT!
|
14
|
+
///////////////////////////////////////////
|
15
|
+
|
16
|
+
[id="plugins-{type}s-{plugin}"]
|
17
|
+
|
18
|
+
=== Elasticsearch output plugin
|
19
|
+
|
20
|
+
include::{include_path}/plugin_header.asciidoc[]
|
21
|
+
|
22
|
+
==== Description
|
23
|
+
|
24
|
+
.Compatibility Note
|
25
|
+
[NOTE]
|
26
|
+
================================================================================
|
27
|
+
Starting with Elasticsearch 5.3, there's an {ref}/modules-http.html[HTTP setting]
|
28
|
+
called `http.content_type.required`. If this option is set to `true`, and you
|
29
|
+
are using Logstash 2.4 through 5.2, you need to update the Elasticsearch output
|
30
|
+
plugin to version 6.2.5 or higher.
|
31
|
+
|
32
|
+
================================================================================
|
33
|
+
|
34
|
+
If you plan to use the Kibana web
|
35
|
+
interface, use the Elasticsearch output plugin to get your log data into
|
36
|
+
Elasticsearch.
|
37
|
+
|
38
|
+
TIP: You can run Elasticsearch on your own hardware, or use our
|
39
|
+
https://www.elastic.co/cloud/elasticsearch-service[hosted {es} Service] on
|
40
|
+
Elastic Cloud. The Elasticsearch Service is available on both AWS and GCP.
|
41
|
+
https://www.elastic.co/cloud/elasticsearch-service/signup[Try the {es} Service
|
42
|
+
for free].
|
43
|
+
|
44
|
+
This output only speaks the HTTP protocol. HTTP is the preferred protocol for interacting with Elasticsearch as of Logstash 2.0.
|
45
|
+
We strongly encourage the use of HTTP over the node protocol for a number of reasons. HTTP is only marginally slower,
|
46
|
+
yet far easier to administer and work with. When using the HTTP protocol one may upgrade Elasticsearch versions without having
|
47
|
+
to upgrade Logstash in lock-step.
|
48
|
+
|
49
|
+
You can learn more about Elasticsearch at <https://www.elastic.co/products/elasticsearch>
|
50
|
+
|
51
|
+
==== Template management for Elasticsearch 5.x
|
52
|
+
|
53
|
+
Index template for this version (Logstash 5.0) has been changed to reflect Elasticsearch's mapping changes in version 5.0.
|
54
|
+
Most importantly, the subfield for string multi-fields has changed from `.raw` to `.keyword` to match ES default
|
55
|
+
behavior.
|
56
|
+
|
57
|
+
**Users installing ES 5.x and LS 5.x**
|
58
|
+
|
59
|
+
This change will not affect you and you will continue to use the ES defaults.
|
60
|
+
|
61
|
+
**Users upgrading from LS 2.x to LS 5.x with ES 5.x**
|
62
|
+
|
63
|
+
LS will not force upgrade the template, if `logstash` template already exists. This means you will still use
|
64
|
+
`.raw` for sub-fields coming from 2.x. If you choose to use the new template, you will have to reindex your data after
|
65
|
+
the new template is installed.
|
66
|
+
|
67
|
+
==== Writing to different indices: best practices
|
68
|
+
|
69
|
+
[NOTE]
|
70
|
+
================================================================================
|
71
|
+
You cannot use dynamic variable substitution when `ilm_enabled` is `true` and
|
72
|
+
when using `ilm_rollover_pattern`.
|
73
|
+
|
74
|
+
================================================================================
|
75
|
+
|
76
|
+
If you're sending events to the same Elasticsearch cluster but you're targeting different indices you can:
|
77
|
+
|
78
|
+
* use different Elasticsearch outputs, each one with a different value for the `index` parameter
|
79
|
+
* use one Elasticsearch output and use the dynamic variable substitution for the `index` parameter
|
80
|
+
|
81
|
+
Each Elasticsearch output is a new client connected to the cluster:
|
82
|
+
|
83
|
+
* it has to initialize the client and connect to Elasticsearch (restart time is longer if you have more clients)
|
84
|
+
* it has an associated connection pool
|
85
|
+
|
86
|
+
In order to minimize the number of open connections to Elasticsearch, maximize the bulk size and reduce the number of "small" bulk requests (which could easily fill up the queue), it is usually more efficient to have a single Elasticsearch output.
|
87
|
+
|
88
|
+
Example:
|
89
|
+
[source,ruby]
|
90
|
+
output {
|
91
|
+
elasticsearch {
|
92
|
+
index => "%{[some_field][sub_field]}-%{+YYYY.MM.dd}"
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
**What to do in case there is no field in the event containing the destination index prefix?**
|
97
|
+
|
98
|
+
You can use the `mutate` filter and conditionals to add a `[@metadata]` field (see https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#metadata) to set
|
99
|
+
the destination index for each event. The `[@metadata]` fields will not be sent to Elasticsearch.
|
100
|
+
|
101
|
+
Example:
|
102
|
+
[source,ruby]
|
103
|
+
filter {
|
104
|
+
if [log_type] in [ "test", "staging" ] {
|
105
|
+
mutate { add_field => { "[@metadata][target_index]" => "test-%{+YYYY.MM}" } }
|
106
|
+
} else if [log_type] == "production" {
|
107
|
+
mutate { add_field => { "[@metadata][target_index]" => "prod-%{+YYYY.MM.dd}" } }
|
108
|
+
} else {
|
109
|
+
mutate { add_field => { "[@metadata][target_index]" => "unknown-%{+YYYY}" } }
|
110
|
+
}
|
111
|
+
}
|
112
|
+
output {
|
113
|
+
elasticsearch {
|
114
|
+
index => "%{[@metadata][target_index]}"
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
|
119
|
+
==== Retry Policy
|
120
|
+
|
121
|
+
The retry policy has changed significantly in the 8.1.1 release.
|
122
|
+
This plugin uses the Elasticsearch bulk API to optimize its imports into Elasticsearch. These requests may experience
|
123
|
+
either partial or total failures. The bulk API sends batches of requests to an HTTP endpoint. Error codes for the HTTP
|
124
|
+
request are handled differently than error codes for individual documents.
|
125
|
+
|
126
|
+
HTTP requests to the bulk API are expected to return a 200 response code. All other response codes are retried indefinitely.
|
127
|
+
|
128
|
+
The following document errors are handled as follows:
|
129
|
+
|
130
|
+
* 400 and 404 errors are sent to the dead letter queue (DLQ), if enabled. If a DLQ is not enabled, a log message will be emitted, and the event will be dropped. See <<plugins-{type}s-{plugin}-dlq-policy>> for more info.
|
131
|
+
* 409 errors (conflict) are logged as a warning and dropped.
|
132
|
+
|
133
|
+
Note that 409 exceptions are no longer retried. Please set a higher `retry_on_conflict` value if you experience 409 exceptions.
|
134
|
+
It is more performant for Elasticsearch to retry these exceptions than this plugin.
|
135
|
+
|
136
|
+
[id="plugins-{type}s-{plugin}-dlq-policy"]
|
137
|
+
==== DLQ Policy
|
138
|
+
|
139
|
+
Mapping (404) errors from Elasticsearch can lead to data loss. Unfortunately
|
140
|
+
mapping errors cannot be handled without human intervention and without looking
|
141
|
+
at the field that caused the mapping mismatch. If the DLQ is enabled, the
|
142
|
+
original events causing the mapping errors are stored in a file that can be
|
143
|
+
processed at a later time. Often times, the offending field can be removed and
|
144
|
+
re-indexed to Elasticsearch. If the DLQ is not enabled, and a mapping error
|
145
|
+
happens, the problem is logged as a warning, and the event is dropped. See
|
146
|
+
<<dead-letter-queues>> for more information about processing events in the DLQ.
|
147
|
+
|
148
|
+
[id="plugins-{type}s-{plugin}-ilm"]
|
149
|
+
==== Index Lifecycle Management
|
150
|
+
|
151
|
+
|
152
|
+
[NOTE]
|
153
|
+
The Index Lifecycle Management feature requires plugin version `9.3.1` or higher.
|
154
|
+
|
155
|
+
[NOTE]
|
156
|
+
This feature requires an Elasticsearch instance of 6.6.0 or higher with at least a Basic license
|
157
|
+
|
158
|
+
Logstash can use {ref}/index-lifecycle-management.html[Index Lifecycle Management] to automate the management of indices over time.
|
159
|
+
|
160
|
+
The use of Index Lifecycle Management is controlled by the `ilm_enabled`
|
161
|
+
setting. By default, this setting detects whether the Elasticsearch instance
|
162
|
+
supports ILM, and uses it if it is available. `ilm_enabled` can also be set to
|
163
|
+
`true` or `false` to override the automatic detection, or disable ILM.
|
164
|
+
|
165
|
+
This will overwrite the index settings and adjust the Logstash template to write the necessary settings for the template
|
166
|
+
to support index lifecycle management, including the index policy and rollover alias to be used.
|
167
|
+
|
168
|
+
Logstash will create a rollover alias for the indices to be written to, including a pattern for how the actual indices will be named, and unless an ILM policy that already exists has been specified,
|
169
|
+
a default policy will also be created. The default policy is configured to rollover an index when it reaches either 50 gigabytes in size, or is 30 days old, whichever happens first.
|
170
|
+
|
171
|
+
The default rollover alias is called `logstash`, with a default pattern for the rollover index of `{now/d}-00001`,
|
172
|
+
which will name indices on the date that the index is rolled over, followed by an incrementing number. Note that the pattern must end with a dash and a number that will be incremented.
|
173
|
+
|
174
|
+
See the {ref}/indices-rollover-index.html#_using_date_math_with_the_rollover_api[Rollover API documentation] for more details on naming.
|
175
|
+
|
176
|
+
The rollover alias, ilm pattern and policy can be modified.
|
177
|
+
|
178
|
+
See config below for an example:
|
179
|
+
[source,ruby]
|
180
|
+
output {
|
181
|
+
elasticsearch {
|
182
|
+
ilm_rollover_alias => "custom"
|
183
|
+
ilm_pattern => "000001"
|
184
|
+
ilm_policy => "custom_policy"
|
185
|
+
}
|
186
|
+
}
|
187
|
+
|
188
|
+
NOTE: Custom ILM policies must already exist on the Elasticsearch cluster before they can be used.
|
189
|
+
|
190
|
+
NOTE: If the rollover alias or pattern is modified, the index template will need to be overwritten as the settings `index.lifecycle.name` and `index.lifecycle.rollover_alias` are automatically written to the template
|
191
|
+
|
192
|
+
NOTE: If the index property is supplied in the output definition, it will be overwritten by the rollover alias.
|
193
|
+
|
194
|
+
|
195
|
+
==== Batch Sizes
|
196
|
+
|
197
|
+
This plugin attempts to send batches of events as a single request. However, if
|
198
|
+
a request exceeds 20MB we will break it up into multiple batch requests. If a single document exceeds 20MB it will be sent as a single request.
|
199
|
+
|
200
|
+
==== DNS Caching
|
201
|
+
|
202
|
+
This plugin uses the JVM to lookup DNS entries and is subject to the value of https://docs.oracle.com/javase/7/docs/technotes/guides/net/properties.html[networkaddress.cache.ttl],
|
203
|
+
a global setting for the JVM.
|
204
|
+
|
205
|
+
As an example, to set your DNS TTL to 1 second you would set
|
206
|
+
the `LS_JAVA_OPTS` environment variable to `-Dnetworkaddress.cache.ttl=1`.
|
207
|
+
|
208
|
+
Keep in mind that a connection with keepalive enabled will
|
209
|
+
not reevaluate its DNS value while the keepalive is in effect.
|
210
|
+
|
211
|
+
==== HTTP Compression
|
212
|
+
|
213
|
+
This plugin supports request and response compression. Response compression is enabled by default and
|
214
|
+
for Elasticsearch versions 5.0 and later, the user doesn't have to set any configs in Elasticsearch for
|
215
|
+
it to send back compressed response. For versions before 5.0, `http.compression` must be set to `true` https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html#modules-http[in
|
216
|
+
Elasticsearch] to take advantage of response compression when using this plugin
|
217
|
+
|
218
|
+
For requests compression, regardless of the Elasticsearch version, users have to enable `http_compression`
|
219
|
+
setting in their Logstash config file.
|
220
|
+
|
221
|
+
|
222
|
+
[id="plugins-{type}s-{plugin}-options"]
|
223
|
+
==== Elasticsearch Output Configuration Options
|
224
|
+
|
225
|
+
This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
|
226
|
+
|
227
|
+
[cols="<,<,<",options="header",]
|
228
|
+
|=======================================================================
|
229
|
+
|Setting |Input type|Required
|
230
|
+
| <<plugins-{type}s-{plugin}-action>> |<<string,string>>|No
|
231
|
+
| <<plugins-{type}s-{plugin}-bulk_path>> |<<string,string>>|No
|
232
|
+
| <<plugins-{type}s-{plugin}-cacert>> |a valid filesystem path|No
|
233
|
+
| <<plugins-{type}s-{plugin}-cloud_auth>> |<<password,password>>|No
|
234
|
+
| <<plugins-{type}s-{plugin}-cloud_id>> |<<string,string>>|No
|
235
|
+
| <<plugins-{type}s-{plugin}-custom_headers>> |<<hash,hash>>|No
|
236
|
+
| <<plugins-{type}s-{plugin}-doc_as_upsert>> |<<boolean,boolean>>|No
|
237
|
+
| <<plugins-{type}s-{plugin}-document_id>> |<<string,string>>|No
|
238
|
+
| <<plugins-{type}s-{plugin}-document_type>> |<<string,string>>|No
|
239
|
+
| <<plugins-{type}s-{plugin}-failure_type_logging_whitelist>> |<<array,array>>|No
|
240
|
+
| <<plugins-{type}s-{plugin}-healthcheck_path>> |<<string,string>>|No
|
241
|
+
| <<plugins-{type}s-{plugin}-hosts>> |<<uri,uri>>|No
|
242
|
+
| <<plugins-{type}s-{plugin}-http_compression>> |<<boolean,boolean>>|No
|
243
|
+
| <<plugins-{type}s-{plugin}-ilm_enabled>> |<<string,string>>, one of `["true", "false", "auto"]`|No
|
244
|
+
| <<plugins-{type}s-{plugin}-ilm_pattern>> |<<string,string>>|No
|
245
|
+
| <<plugins-{type}s-{plugin}-ilm_policy>> |<<string,string>>|No
|
246
|
+
| <<plugins-{type}s-{plugin}-ilm_rollover_alias>> |<<string,string>>|No
|
247
|
+
| <<plugins-{type}s-{plugin}-index>> |<<string,string>>|No
|
248
|
+
| <<plugins-{type}s-{plugin}-keystore>> |a valid filesystem path|No
|
249
|
+
| <<plugins-{type}s-{plugin}-keystore_password>> |<<password,password>>|No
|
250
|
+
| <<plugins-{type}s-{plugin}-manage_template>> |<<boolean,boolean>>|No
|
251
|
+
| <<plugins-{type}s-{plugin}-parameters>> |<<hash,hash>>|No
|
252
|
+
| <<plugins-{type}s-{plugin}-parent>> |<<string,string>>|No
|
253
|
+
| <<plugins-{type}s-{plugin}-password>> |<<password,password>>|No
|
254
|
+
| <<plugins-{type}s-{plugin}-path>> |<<string,string>>|No
|
255
|
+
| <<plugins-{type}s-{plugin}-pipeline>> |<<string,string>>|No
|
256
|
+
| <<plugins-{type}s-{plugin}-pool_max>> |<<number,number>>|No
|
257
|
+
| <<plugins-{type}s-{plugin}-pool_max_per_route>> |<<number,number>>|No
|
258
|
+
| <<plugins-{type}s-{plugin}-proxy>> |<<uri,uri>>|No
|
259
|
+
| <<plugins-{type}s-{plugin}-resurrect_delay>> |<<number,number>>|No
|
260
|
+
| <<plugins-{type}s-{plugin}-retry_initial_interval>> |<<number,number>>|No
|
261
|
+
| <<plugins-{type}s-{plugin}-retry_max_interval>> |<<number,number>>|No
|
262
|
+
| <<plugins-{type}s-{plugin}-retry_on_conflict>> |<<number,number>>|No
|
263
|
+
| <<plugins-{type}s-{plugin}-routing>> |<<string,string>>|No
|
264
|
+
| <<plugins-{type}s-{plugin}-script>> |<<string,string>>|No
|
265
|
+
| <<plugins-{type}s-{plugin}-script_lang>> |<<string,string>>|No
|
266
|
+
| <<plugins-{type}s-{plugin}-script_type>> |<<string,string>>, one of `["inline", "indexed", "file"]`|No
|
267
|
+
| <<plugins-{type}s-{plugin}-script_var_name>> |<<string,string>>|No
|
268
|
+
| <<plugins-{type}s-{plugin}-scripted_upsert>> |<<boolean,boolean>>|No
|
269
|
+
| <<plugins-{type}s-{plugin}-sniffing>> |<<boolean,boolean>>|No
|
270
|
+
| <<plugins-{type}s-{plugin}-sniffing_delay>> |<<number,number>>|No
|
271
|
+
| <<plugins-{type}s-{plugin}-sniffing_path>> |<<string,string>>|No
|
272
|
+
| <<plugins-{type}s-{plugin}-ssl>> |<<boolean,boolean>>|No
|
273
|
+
| <<plugins-{type}s-{plugin}-ssl_certificate_verification>> |<<boolean,boolean>>|No
|
274
|
+
| <<plugins-{type}s-{plugin}-template>> |a valid filesystem path|No
|
275
|
+
| <<plugins-{type}s-{plugin}-template_name>> |<<string,string>>|No
|
276
|
+
| <<plugins-{type}s-{plugin}-template_overwrite>> |<<boolean,boolean>>|No
|
277
|
+
| <<plugins-{type}s-{plugin}-timeout>> |<<number,number>>|No
|
278
|
+
| <<plugins-{type}s-{plugin}-truststore>> |a valid filesystem path|No
|
279
|
+
| <<plugins-{type}s-{plugin}-truststore_password>> |<<password,password>>|No
|
280
|
+
| <<plugins-{type}s-{plugin}-upsert>> |<<string,string>>|No
|
281
|
+
| <<plugins-{type}s-{plugin}-user>> |<<string,string>>|No
|
282
|
+
| <<plugins-{type}s-{plugin}-validate_after_inactivity>> |<<number,number>>|No
|
283
|
+
| <<plugins-{type}s-{plugin}-version>> |<<string,string>>|No
|
284
|
+
| <<plugins-{type}s-{plugin}-version_type>> |<<string,string>>, one of `["internal", "external", "external_gt", "external_gte", "force"]`|No
|
285
|
+
|=======================================================================
|
286
|
+
|
287
|
+
Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
|
288
|
+
output plugins.
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
[id="plugins-{type}s-{plugin}-action"]
|
293
|
+
===== `action`
|
294
|
+
|
295
|
+
* Value type is <<string,string>>
|
296
|
+
* Default value is `"index"`
|
297
|
+
|
298
|
+
Protocol agnostic (i.e. non-http, non-java specific) configs go here
|
299
|
+
Protocol agnostic methods
|
300
|
+
The Elasticsearch action to perform. Valid actions are:
|
301
|
+
|
302
|
+
- index: indexes a document (an event from Logstash).
|
303
|
+
- delete: deletes a document by id (An id is required for this action)
|
304
|
+
- create: indexes a document, fails if a document by that id already exists in the index.
|
305
|
+
- update: updates a document by id. Update has a special case where you can upsert -- update a
|
306
|
+
document if not already present. See the `doc_as_upsert` option. NOTE: This does not work and is not supported
|
307
|
+
in Elasticsearch 1.x. Please upgrade to ES 2.x or greater to use this feature with Logstash!
|
308
|
+
- A sprintf style string to change the action based on the content of the event. The value `%{[foo]}`
|
309
|
+
would use the foo field for the action
|
310
|
+
|
311
|
+
For more details on actions, check out the http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html[Elasticsearch bulk API documentation]
|
312
|
+
|
313
|
+
[id="plugins-{type}s-{plugin}-bulk_path"]
|
314
|
+
===== `bulk_path`
|
315
|
+
|
316
|
+
* Value type is <<string,string>>
|
317
|
+
* There is no default value for this setting.
|
318
|
+
|
319
|
+
HTTP Path to perform the _bulk requests to
|
320
|
+
this defaults to a concatenation of the path parameter and "_bulk"
|
321
|
+
|
322
|
+
[id="plugins-{type}s-{plugin}-cacert"]
|
323
|
+
===== `cacert`
|
324
|
+
|
325
|
+
* Value type is <<path,path>>
|
326
|
+
* There is no default value for this setting.
|
327
|
+
|
328
|
+
The .cer or .pem file to validate the server's certificate
|
329
|
+
|
330
|
+
[id="plugins-{type}s-{plugin}-cloud_auth"]
|
331
|
+
===== `cloud_auth`
|
332
|
+
|
333
|
+
* Value type is <<password,password>>
|
334
|
+
* There is no default value for this setting.
|
335
|
+
|
336
|
+
Cloud authentication string ("<username>:<password>" format) is an alternative for the `user`/`password` pair.
|
337
|
+
|
338
|
+
For mode details, check out the https://www.elastic.co/guide/en/logstash/current/connecting-to-cloud.html#_cloud_auth[cloud documentation]
|
339
|
+
|
340
|
+
[id="plugins-{type}s-{plugin}-cloud_id"]
|
341
|
+
===== `cloud_id`
|
342
|
+
|
343
|
+
* Value type is <<string,string>>
|
344
|
+
* There is no default value for this setting.
|
345
|
+
|
346
|
+
Cloud ID, from the Elastic Cloud web console. If set `hosts` should not be used.
|
347
|
+
|
348
|
+
For mode details, check out the https://www.elastic.co/guide/en/logstash/current/connecting-to-cloud.html#_cloud_id[cloud documentation]
|
349
|
+
|
350
|
+
[id="plugins-{type}s-{plugin}-doc_as_upsert"]
|
351
|
+
===== `doc_as_upsert`
|
352
|
+
|
353
|
+
* Value type is <<boolean,boolean>>
|
354
|
+
* Default value is `false`
|
355
|
+
|
356
|
+
Enable `doc_as_upsert` for update mode.
|
357
|
+
Create a new document with source if `document_id` doesn't exist in Elasticsearch
|
358
|
+
|
359
|
+
[id="plugins-{type}s-{plugin}-document_id"]
|
360
|
+
===== `document_id`
|
361
|
+
|
362
|
+
* Value type is <<string,string>>
|
363
|
+
* There is no default value for this setting.
|
364
|
+
|
365
|
+
The document ID for the index. Useful for overwriting existing entries in Elasticsearch with the same ID.
|
366
|
+
|
367
|
+
[id="plugins-{type}s-{plugin}-document_type"]
|
368
|
+
===== `document_type`
|
369
|
+
|
370
|
+
* Value type is <<string,string>>
|
371
|
+
* There is no default value for this setting.
|
372
|
+
* This option is deprecated
|
373
|
+
|
374
|
+
NOTE: This option is deprecated due to the https://www.elastic.co/guide/en/elasticsearch/reference/6.0/removal-of-types.html[removal of types in Elasticsearch 6.0].
|
375
|
+
It will be removed in the next major version of Logstash.
|
376
|
+
|
377
|
+
NOTE: This value is ignored and has no effect for Elasticsearch clusters `8.x`.
|
378
|
+
|
379
|
+
This sets the document type to write events to. Generally you should try to write only
|
380
|
+
similar events to the same 'type'. String expansion `%{foo}` works here.
|
381
|
+
If you don't set a value for this option:
|
382
|
+
|
383
|
+
- for elasticsearch clusters 8.x: no value will be used;
|
384
|
+
- for elasticsearch clusters 7.x: the value of '_doc' will be used;
|
385
|
+
- for elasticsearch clusters 6.x: the value of 'doc' will be used;
|
386
|
+
- 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.
|
387
|
+
|
388
|
+
[id="plugins-{type}s-{plugin}-failure_type_logging_whitelist"]
|
389
|
+
===== `failure_type_logging_whitelist`
|
390
|
+
|
391
|
+
* Value type is <<array,array>>
|
392
|
+
* Default value is `[]`
|
393
|
+
|
394
|
+
Set the Elasticsearch errors in the whitelist that you don't want to log.
|
395
|
+
A useful example is when you want to skip all 409 errors
|
396
|
+
which are `document_already_exists_exception`.
|
397
|
+
|
398
|
+
[id="plugins-{type}s-{plugin}-custom_headers"]
|
399
|
+
===== `custom_headers`
|
400
|
+
|
401
|
+
* Value type is <<hash,hash>>
|
402
|
+
* There is no default value for this setting.
|
403
|
+
|
404
|
+
Pass a set of key value pairs as the headers sent in each request to
|
405
|
+
an elasticsearch node. The headers will be used for any kind of request
|
406
|
+
(_bulk request, template installation, health checks and sniffing).
|
407
|
+
These custom headers will be overidden by settings like `http_compression`.
|
408
|
+
|
409
|
+
[id="plugins-{type}s-{plugin}-healthcheck_path"]
|
410
|
+
===== `healthcheck_path`
|
411
|
+
|
412
|
+
* Value type is <<string,string>>
|
413
|
+
* There is no default value for this setting.
|
414
|
+
|
415
|
+
HTTP Path where a HEAD request is sent when a backend is marked down
|
416
|
+
the request is sent in the background to see if it has come back again
|
417
|
+
before it is once again eligible to service requests.
|
418
|
+
If you have custom firewall rules you may need to change this
|
419
|
+
|
420
|
+
[id="plugins-{type}s-{plugin}-hosts"]
|
421
|
+
===== `hosts`
|
422
|
+
|
423
|
+
* Value type is <<uri,uri>>
|
424
|
+
* Default value is `[//127.0.0.1]`
|
425
|
+
|
426
|
+
Sets the host(s) of the remote instance. If given an array it will load balance requests across the hosts specified in the `hosts` parameter.
|
427
|
+
Remember the `http` protocol uses the http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html#modules-http[http] address (eg. 9200, not 9300).
|
428
|
+
`"127.0.0.1"`
|
429
|
+
`["127.0.0.1:9200","127.0.0.2:9200"]`
|
430
|
+
`["http://127.0.0.1"]`
|
431
|
+
`["https://127.0.0.1:9200"]`
|
432
|
+
`["https://127.0.0.1:9200/mypath"]` (If using a proxy on a subpath)
|
433
|
+
It is important to exclude http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html[dedicated master nodes] from the `hosts` list
|
434
|
+
to prevent LS from sending bulk requests to the master nodes. So this parameter should only reference either data or client nodes in Elasticsearch.
|
435
|
+
|
436
|
+
Any special characters present in the URLs here MUST be URL escaped! This means `#` should be put in as `%23` for instance.
|
437
|
+
|
438
|
+
[id="plugins-{type}s-{plugin}-http_compression"]
|
439
|
+
===== `http_compression`
|
440
|
+
|
441
|
+
* Value type is <<boolean,boolean>>
|
442
|
+
* Default value is `false`
|
443
|
+
|
444
|
+
Enable gzip compression on requests. Note that response compression is on by default for Elasticsearch v5.0 and beyond
|
445
|
+
|
446
|
+
[id="plugins-{type}s-{plugin}-ilm_enabled"]
|
447
|
+
===== `ilm_enabled`
|
448
|
+
|
449
|
+
* Value can be any of: `true`, `false`, `auto`
|
450
|
+
* Default value is `auto`
|
451
|
+
|
452
|
+
The default setting of `auto` will automatically enable the Index Lifecycle Management feature, if the Elasticsearch
|
453
|
+
cluster is running Elasticsearch version `7.0.0` or higher with the ILM feature enabled, and disable it otherwise.
|
454
|
+
|
455
|
+
Setting this flag to `false` will disable the Index Lifecycle Management feature, even if the Elasticsearch cluster supports ILM.
|
456
|
+
Setting this flag to `true` will enable Index Lifecycle Management feature, if the Elasticsearch cluster supports it. This is required
|
457
|
+
to enable Index Lifecycle Management on a version of Elasticsearch earlier than version `7.0.0`.
|
458
|
+
|
459
|
+
NOTE: This feature requires a Basic License or above to be installed on an Elasticsearch cluster version 6.6.0 or later
|
460
|
+
|
461
|
+
[id="plugins-{type}s-{plugin}-ilm_pattern"]
|
462
|
+
===== `ilm_pattern`
|
463
|
+
|
464
|
+
* Value type is <<string,string>>
|
465
|
+
* Default value is `{now/d}-000001`
|
466
|
+
|
467
|
+
Pattern used for generating indices managed by Index Lifecycle Management. The value specified in the pattern will be appended to
|
468
|
+
the write alias, and incremented automatically when a new index is created by ILM.
|
469
|
+
|
470
|
+
Date Math can be used when specifying an ilm pattern, see {ref}/indices-rollover-index.html#_using_date_math_with_the_rollover_api[Rollover API docs] for details
|
471
|
+
|
472
|
+
NOTE: Updating the pattern will require the index template to be rewritten
|
473
|
+
|
474
|
+
NOTE: The pattern must finish with a dash and a number that will be automatically incremented when indices rollover.
|
475
|
+
|
476
|
+
[id="plugins-{type}s-{plugin}-ilm_policy"]
|
477
|
+
===== `ilm_policy`
|
478
|
+
|
479
|
+
* Value type is <<string,string>>
|
480
|
+
* Default value is `logstash`
|
481
|
+
|
482
|
+
Modify this setting to use a custom Index Lifecycle Management policy, rather than the default. If this value is not set, the default policy will
|
483
|
+
be automatically installed into Elasticsearch
|
484
|
+
|
485
|
+
NOTE: If this setting is specified, the policy must already exist in Elasticsearch cluster.
|
486
|
+
|
487
|
+
[id="plugins-{type}s-{plugin}-ilm_rollover_alias"]
|
488
|
+
===== `ilm_rollover_alias`
|
489
|
+
|
490
|
+
* Value type is <<string,string>>
|
491
|
+
* Default value is `logstash`
|
492
|
+
|
493
|
+
The rollover alias is the alias where indices managed using Index Lifecycle Management will be written to.
|
494
|
+
|
495
|
+
NOTE: If both `index` and `ilm_rollover_alias` are specified, `ilm_rollover_alias` takes precedence.
|
496
|
+
|
497
|
+
NOTE: Updating the rollover alias will require the index template to be rewritten
|
498
|
+
|
499
|
+
NOTE: `ilm_rollover_alias` does NOT support dynamic variable substitution as `index` does.
|
500
|
+
|
501
|
+
[id="plugins-{type}s-{plugin}-index"]
|
502
|
+
===== `index`
|
503
|
+
|
504
|
+
* Value type is <<string,string>>
|
505
|
+
* Default value is `"logstash-%{+YYYY.MM.dd}"`
|
506
|
+
|
507
|
+
The index to write events to. This can be dynamic using the `%{foo}` syntax.
|
508
|
+
The default value will partition your indices by day so you can more easily
|
509
|
+
delete old data or only search specific date ranges.
|
510
|
+
Indexes may not contain uppercase characters.
|
511
|
+
For weekly indexes ISO 8601 format is recommended, eg. logstash-%{+xxxx.ww}.
|
512
|
+
LS uses Joda to format the index pattern from event timestamp.
|
513
|
+
Joda formats are defined http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html[here].
|
514
|
+
|
515
|
+
[id="plugins-{type}s-{plugin}-keystore"]
|
516
|
+
===== `keystore`
|
517
|
+
|
518
|
+
* Value type is <<path,path>>
|
519
|
+
* There is no default value for this setting.
|
520
|
+
|
521
|
+
The keystore used to present a certificate to the server.
|
522
|
+
It can be either .jks or .p12
|
523
|
+
|
524
|
+
[id="plugins-{type}s-{plugin}-keystore_password"]
|
525
|
+
===== `keystore_password`
|
526
|
+
|
527
|
+
* Value type is <<password,password>>
|
528
|
+
* There is no default value for this setting.
|
529
|
+
|
530
|
+
Set the keystore password
|
531
|
+
|
532
|
+
[id="plugins-{type}s-{plugin}-manage_template"]
|
533
|
+
===== `manage_template`
|
534
|
+
|
535
|
+
* Value type is <<boolean,boolean>>
|
536
|
+
* Default value is `true`
|
537
|
+
|
538
|
+
From Logstash 1.3 onwards, a template is applied to Elasticsearch during
|
539
|
+
Logstash's startup if one with the name `template_name` does not already exist.
|
540
|
+
By default, the contents of this template is the default template for
|
541
|
+
`logstash-%{+YYYY.MM.dd}` which always matches indices based on the pattern
|
542
|
+
`logstash-*`. Should you require support for other index names, or would like
|
543
|
+
to change the mappings in the template in general, a custom template can be
|
544
|
+
specified by setting `template` to the path of a template file.
|
545
|
+
|
546
|
+
Setting `manage_template` to false disables this feature. If you require more
|
547
|
+
control over template creation, (e.g. creating indices dynamically based on
|
548
|
+
field names) you should set `manage_template` to false and use the REST
|
549
|
+
API to apply your templates manually.
|
550
|
+
|
551
|
+
[id="plugins-{type}s-{plugin}-parameters"]
|
552
|
+
===== `parameters`
|
553
|
+
|
554
|
+
* Value type is <<hash,hash>>
|
555
|
+
* There is no default value for this setting.
|
556
|
+
|
557
|
+
Pass a set of key value pairs as the URL query string. This query string is added
|
558
|
+
to every host listed in the 'hosts' configuration. If the 'hosts' list contains
|
559
|
+
urls that already have query strings, the one specified here will be appended.
|
560
|
+
|
561
|
+
[id="plugins-{type}s-{plugin}-parent"]
|
562
|
+
===== `parent`
|
563
|
+
|
564
|
+
* Value type is <<string,string>>
|
565
|
+
* Default value is `nil`
|
566
|
+
|
567
|
+
For child documents, ID of the associated parent.
|
568
|
+
This can be dynamic using the `%{foo}` syntax.
|
569
|
+
|
570
|
+
[id="plugins-{type}s-{plugin}-password"]
|
571
|
+
===== `password`
|
572
|
+
|
573
|
+
* Value type is <<password,password>>
|
574
|
+
* There is no default value for this setting.
|
575
|
+
|
576
|
+
Password to authenticate to a secure Elasticsearch cluster
|
577
|
+
|
578
|
+
[id="plugins-{type}s-{plugin}-path"]
|
579
|
+
===== `path`
|
580
|
+
|
581
|
+
* Value type is <<string,string>>
|
582
|
+
* There is no default value for this setting.
|
583
|
+
|
584
|
+
HTTP Path at which the Elasticsearch server lives. Use this if you must run Elasticsearch behind a proxy that remaps
|
585
|
+
the root path for the Elasticsearch HTTP API lives.
|
586
|
+
Note that if you use paths as components of URLs in the 'hosts' field you may
|
587
|
+
not also set this field. That will raise an error at startup
|
588
|
+
|
589
|
+
[id="plugins-{type}s-{plugin}-pipeline"]
|
590
|
+
===== `pipeline`
|
591
|
+
|
592
|
+
* Value type is <<string,string>>
|
593
|
+
* Default value is `nil`
|
594
|
+
|
595
|
+
Set which ingest pipeline you wish to execute for an event. You can also use event dependent configuration
|
596
|
+
here like `pipeline => "%{INGEST_PIPELINE}"`
|
597
|
+
|
598
|
+
[id="plugins-{type}s-{plugin}-pool_max"]
|
599
|
+
===== `pool_max`
|
600
|
+
|
601
|
+
* Value type is <<number,number>>
|
602
|
+
* Default value is `1000`
|
603
|
+
|
604
|
+
While the output tries to reuse connections efficiently we have a maximum.
|
605
|
+
This sets the maximum number of open connections the output will create.
|
606
|
+
Setting this too low may mean frequently closing / opening connections
|
607
|
+
which is bad.
|
608
|
+
|
609
|
+
[id="plugins-{type}s-{plugin}-pool_max_per_route"]
|
610
|
+
===== `pool_max_per_route`
|
611
|
+
|
612
|
+
* Value type is <<number,number>>
|
613
|
+
* Default value is `100`
|
614
|
+
|
615
|
+
While the output tries to reuse connections efficiently we have a maximum per endpoint.
|
616
|
+
This sets the maximum number of open connections per endpoint the output will create.
|
617
|
+
Setting this too low may mean frequently closing / opening connections
|
618
|
+
which is bad.
|
619
|
+
|
620
|
+
[id="plugins-{type}s-{plugin}-proxy"]
|
621
|
+
===== `proxy`
|
622
|
+
|
623
|
+
* Value type is <<uri,uri>>
|
624
|
+
* There is no default value for this setting.
|
625
|
+
|
626
|
+
Set the address of a forward HTTP proxy.
|
627
|
+
This used to accept hashes as arguments but now only accepts
|
628
|
+
arguments of the URI type to prevent leaking credentials.
|
629
|
+
|
630
|
+
[id="plugins-{type}s-{plugin}-resurrect_delay"]
|
631
|
+
===== `resurrect_delay`
|
632
|
+
|
633
|
+
* Value type is <<number,number>>
|
634
|
+
* Default value is `5`
|
635
|
+
|
636
|
+
How frequently, in seconds, to wait between resurrection attempts.
|
637
|
+
Resurrection is the process by which backend endpoints marked 'down' are checked
|
638
|
+
to see if they have come back to life
|
639
|
+
|
640
|
+
[id="plugins-{type}s-{plugin}-retry_initial_interval"]
|
641
|
+
===== `retry_initial_interval`
|
642
|
+
|
643
|
+
* Value type is <<number,number>>
|
644
|
+
* Default value is `2`
|
645
|
+
|
646
|
+
Set initial interval in seconds between bulk retries. Doubled on each retry up to `retry_max_interval`
|
647
|
+
|
648
|
+
[id="plugins-{type}s-{plugin}-retry_max_interval"]
|
649
|
+
===== `retry_max_interval`
|
650
|
+
|
651
|
+
* Value type is <<number,number>>
|
652
|
+
* Default value is `64`
|
653
|
+
|
654
|
+
Set max interval in seconds between bulk retries.
|
655
|
+
|
656
|
+
[id="plugins-{type}s-{plugin}-retry_on_conflict"]
|
657
|
+
===== `retry_on_conflict`
|
658
|
+
|
659
|
+
* Value type is <<number,number>>
|
660
|
+
* Default value is `1`
|
661
|
+
|
662
|
+
The number of times Elasticsearch should internally retry an update/upserted document
|
663
|
+
See the https://www.elastic.co/guide/en/elasticsearch/guide/current/partial-updates.html[partial updates]
|
664
|
+
for more info
|
665
|
+
|
666
|
+
[id="plugins-{type}s-{plugin}-routing"]
|
667
|
+
===== `routing`
|
668
|
+
|
669
|
+
* Value type is <<string,string>>
|
670
|
+
* There is no default value for this setting.
|
671
|
+
|
672
|
+
A routing override to be applied to all processed events.
|
673
|
+
This can be dynamic using the `%{foo}` syntax.
|
674
|
+
|
675
|
+
[id="plugins-{type}s-{plugin}-script"]
|
676
|
+
===== `script`
|
677
|
+
|
678
|
+
* Value type is <<string,string>>
|
679
|
+
* Default value is `""`
|
680
|
+
|
681
|
+
Set script name for scripted update mode
|
682
|
+
|
683
|
+
Example:
|
684
|
+
[source,ruby]
|
685
|
+
output {
|
686
|
+
elasticsearch {
|
687
|
+
script => "ctx._source.message = params.event.get('message')"
|
688
|
+
}
|
689
|
+
}
|
690
|
+
|
691
|
+
[id="plugins-{type}s-{plugin}-script_lang"]
|
692
|
+
===== `script_lang`
|
693
|
+
|
694
|
+
* Value type is <<string,string>>
|
695
|
+
* Default value is `"painless"`
|
696
|
+
|
697
|
+
Set the language of the used script. If not set, this defaults to painless in ES 5.0.
|
698
|
+
When using indexed (stored) scripts on Elasticsearch 6 and higher, you must set this parameter to `""` (empty string).
|
699
|
+
|
700
|
+
[id="plugins-{type}s-{plugin}-script_type"]
|
701
|
+
===== `script_type`
|
702
|
+
|
703
|
+
* Value can be any of: `inline`, `indexed`, `file`
|
704
|
+
* Default value is `["inline"]`
|
705
|
+
|
706
|
+
Define the type of script referenced by "script" variable
|
707
|
+
inline : "script" contains inline script
|
708
|
+
indexed : "script" contains the name of script directly indexed in elasticsearch
|
709
|
+
file : "script" contains the name of script stored in elasticsearch's config directory
|
710
|
+
|
711
|
+
[id="plugins-{type}s-{plugin}-script_var_name"]
|
712
|
+
===== `script_var_name`
|
713
|
+
|
714
|
+
* Value type is <<string,string>>
|
715
|
+
* Default value is `"event"`
|
716
|
+
|
717
|
+
Set variable name passed to script (scripted update)
|
718
|
+
|
719
|
+
[id="plugins-{type}s-{plugin}-scripted_upsert"]
|
720
|
+
===== `scripted_upsert`
|
721
|
+
|
722
|
+
* Value type is <<boolean,boolean>>
|
723
|
+
* Default value is `false`
|
724
|
+
|
725
|
+
if enabled, script is in charge of creating non-existent document (scripted update)
|
726
|
+
|
727
|
+
[id="plugins-{type}s-{plugin}-sniffing"]
|
728
|
+
===== `sniffing`
|
729
|
+
|
730
|
+
* Value type is <<boolean,boolean>>
|
731
|
+
* Default value is `false`
|
732
|
+
|
733
|
+
This setting asks Elasticsearch for the list of all cluster nodes and adds them to the hosts list.
|
734
|
+
For Elasticsearch 1.x and 2.x any nodes with `http.enabled` (on by default) will be added to the hosts list, including master-only nodes!
|
735
|
+
For Elasticsearch 5.x and 6.x any nodes with `http.enabled` (on by default) will be added to the hosts list, excluding master-only nodes.
|
736
|
+
|
737
|
+
[id="plugins-{type}s-{plugin}-sniffing_delay"]
|
738
|
+
===== `sniffing_delay`
|
739
|
+
|
740
|
+
* Value type is <<number,number>>
|
741
|
+
* Default value is `5`
|
742
|
+
|
743
|
+
How long to wait, in seconds, between sniffing attempts
|
744
|
+
|
745
|
+
[id="plugins-{type}s-{plugin}-sniffing_path"]
|
746
|
+
===== `sniffing_path`
|
747
|
+
|
748
|
+
* Value type is <<string,string>>
|
749
|
+
* There is no default value for this setting.
|
750
|
+
|
751
|
+
HTTP Path to be used for the sniffing requests
|
752
|
+
the default value is computed by concatenating the path value and "_nodes/http"
|
753
|
+
if sniffing_path is set it will be used as an absolute path
|
754
|
+
do not use full URL here, only paths, e.g. "/sniff/_nodes/http"
|
755
|
+
|
756
|
+
[id="plugins-{type}s-{plugin}-ssl"]
|
757
|
+
===== `ssl`
|
758
|
+
|
759
|
+
* Value type is <<boolean,boolean>>
|
760
|
+
* There is no default value for this setting.
|
761
|
+
|
762
|
+
Enable SSL/TLS secured communication to Elasticsearch cluster. Leaving this unspecified will use whatever scheme
|
763
|
+
is specified in the URLs listed in 'hosts'. If no explicit protocol is specified plain HTTP will be used.
|
764
|
+
If SSL is explicitly disabled here the plugin will refuse to start if an HTTPS URL is given in 'hosts'
|
765
|
+
|
766
|
+
[id="plugins-{type}s-{plugin}-ssl_certificate_verification"]
|
767
|
+
===== `ssl_certificate_verification`
|
768
|
+
|
769
|
+
* Value type is <<boolean,boolean>>
|
770
|
+
* Default value is `true`
|
771
|
+
|
772
|
+
Option to validate the server's certificate. Disabling this severely compromises security.
|
773
|
+
For more information on disabling certificate verification please read
|
774
|
+
https://www.cs.utexas.edu/~shmat/shmat_ccs12.pdf
|
775
|
+
|
776
|
+
[id="plugins-{type}s-{plugin}-template"]
|
777
|
+
===== `template`
|
778
|
+
|
779
|
+
* Value type is <<path,path>>
|
780
|
+
* There is no default value for this setting.
|
781
|
+
|
782
|
+
You can set the path to your own template here, if you so desire.
|
783
|
+
If not set, the included template will be used.
|
784
|
+
|
785
|
+
[id="plugins-{type}s-{plugin}-template_name"]
|
786
|
+
===== `template_name`
|
787
|
+
|
788
|
+
* Value type is <<string,string>>
|
789
|
+
* Default value is `"logstash"`
|
790
|
+
|
791
|
+
This configuration option defines how the template is named inside Elasticsearch.
|
792
|
+
Note that if you have used the template management features and subsequently
|
793
|
+
change this, you will need to prune the old template manually, e.g.
|
794
|
+
|
795
|
+
`curl -XDELETE <http://localhost:9200/_template/OldTemplateName?pretty>`
|
796
|
+
|
797
|
+
where `OldTemplateName` is whatever the former setting was.
|
798
|
+
|
799
|
+
[id="plugins-{type}s-{plugin}-template_overwrite"]
|
800
|
+
===== `template_overwrite`
|
801
|
+
|
802
|
+
* Value type is <<boolean,boolean>>
|
803
|
+
* Default value is `false`
|
804
|
+
|
805
|
+
The template_overwrite option will always overwrite the indicated template
|
806
|
+
in Elasticsearch with either the one indicated by template or the included one.
|
807
|
+
This option is set to false by default. If you always want to stay up to date
|
808
|
+
with the template provided by Logstash, this option could be very useful to you.
|
809
|
+
Likewise, if you have your own template file managed by puppet, for example, and
|
810
|
+
you wanted to be able to update it regularly, this option could help there as well.
|
811
|
+
|
812
|
+
Please note that if you are using your own customized version of the Logstash
|
813
|
+
template (logstash), setting this to true will make Logstash to overwrite
|
814
|
+
the "logstash" template (i.e. removing all customized settings)
|
815
|
+
|
816
|
+
[id="plugins-{type}s-{plugin}-timeout"]
|
817
|
+
===== `timeout`
|
818
|
+
|
819
|
+
* Value type is <<number,number>>
|
820
|
+
* Default value is `60`
|
821
|
+
|
822
|
+
Set the timeout, in seconds, for network operations and requests sent Elasticsearch. If
|
823
|
+
a timeout occurs, the request will be retried.
|
824
|
+
|
825
|
+
[id="plugins-{type}s-{plugin}-truststore"]
|
826
|
+
===== `truststore`
|
827
|
+
|
828
|
+
* Value type is <<path,path>>
|
829
|
+
* There is no default value for this setting.
|
830
|
+
|
831
|
+
The truststore to validate the server's certificate.
|
832
|
+
It can be either .jks or .p12.
|
833
|
+
Use either `:truststore` or `:cacert`.
|
834
|
+
|
835
|
+
[id="plugins-{type}s-{plugin}-truststore_password"]
|
836
|
+
===== `truststore_password`
|
837
|
+
|
838
|
+
* Value type is <<password,password>>
|
839
|
+
* There is no default value for this setting.
|
840
|
+
|
841
|
+
Set the truststore password
|
842
|
+
|
843
|
+
[id="plugins-{type}s-{plugin}-upsert"]
|
844
|
+
===== `upsert`
|
845
|
+
|
846
|
+
* Value type is <<string,string>>
|
847
|
+
* Default value is `""`
|
848
|
+
|
849
|
+
Set upsert content for update mode.
|
850
|
+
Create a new document with this parameter as json string if `document_id` doesn't exists
|
851
|
+
|
852
|
+
[id="plugins-{type}s-{plugin}-user"]
|
853
|
+
===== `user`
|
854
|
+
|
855
|
+
* Value type is <<string,string>>
|
856
|
+
* There is no default value for this setting.
|
857
|
+
|
858
|
+
Username to authenticate to a secure Elasticsearch cluster
|
859
|
+
|
860
|
+
[id="plugins-{type}s-{plugin}-validate_after_inactivity"]
|
861
|
+
===== `validate_after_inactivity`
|
862
|
+
|
863
|
+
* Value type is <<number,number>>
|
864
|
+
* Default value is `10000`
|
865
|
+
|
866
|
+
How long to wait before checking if the connection is stale before executing a request on a connection using keepalive.
|
867
|
+
You may want to set this lower, if you get connection errors regularly
|
868
|
+
Quoting the Apache commons docs (this client is based Apache Commmons):
|
869
|
+
'Defines period of inactivity in milliseconds after which persistent connections must
|
870
|
+
be re-validated prior to being leased to the consumer. Non-positive value passed to
|
871
|
+
this method disables connection validation. This check helps detect connections that
|
872
|
+
have become stale (half-closed) while kept inactive in the pool.'
|
873
|
+
See https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.html#setValidateAfterInactivity(int)[these docs for more info]
|
874
|
+
|
875
|
+
[id="plugins-{type}s-{plugin}-version"]
|
876
|
+
===== `version`
|
877
|
+
|
878
|
+
* Value type is <<string,string>>
|
879
|
+
* There is no default value for this setting.
|
880
|
+
|
881
|
+
The version to use for indexing. Use sprintf syntax like `%{my_version}` to use a field value here.
|
882
|
+
See https://www.elastic.co/blog/elasticsearch-versioning-support.
|
883
|
+
|
884
|
+
[id="plugins-{type}s-{plugin}-version_type"]
|
885
|
+
===== `version_type`
|
886
|
+
|
887
|
+
* Value can be any of: `internal`, `external`, `external_gt`, `external_gte`, `force`
|
888
|
+
* There is no default value for this setting.
|
889
|
+
|
890
|
+
The version_type to use for indexing.
|
891
|
+
See https://www.elastic.co/blog/elasticsearch-versioning-support.
|
892
|
+
See also https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#_version_types
|
893
|
+
|
894
|
+
|
895
|
+
|
896
|
+
[id="plugins-{type}s-{plugin}-common-options"]
|
897
|
+
include::{include_path}/{type}.asciidoc[]
|
898
|
+
|
899
|
+
:no_codec!:
|