logstash-output-elasticsearch 10.3.1-java → 10.3.2-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/docs/index.asciidoc +4 -4
- data/lib/logstash/outputs/elasticsearch.rb +1 -1
- data/lib/logstash/outputs/elasticsearch/common_configs.rb +1 -1
- data/logstash-output-elasticsearch.gemspec +1 -1
- data/spec/es_spec_helper.rb +1 -1
- data/spec/integration/outputs/create_spec.rb +1 -1
- data/spec/integration/outputs/ilm_spec.rb +26 -26
- data/spec/integration/outputs/ingest_pipeline_spec.rb +1 -1
- data/spec/integration/outputs/no_es_on_startup_spec.rb +2 -2
- data/spec/integration/outputs/retry_spec.rb +3 -3
- data/spec/integration/outputs/templates_5x_spec.rb +1 -1
- data/spec/integration/outputs/templates_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21ff4b815353a8aa8e1d6e2fe191095ad78cf31916412fe8837c4213d261cb1c
|
4
|
+
data.tar.gz: e265c473d087c0f2c7a48b3b25ddff92ab73232827fb405fb2d65440d80b8b27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0349d45efa43b8c7a2d97f55c5b5175e5df013e2a84b661b449798b476406ec1da1d5a9e07f9a0bb6b85b85ef871f3215441e3fe6056a64ec9bf1dce2c725b8
|
7
|
+
data.tar.gz: 3ecf9c710e7e3d538688d8ba4efcc0bd34b60eebfc8245f5464908e6b7091c9db413d28b94c35cc36ef1e75313f1c985fff633f4f14a6510aefba559ec035e61
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 10.3.2
|
2
|
+
- [DOC] Replaced setting name with correct value [#919](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/919)
|
3
|
+
- Fix integration tests for Elasticsearch 7.6+ [#922](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/922)
|
4
|
+
- Fix integration tests for Elasticsearch API `7.5.0` [#923](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/923)
|
5
|
+
|
1
6
|
## 10.3.1
|
2
7
|
- Fix: handle proxy => '' as if none was set [#912](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/912)
|
3
8
|
|
data/docs/index.asciidoc
CHANGED
@@ -69,7 +69,7 @@ the new template is installed.
|
|
69
69
|
[NOTE]
|
70
70
|
================================================================================
|
71
71
|
You cannot use dynamic variable substitution when `ilm_enabled` is `true` and
|
72
|
-
when using `
|
72
|
+
when using `ilm_rollover_alias`.
|
73
73
|
|
74
74
|
================================================================================
|
75
75
|
|
@@ -92,7 +92,7 @@ Example:
|
|
92
92
|
index => "%{[some_field][sub_field]}-%{+YYYY.MM.dd}"
|
93
93
|
}
|
94
94
|
}
|
95
|
-
|
95
|
+
|
96
96
|
**What to do in case there is no field in the event containing the destination index prefix?**
|
97
97
|
|
98
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
|
@@ -335,7 +335,7 @@ The .cer or .pem file to validate the server's certificate
|
|
335
335
|
|
336
336
|
Cloud authentication string ("<username>:<password>" format) is an alternative for the `user`/`password` pair.
|
337
337
|
|
338
|
-
For
|
338
|
+
For more details, check out the https://www.elastic.co/guide/en/logstash/current/connecting-to-cloud.html#_cloud_auth[Logstash-to-Cloud documentation]
|
339
339
|
|
340
340
|
[id="plugins-{type}s-{plugin}-cloud_id"]
|
341
341
|
===== `cloud_id`
|
@@ -345,7 +345,7 @@ For mode details, check out the https://www.elastic.co/guide/en/logstash/current
|
|
345
345
|
|
346
346
|
Cloud ID, from the Elastic Cloud web console. If set `hosts` should not be used.
|
347
347
|
|
348
|
-
For
|
348
|
+
For more details, check out the https://www.elastic.co/guide/en/logstash/current/connecting-to-cloud.html#_cloud_id[Logstash-to-Cloud documentation]
|
349
349
|
|
350
350
|
[id="plugins-{type}s-{plugin}-doc_as_upsert"]
|
351
351
|
===== `doc_as_upsert`
|
@@ -124,7 +124,7 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
|
|
124
124
|
|
125
125
|
# Cloud authentication string ("<username>:<password>" format) is an alternative for the `user`/`password` configuration.
|
126
126
|
#
|
127
|
-
# For
|
127
|
+
# For more details, check out the https://www.elastic.co/guide/en/logstash/current/connecting-to-cloud.html#_cloud_auth[cloud documentation]
|
128
128
|
config :cloud_auth, :validate => :password
|
129
129
|
|
130
130
|
# HTTP Path at which the Elasticsearch server lives. Use this if you must run Elasticsearch behind a proxy that remaps
|
@@ -101,7 +101,7 @@ module LogStash; module Outputs; class ElasticSearch
|
|
101
101
|
|
102
102
|
# Cloud ID, from the Elastic Cloud web console. If set `hosts` should not be used.
|
103
103
|
#
|
104
|
-
# For
|
104
|
+
# For more details, check out the https://www.elastic.co/guide/en/logstash/current/connecting-to-cloud.html#_cloud_id[cloud documentation]
|
105
105
|
mod.config :cloud_id, :validate => :string
|
106
106
|
|
107
107
|
# Set upsert content for update mode.s
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-elasticsearch'
|
3
|
-
s.version = '10.3.
|
3
|
+
s.version = '10.3.2'
|
4
4
|
s.licenses = ['apache-2.0']
|
5
5
|
s.summary = "Stores logs in Elasticsearch"
|
6
6
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
data/spec/es_spec_helper.rb
CHANGED
@@ -139,7 +139,7 @@ module ESHelper
|
|
139
139
|
end
|
140
140
|
|
141
141
|
def clean_ilm(client)
|
142
|
-
client.get_ilm_policy.each_key {|key| client.delete_ilm_policy(name: key)}
|
142
|
+
client.get_ilm_policy.each_key { |key| client.delete_ilm_policy(name: key) if key =~ /logstash-policy/ }
|
143
143
|
end
|
144
144
|
|
145
145
|
def supports_ilm?(client)
|
@@ -4,7 +4,7 @@ shared_examples_for 'an ILM enabled Logstash' do
|
|
4
4
|
|
5
5
|
context 'with a policy with a maximum number of documents' do
|
6
6
|
let (:policy) { small_max_doc_policy }
|
7
|
-
let (:ilm_policy_name) { "
|
7
|
+
let (:ilm_policy_name) { "logstash-policy-custom"}
|
8
8
|
let (:settings) { super.merge("ilm_policy" => ilm_policy_name)}
|
9
9
|
|
10
10
|
it 'should rollover when the policy max docs is reached' do
|
@@ -37,10 +37,10 @@ shared_examples_for 'an ILM enabled Logstash' do
|
|
37
37
|
|
38
38
|
# Wait or fail until everything's indexed.
|
39
39
|
Stud::try(20.times) do
|
40
|
-
r = @es.search
|
40
|
+
r = @es.search(index: "#{expected_index}-*")
|
41
41
|
expect(r).to have_hits(9)
|
42
42
|
end
|
43
|
-
indexes_written = @es.search['hits']['hits'].each_with_object(Hash.new(0)) do |x, res|
|
43
|
+
indexes_written = @es.search(index: "#{expected_index}-*")['hits']['hits'].each_with_object(Hash.new(0)) do |x, res|
|
44
44
|
index_written = x['_index']
|
45
45
|
res[index_written] += 1
|
46
46
|
end
|
@@ -53,7 +53,7 @@ shared_examples_for 'an ILM enabled Logstash' do
|
|
53
53
|
|
54
54
|
context 'with a policy where the maximum number of documents is not reached' do
|
55
55
|
let (:policy) { large_max_doc_policy }
|
56
|
-
let (:ilm_policy_name) { "custom-policy"}
|
56
|
+
let (:ilm_policy_name) { "logstash-policy-custom-policy"}
|
57
57
|
let (:settings) { super.merge("ilm_policy" => ilm_policy_name)}
|
58
58
|
|
59
59
|
it 'should ingest into a single index when max docs is not reached' do
|
@@ -78,10 +78,10 @@ shared_examples_for 'an ILM enabled Logstash' do
|
|
78
78
|
|
79
79
|
# Wait or fail until everything's indexed.
|
80
80
|
Stud::try(20.times) do
|
81
|
-
r = @es.search
|
81
|
+
r = @es.search(index: "#{expected_index}-*")
|
82
82
|
expect(r).to have_hits(6)
|
83
83
|
end
|
84
|
-
indexes_written = @es.search['hits']['hits'].each_with_object(Hash.new(0)) do |x, res|
|
84
|
+
indexes_written = @es.search(index: "#{expected_index}-*")['hits']['hits'].each_with_object(Hash.new(0)) do |x, res|
|
85
85
|
index_written = x['_index']
|
86
86
|
res[index_written] += 1
|
87
87
|
end
|
@@ -93,10 +93,10 @@ end
|
|
93
93
|
|
94
94
|
shared_examples_for 'an ILM disabled Logstash' do
|
95
95
|
it 'should not create a rollover alias' do
|
96
|
-
expect(@es.
|
96
|
+
expect(@es.indices.exists_alias(name: "logstash")).to be_falsey
|
97
97
|
subject.register
|
98
98
|
sleep(1)
|
99
|
-
expect(@es.
|
99
|
+
expect(@es.indices.exists_alias(name: "logstash")).to be_falsey
|
100
100
|
end
|
101
101
|
|
102
102
|
it 'should not install the default policy' do
|
@@ -116,7 +116,7 @@ shared_examples_for 'an ILM disabled Logstash' do
|
|
116
116
|
|
117
117
|
context 'with an existing policy that will roll over' do
|
118
118
|
let (:policy) { small_max_doc_policy }
|
119
|
-
let (:ilm_policy_name) { "3_docs"}
|
119
|
+
let (:ilm_policy_name) { "logstash-policy-3_docs"}
|
120
120
|
let (:settings) { super.merge("ilm_policy" => ilm_policy_name)}
|
121
121
|
|
122
122
|
it 'should not roll over indices' do
|
@@ -139,10 +139,10 @@ shared_examples_for 'an ILM disabled Logstash' do
|
|
139
139
|
|
140
140
|
# Wait or fail until everything's indexed.
|
141
141
|
Stud::try(20.times) do
|
142
|
-
r = @es.search
|
142
|
+
r = @es.search(index: 'logstash-*')
|
143
143
|
expect(r).to have_hits(6)
|
144
144
|
end
|
145
|
-
indexes_written = @es.search['hits']['hits'].each_with_object(Hash.new(0)) do |x, res|
|
145
|
+
indexes_written = @es.search(index: 'logstash-*')['hits']['hits'].each_with_object(Hash.new(0)) do |x, res|
|
146
146
|
index_written = x['_index']
|
147
147
|
res[index_written] += 1
|
148
148
|
end
|
@@ -285,10 +285,10 @@ if ESHelper.es_version_satisfies?(">= 6.6")
|
|
285
285
|
context 'with a custom pattern' do
|
286
286
|
let (:settings) { super.merge("ilm_pattern" => "000001")}
|
287
287
|
it 'should create a rollover alias' do
|
288
|
-
expect(@es.indices.exists_alias(
|
288
|
+
expect(@es.indices.exists_alias(name: "logstash")).to be_falsey
|
289
289
|
subject.register
|
290
290
|
sleep(1)
|
291
|
-
expect(@es.indices.exists_alias(
|
291
|
+
expect(@es.indices.exists_alias(name: "logstash")).to be_truthy
|
292
292
|
expect(@es.get_alias(name: "logstash")).to include("logstash-000001")
|
293
293
|
end
|
294
294
|
end
|
@@ -301,10 +301,10 @@ if ESHelper.es_version_satisfies?(">= 6.6")
|
|
301
301
|
end
|
302
302
|
|
303
303
|
it 'should create the default rollover alias' do
|
304
|
-
expect(@es.indices.exists_alias(
|
304
|
+
expect(@es.indices.exists_alias(name: "logstash")).to be_falsey
|
305
305
|
subject.register
|
306
306
|
sleep(1)
|
307
|
-
expect(@es.indices.exists_alias(
|
307
|
+
expect(@es.indices.exists_alias(name: "logstash")).to be_truthy
|
308
308
|
expect(@es.get_alias(name: "logstash")).to include("logstash-#{todays_date}-000001")
|
309
309
|
end
|
310
310
|
|
@@ -328,10 +328,10 @@ if ESHelper.es_version_satisfies?(">= 6.6")
|
|
328
328
|
|
329
329
|
# Wait or fail until everything's indexed.
|
330
330
|
Stud::try(20.times) do
|
331
|
-
r = @es.search
|
331
|
+
r = @es.search(index: "logstash-*")
|
332
332
|
expect(r).to have_hits(6)
|
333
333
|
end
|
334
|
-
indexes_written = @es.search['hits']['hits'].each_with_object(Hash.new(0)) do |x, res|
|
334
|
+
indexes_written = @es.search(index: "logstash-*")['hits']['hits'].each_with_object(Hash.new(0)) do |x, res|
|
335
335
|
index_written = x['_index']
|
336
336
|
res[index_written] += 1
|
337
337
|
end
|
@@ -342,7 +342,7 @@ if ESHelper.es_version_satisfies?(">= 6.6")
|
|
342
342
|
end
|
343
343
|
|
344
344
|
context 'when not using the default policy' do
|
345
|
-
let (:ilm_policy_name) {"
|
345
|
+
let (:ilm_policy_name) {"logstash-policy-small"}
|
346
346
|
let (:settings) { super.merge("ilm_policy" => ilm_policy_name)}
|
347
347
|
let (:policy) { small_max_doc_policy }
|
348
348
|
|
@@ -359,7 +359,7 @@ if ESHelper.es_version_satisfies?(">= 6.6")
|
|
359
359
|
end
|
360
360
|
|
361
361
|
context 'when using a time based policy' do
|
362
|
-
let (:ilm_policy_name) {"
|
362
|
+
let (:ilm_policy_name) {"logstash-policy-time"}
|
363
363
|
let (:settings) { super.merge("ilm_policy" => ilm_policy_name)}
|
364
364
|
let (:policy) { max_age_policy("1d") }
|
365
365
|
|
@@ -377,10 +377,10 @@ if ESHelper.es_version_satisfies?(">= 6.6")
|
|
377
377
|
|
378
378
|
context 'with the default template' do
|
379
379
|
it 'should create the rollover alias' do
|
380
|
-
expect(@es.indices.exists_alias(
|
380
|
+
expect(@es.indices.exists_alias(name: expected_index)).to be_falsey
|
381
381
|
subject.register
|
382
382
|
sleep(1)
|
383
|
-
expect(@es.indices.exists_alias(
|
383
|
+
expect(@es.indices.exists_alias(name: expected_index)).to be_truthy
|
384
384
|
expect(@es.get_alias(name: expected_index)).to include("#{expected_index}-#{todays_date}-000001")
|
385
385
|
end
|
386
386
|
|
@@ -428,7 +428,7 @@ if ESHelper.es_version_satisfies?(">= 6.6")
|
|
428
428
|
let (:template) { "spec/fixtures/template-with-policy-es6x.json" }
|
429
429
|
end
|
430
430
|
let (:ilm_enabled) { true }
|
431
|
-
let (:ilm_policy_name) { "custom-policy" }
|
431
|
+
let (:ilm_policy_name) { "logstash-policy-custom-policy" }
|
432
432
|
let (:policy) { small_max_doc_policy }
|
433
433
|
|
434
434
|
before :each do
|
@@ -438,18 +438,18 @@ if ESHelper.es_version_satisfies?(">= 6.6")
|
|
438
438
|
it_behaves_like 'an ILM enabled Logstash'
|
439
439
|
|
440
440
|
it 'should create the rollover alias' do
|
441
|
-
expect(@es.indices.exists_alias(
|
441
|
+
expect(@es.indices.exists_alias(name: ilm_rollover_alias)).to be_falsey
|
442
442
|
subject.register
|
443
443
|
sleep(1)
|
444
|
-
expect(@es.indices.exists_alias(
|
444
|
+
expect(@es.indices.exists_alias(name: ilm_rollover_alias)).to be_truthy
|
445
445
|
expect(@es.get_alias(name: ilm_rollover_alias)).to include("#{ilm_rollover_alias}-#{todays_date}-000001")
|
446
446
|
end
|
447
447
|
|
448
448
|
context 'when the custom rollover alias already exists' do
|
449
449
|
it 'should ignore the already exists error' do
|
450
|
-
expect(@es.indices.exists_alias(
|
450
|
+
expect(@es.indices.exists_alias(name: ilm_rollover_alias)).to be_falsey
|
451
451
|
put_alias(@es, "#{ilm_rollover_alias}-#{todays_date}-000001", ilm_rollover_alias)
|
452
|
-
expect(@es.indices.exists_alias(
|
452
|
+
expect(@es.indices.exists_alias(name: ilm_rollover_alias)).to be_truthy
|
453
453
|
subject.register
|
454
454
|
sleep(1)
|
455
455
|
expect(@es.get_alias(name: ilm_rollover_alias)).to include("#{ilm_rollover_alias}-#{todays_date}-000001")
|
@@ -38,7 +38,7 @@ describe "elasticsearch is down on startup", :integration => true do
|
|
38
38
|
allow_any_instance_of(LogStash::Outputs::ElasticSearch::HttpClient::Pool).to receive(:get_es_version).and_return(ESHelper.es_version)
|
39
39
|
subject.multi_receive([event1, event2])
|
40
40
|
@es.indices.refresh
|
41
|
-
r = @es.search
|
41
|
+
r = @es.search(index: 'logstash-*')
|
42
42
|
expect(r).to have_hits(2)
|
43
43
|
end
|
44
44
|
|
@@ -51,7 +51,7 @@ describe "elasticsearch is down on startup", :integration => true do
|
|
51
51
|
end
|
52
52
|
subject.multi_receive([event1, event2])
|
53
53
|
@es.indices.refresh
|
54
|
-
r = @es.search
|
54
|
+
r = @es.search(index: 'logstash-*')
|
55
55
|
expect(r).to have_hits(2)
|
56
56
|
end
|
57
57
|
|
@@ -142,7 +142,7 @@ describe "failures in bulk class expected behavior", :integration => true do
|
|
142
142
|
subject.close
|
143
143
|
|
144
144
|
@es.indices.refresh
|
145
|
-
r = @es.search
|
145
|
+
r = @es.search(index: 'logstash-*')
|
146
146
|
expect(r).to have_hits(0)
|
147
147
|
end
|
148
148
|
|
@@ -153,7 +153,7 @@ describe "failures in bulk class expected behavior", :integration => true do
|
|
153
153
|
subject.multi_receive([event1])
|
154
154
|
subject.close
|
155
155
|
@es.indices.refresh
|
156
|
-
r = @es.search
|
156
|
+
r = @es.search(index: 'logstash-*')
|
157
157
|
expect(r).to have_hits(1)
|
158
158
|
end
|
159
159
|
|
@@ -163,7 +163,7 @@ describe "failures in bulk class expected behavior", :integration => true do
|
|
163
163
|
subject.close
|
164
164
|
|
165
165
|
@es.indices.refresh
|
166
|
-
r = @es.search
|
166
|
+
r = @es.search(index: 'logstash-*')
|
167
167
|
expect(r).to have_hits(1)
|
168
168
|
end
|
169
169
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.3.
|
4
|
+
version: 10.3.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|