logstash-output-elasticsearch 11.0.4-java → 11.0.5-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/outputs/elasticsearch/http_client.rb +4 -0
- data/lib/logstash/plugin_mixins/elasticsearch/common.rb +5 -1
- data/logstash-output-elasticsearch.gemspec +1 -1
- data/spec/integration/outputs/no_es_on_startup_spec.rb +14 -0
- data/spec/unit/outputs/elasticsearch_spec.rb +1 -0
- data/spec/unit/outputs/error_whitelist_spec.rb +1 -0
- 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: 2e275e2ca3a658814c730aaaa7464f81826dba01d8f2fb305859dc9aa33f0f34
|
4
|
+
data.tar.gz: f3dd23896923260bb9939e4ef90e56cf44c0daa0571b0987be3e39c45b9749c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 315cc2c6a4097f3923f76899c3bd5d58bb1ff779bc6aaaef4798cdf2db6a2d368ca0a8627e15e36e39b80484ad5bfea96ff7a9d77235c266627c9d4ef76f49c8
|
7
|
+
data.tar.gz: ae0591ff34ed9c88afd9b897c490e1787a28b68f44ff98816cd3ef5784cca71fd7d670c7aeee6b634ca01f837aaa2839198ec0fa8ed70454d2c0916e09e0293f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 11.0.5
|
2
|
+
- Fixed running post-register action when Elasticsearch status change from unhealthy to healthy [#1035](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1035)
|
3
|
+
|
1
4
|
## 11.0.4
|
2
5
|
- [DOC] Clarify that `http_compression` applies to _requests_, and remove noise about _response_ decompression [#1000](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1000)
|
3
6
|
|
@@ -128,8 +128,12 @@ module LogStash; module PluginMixins; module ElasticSearch
|
|
128
128
|
client.maximum_seen_major_version
|
129
129
|
end
|
130
130
|
|
131
|
+
def alive_urls_count
|
132
|
+
client.alive_urls_count
|
133
|
+
end
|
134
|
+
|
131
135
|
def successful_connection?
|
132
|
-
!!maximum_seen_major_version
|
136
|
+
!!maximum_seen_major_version && alive_urls_count > 0
|
133
137
|
end
|
134
138
|
|
135
139
|
# launch a thread that waits for an initial successful connection to the ES cluster to call the given block
|
@@ -55,4 +55,18 @@ describe "elasticsearch is down on startup", :integration => true do
|
|
55
55
|
expect(r).to have_hits(2)
|
56
56
|
end
|
57
57
|
|
58
|
+
it 'should get cluster_uuid when Elasticsearch recovers from license check failure' do
|
59
|
+
allow_any_instance_of(LogStash::Outputs::ElasticSearch::HttpClient::Pool).to receive(:get_license).with(instance_of(LogStash::Util::SafeURI)).and_raise(::LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError.new(StandardError.new, "big fail"))
|
60
|
+
subject.register
|
61
|
+
Thread.new do
|
62
|
+
sleep 4
|
63
|
+
allow_any_instance_of(LogStash::Outputs::ElasticSearch::HttpClient::Pool).to receive(:get_license).with(instance_of(LogStash::Util::SafeURI)).and_call_original
|
64
|
+
end
|
65
|
+
subject.multi_receive([event1, event2])
|
66
|
+
@es.indices.refresh
|
67
|
+
r = @es.search(index: 'logstash-*')
|
68
|
+
expect(r).to have_hits(2)
|
69
|
+
expect(subject.plugin_metadata.get(:cluster_uuid)).not_to be_empty
|
70
|
+
expect(subject.plugin_metadata.get(:cluster_uuid)).not_to eq("_na_")
|
71
|
+
end if ESHelper.es_version_satisfies?(">=7")
|
58
72
|
end
|
@@ -934,6 +934,7 @@ describe LogStash::Outputs::ElasticSearch do
|
|
934
934
|
allow(subject).to receive(:last_es_version).and_return es_version
|
935
935
|
# make successful_connection? return true:
|
936
936
|
allow(subject).to receive(:maximum_seen_major_version).and_return Integer(es_version.split('.').first)
|
937
|
+
allow(subject).to receive(:alive_urls_count).and_return Integer(1)
|
937
938
|
allow(subject).to receive(:stop_after_successful_connection_thread)
|
938
939
|
end
|
939
940
|
|
@@ -12,6 +12,7 @@ describe "whitelisting error types in expected behavior" do
|
|
12
12
|
before :each do
|
13
13
|
allow(subject.logger).to receive(:warn)
|
14
14
|
allow(subject).to receive(:maximum_seen_major_version).and_return(0)
|
15
|
+
allow(subject).to receive(:alive_urls_count).and_return(1)
|
15
16
|
allow(subject).to receive(:finish_register)
|
16
17
|
|
17
18
|
subject.register
|
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.0.
|
4
|
+
version: 11.0.5
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|