logstash-output-elasticsearch 11.15.4-java → 11.15.6-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 +6 -0
- data/lib/logstash/outputs/elasticsearch.rb +1 -1
- data/lib/logstash/plugin_mixins/elasticsearch/common.rb +3 -3
- data/logstash-output-elasticsearch.gemspec +1 -1
- data/spec/fixtures/test_certs/ca.crt +13 -13
- data/spec/fixtures/test_certs/ca.der.sha256 +1 -1
- data/spec/fixtures/test_certs/test.crt +14 -14
- data/spec/fixtures/test_certs/test.der.sha256 +1 -1
- data/spec/fixtures/test_certs/test.p12 +0 -0
- data/spec/unit/outputs/elasticsearch_spec.rb +42 -3
- 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: 6765698cd332b5580c1b49535a5547a145547bf10fc3d16441f5a0188607f432
|
|
4
|
+
data.tar.gz: bff7bc6c7003596a85d06e4fb2217d807c6d842b03a270de140022afcd1afe01
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: acd145b600d7985750baf4a3d0304c41a713400e22d5f09180497fbb4df624d32910bb475f7660f1a34c1a5ac9eee7ba43a40c1404f054644628ffc16fcf30b8
|
|
7
|
+
data.tar.gz: ee3c3bc4a56296229af8a7b776e205900584705d9daaf1f3c1cc5d1061f2e87e70cc8ffd7298d6442b630ac7ca5d453ab27b33de7b287e34ac5be23772343b0a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## 11.15.6
|
|
2
|
+
- Fix: avoid to reject a batch when the Elasticsearch connection is alive and the processing should continue [#1132](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1132).
|
|
3
|
+
|
|
4
|
+
## 11.15.5
|
|
5
|
+
- Fixes `undefined 'shutdown_requested' method` error when plugin checks if shutdown request is received [#1134](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1134)
|
|
6
|
+
|
|
1
7
|
## 11.15.4
|
|
2
8
|
- Improved connection handling under several partial-failure scenarios [#1130](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1130)
|
|
3
9
|
- Ensures an HTTP connection can be established before adding the connection to the pool
|
|
@@ -432,7 +432,7 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
|
|
|
432
432
|
return unless after_successful_connection_done
|
|
433
433
|
stoppable_sleep 1 until (after_successful_connection_done.true? || pipeline_shutdown_requested?)
|
|
434
434
|
|
|
435
|
-
if pipeline_shutdown_requested?
|
|
435
|
+
if pipeline_shutdown_requested? && !after_successful_connection_done.true?
|
|
436
436
|
logger.info "Aborting the batch due to shutdown request while waiting for connections to become live"
|
|
437
437
|
abort_batch_if_available!
|
|
438
438
|
end
|
|
@@ -376,9 +376,9 @@ module LogStash; module PluginMixins; module ElasticSearch
|
|
|
376
376
|
end
|
|
377
377
|
|
|
378
378
|
def pipeline_shutdown_requested?
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
379
|
+
return super if defined?(super) # since LS 8.1.0
|
|
380
|
+
execution_context&.pipeline&.shutdown_requested?
|
|
381
|
+
end
|
|
382
382
|
|
|
383
383
|
def abort_batch_if_available!
|
|
384
384
|
raise org.logstash.execution.AbortedBatchException.new if abort_batch_present?
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'logstash-output-elasticsearch'
|
|
3
|
-
s.version = '11.15.
|
|
3
|
+
s.version = '11.15.6'
|
|
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 gem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CH3SDuRnkI+iC4MZL64JTrGzn+juMeK0fqZWrdyoVKRlFI92Ao3J
|
|
23
|
+
oFNF9KTCWQPFAaiy1zl3vDAfIfyJBzQsP6D2BaxVlSQ5jbCxRxOapkhwNUUQ2/vg
|
|
24
|
+
anggOIOnm6biKhain4U118jviSEGonTvzcIpjExLVXXTF216Ahd7vQWDWqZkYNi3
|
|
25
|
+
ji1jZSemBWyv/bDxo/STLL/QiX73WuxelerZeMxS03U6KYyhtTLxDvpeOCstbe1u
|
|
26
|
+
wI9LfpdtAbXP+d/djvYJSHb6WoS4Oya2mnyddqDd6Mfn7lTudhqtw5CLV+sElnFf
|
|
27
|
+
XDBjDp6tWUin6s/IWPVnvMceZW/sW7oO3sy9NKQx1acHh85WIMrZ+9iVvwcvQMRF
|
|
28
|
+
p/bTR2VL3jD5fioNyfBmmQ17wIOIm3QvY+nJmzOWalzYYzottPTiabzKYap7Ulcx
|
|
29
|
+
HDB+ZvuJBA==
|
|
30
30
|
-----END CERTIFICATE-----
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
b6ee8b4a213328074df1da1f3b8fdde95c5e97e9b1d7da58dad0537a04939b97
|
|
Binary file
|
|
@@ -58,7 +58,27 @@ describe LogStash::Outputs::ElasticSearch do
|
|
|
58
58
|
|
|
59
59
|
let(:logger) { double("logger") }
|
|
60
60
|
|
|
61
|
+
let(:never_ending) { Thread.new { sleep 1 while true } }
|
|
62
|
+
|
|
63
|
+
let(:do_register) { false }
|
|
64
|
+
|
|
61
65
|
before(:each) do
|
|
66
|
+
spy_http_client_builder!
|
|
67
|
+
stub_http_client_pool!
|
|
68
|
+
|
|
69
|
+
allow(subject).to receive(:finish_register) # stub-out thread completion (to avoid error log entries)
|
|
70
|
+
|
|
71
|
+
# emulate 'failed' ES connection, which sleeps forever
|
|
72
|
+
allow(subject).to receive(:after_successful_connection) { |&block| never_ending }
|
|
73
|
+
allow(subject).to receive(:stop_after_successful_connection_thread)
|
|
74
|
+
|
|
75
|
+
subject.register
|
|
76
|
+
|
|
77
|
+
allow(subject.client).to receive(:maximum_seen_major_version).at_least(:once).and_return(maximum_seen_major_version)
|
|
78
|
+
allow(subject.client).to receive(:get_xpack_info)
|
|
79
|
+
|
|
80
|
+
subject.client.pool.adapter.manticore.respond_with(:body => "{}")
|
|
81
|
+
|
|
62
82
|
allow(subject).to receive(:logger).and_return(logger)
|
|
63
83
|
allow(logger).to receive(:info)
|
|
64
84
|
|
|
@@ -73,6 +93,25 @@ describe LogStash::Outputs::ElasticSearch do
|
|
|
73
93
|
end
|
|
74
94
|
end
|
|
75
95
|
|
|
96
|
+
context "on a reachable ES instance" do
|
|
97
|
+
let(:events) { [ ::LogStash::Event.new("foo" => "bar1"), ::LogStash::Event.new("foo" => "bar2") ] }
|
|
98
|
+
|
|
99
|
+
let(:logger) { double("logger") }
|
|
100
|
+
|
|
101
|
+
before(:each) do
|
|
102
|
+
allow(subject).to receive(:logger).and_return(logger)
|
|
103
|
+
allow(logger).to receive(:info)
|
|
104
|
+
|
|
105
|
+
allow(subject).to receive(:pipeline_shutdown_requested?).and_return(true)
|
|
106
|
+
allow(subject).to receive(:retrying_submit)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
it "the #multi_receive doesn't abort when waiting for a connection on alive ES and a shutdown is requested" do
|
|
110
|
+
subject.multi_receive(events)
|
|
111
|
+
expect(logger).to_not have_received(:info).with(/Aborting the batch due to shutdown request while waiting for connections to become live/i)
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
76
115
|
context "when a connected ES becomes unreachable" do
|
|
77
116
|
# let(:error) do
|
|
78
117
|
# ::LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError.new(
|
|
@@ -116,6 +155,9 @@ describe LogStash::Outputs::ElasticSearch do
|
|
|
116
155
|
end
|
|
117
156
|
|
|
118
157
|
it "should exit the retry with an abort exception if shutdown is requested" do
|
|
158
|
+
# trigger the shutdown signal
|
|
159
|
+
allow(subject).to receive(:pipeline_shutdown_requested?) { true }
|
|
160
|
+
|
|
119
161
|
# execute in another thread because it blocks in a retry loop until the shutdown is triggered
|
|
120
162
|
th = Thread.new do
|
|
121
163
|
subject.multi_receive([event])
|
|
@@ -124,9 +166,6 @@ describe LogStash::Outputs::ElasticSearch do
|
|
|
124
166
|
e.class
|
|
125
167
|
end
|
|
126
168
|
|
|
127
|
-
# trigger the shutdown signal
|
|
128
|
-
allow(subject).to receive(:pipeline_shutdown_requested?) { true }
|
|
129
|
-
|
|
130
169
|
expect(th.value).to eq(org.logstash.execution.AbortedBatchException)
|
|
131
170
|
end
|
|
132
171
|
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: 11.15.
|
|
4
|
+
version: 11.15.6
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Elastic
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-05-
|
|
11
|
+
date: 2023-05-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|