logstash-filter-elasticsearch 3.10.0 → 3.11.0
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 +3 -0
- data/lib/logstash/filters/elasticsearch.rb +5 -1
- data/logstash-filter-elasticsearch.gemspec +2 -2
- data/spec/filters/elasticsearch_spec.rb +26 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fb1bc80bd95bd0e99591f07f0d2b0c76942d9a06618457e275679caeae9c0ec
|
4
|
+
data.tar.gz: 763fbbf17d77630c097bbbfa834842e8316830687a40a216704ee8902eb61e2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 764940be26047fae75ffc160a5a75831599073c10a2f2712620984ea6fec3e04107efb6fa8c1b7e302e55387ab6629f88e3a82a460543f7a9a90c46ebf3c3ac2
|
7
|
+
data.tar.gz: 6a68318f5028c52265c42c3f939f43619427306964bb70453a1ca60444113601b662c45c6eb19fc65912c63b652707463879b2caba9a67f2aa9686736cd42d13
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 3.11.0
|
2
|
+
- Feat: update Elasticsearch client to 7.14.0 [#150](https://github.com/logstash-plugins/logstash-filter-elasticsearch/pull/150)
|
3
|
+
|
1
4
|
## 3.10.0
|
2
5
|
- Feat: add user-agent header passed to the Elasticsearch HTTP connection [#152](https://github.com/logstash-plugins/logstash-filter-elasticsearch/pull/152)
|
3
6
|
|
@@ -320,6 +320,10 @@ class LogStash::Filters::Elasticsearch < LogStash::Filters::Base
|
|
320
320
|
end
|
321
321
|
|
322
322
|
def test_connection!
|
323
|
-
|
323
|
+
begin
|
324
|
+
get_client.client.ping
|
325
|
+
rescue Elasticsearch::UnsupportedProductError
|
326
|
+
raise LogStash::ConfigurationError, "Could not connect to a compatible version of Elasticsearch"
|
327
|
+
end
|
324
328
|
end
|
325
329
|
end #class LogStash::Filters::Elasticsearch
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-elasticsearch'
|
4
|
-
s.version = '3.
|
4
|
+
s.version = '3.11.0'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Copies fields from previous log events in Elasticsearch to current events "
|
7
7
|
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"
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
|
22
22
|
# Gem dependencies
|
23
23
|
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
|
24
|
-
s.add_runtime_dependency 'elasticsearch', ">=
|
24
|
+
s.add_runtime_dependency 'elasticsearch', ">= 7.14.0" # LS >= 6.7 and < 7.14 all used version 5.0.5
|
25
25
|
s.add_runtime_dependency 'manticore', ">= 0.7.1"
|
26
26
|
s.add_development_dependency 'cabin', ['~> 0.6']
|
27
27
|
s.add_development_dependency 'webrick'
|
@@ -12,12 +12,34 @@ describe LogStash::Filters::Elasticsearch do
|
|
12
12
|
context "registration" do
|
13
13
|
|
14
14
|
let(:plugin) { LogStash::Plugin.lookup("filter", "elasticsearch").new({}) }
|
15
|
-
|
16
|
-
|
15
|
+
|
16
|
+
context "against authentic Elasticsearch" do
|
17
|
+
before do
|
18
|
+
allow(plugin).to receive(:test_connection!)
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should not raise an exception" do
|
22
|
+
expect {plugin.register}.to_not raise_error
|
23
|
+
end
|
17
24
|
end
|
18
25
|
|
19
|
-
|
20
|
-
|
26
|
+
context "against not authentic Elasticsearch" do
|
27
|
+
let(:failing_client) do
|
28
|
+
client = double("client")
|
29
|
+
allow(client).to receive(:ping).and_raise Elasticsearch::UnsupportedProductError
|
30
|
+
|
31
|
+
client_wrapper = double("filter_client")
|
32
|
+
allow(client_wrapper).to receive(:client).and_return client
|
33
|
+
client_wrapper
|
34
|
+
end
|
35
|
+
|
36
|
+
before do
|
37
|
+
allow(plugin).to receive(:get_client).and_return(failing_client)
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should raise ConfigurationError" do
|
41
|
+
expect {plugin.register}.to raise_error(LogStash::ConfigurationError)
|
42
|
+
end
|
21
43
|
end
|
22
44
|
end
|
23
45
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -35,7 +35,7 @@ dependencies:
|
|
35
35
|
requirements:
|
36
36
|
- - ">="
|
37
37
|
- !ruby/object:Gem::Version
|
38
|
-
version:
|
38
|
+
version: 7.14.0
|
39
39
|
name: elasticsearch
|
40
40
|
prerelease: false
|
41
41
|
type: :runtime
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
46
|
+
version: 7.14.0
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|