logstash-input-elasticsearch 4.12.1 → 4.12.2
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/Gemfile +3 -0
- data/lib/logstash/inputs/elasticsearch.rb +6 -6
- data/logstash-input-elasticsearch.gemspec +1 -1
- data/spec/inputs/integration/elasticsearch_spec.rb +33 -6
- 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: caea2fedebb629d87471f67b2b03f43186e7e2b02e854e3f6df7154a64316f16
|
4
|
+
data.tar.gz: 1d75f76b97d6d8ea481637399b1ea82668f5fb47ea52a2f1a51034594b55375f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07af682a46bc7aa7bd48b0d4c4f0a4baa9e8dd5a8848821863b67fe4b2ee5890655d76de1de782938be0b73bf3057228a94ccbf155b7fb9ecaa81077831362e5
|
7
|
+
data.tar.gz: 0031f21cc9d7e41dfdbf9de400b33e21a1b9abda7c9ca2159fb21623ff5cf21258b99670d22090eda39ad42141408166c10317874ea6682e4e3b756e031355a1
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 4.12.2
|
2
|
+
- Fix: hosts => "es_host:port" regression [#168](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/168)
|
3
|
+
|
1
4
|
## 4.12.1
|
2
5
|
- Fixed too_long_frame_exception by passing scroll_id in the body [#159](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/159)
|
3
6
|
|
data/Gemfile
CHANGED
@@ -9,3 +9,6 @@ if Dir.exist?(logstash_path) && use_logstash_source
|
|
9
9
|
gem 'logstash-core', :path => "#{logstash_path}/logstash-core"
|
10
10
|
gem 'logstash-core-plugin-api', :path => "#{logstash_path}/logstash-core-plugin-api"
|
11
11
|
end
|
12
|
+
|
13
|
+
gem 'manticore', ENV['MANTICORE_VERSION'] if ENV['MANTICORE_VERSION']
|
14
|
+
gem 'elasticsearch', ENV['ELASTICSEARCH_VERSION'] if ENV['ELASTICSEARCH_VERSION']
|
@@ -386,13 +386,13 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
|
|
386
386
|
|
387
387
|
def setup_hosts
|
388
388
|
@hosts = Array(@hosts).map { |host| host.to_s } # potential SafeURI#to_s
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
389
|
+
@hosts.map do |h|
|
390
|
+
if h.start_with?('http:', 'https:')
|
391
|
+
h
|
392
|
+
else
|
393
|
+
host, port = h.split(':')
|
394
|
+
{ host: host, port: port, scheme: (@ssl ? 'https' : 'http') }
|
393
395
|
end
|
394
|
-
else
|
395
|
-
@hosts
|
396
396
|
end
|
397
397
|
end
|
398
398
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-elasticsearch'
|
4
|
-
s.version = '4.12.
|
4
|
+
s.version = '4.12.2'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Reads query results from an Elasticsearch cluster"
|
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"
|
@@ -6,13 +6,19 @@ require_relative "../../../spec/es_helper"
|
|
6
6
|
|
7
7
|
describe LogStash::Inputs::Elasticsearch do
|
8
8
|
|
9
|
-
|
9
|
+
SECURE_INTEGRATION = ENV['SECURE_INTEGRATION'].eql? 'true'
|
10
|
+
|
11
|
+
let(:config) { { 'hosts' => ["http#{SECURE_INTEGRATION ? 's' : nil}://#{ESHelper.get_host_port}"],
|
10
12
|
'index' => 'logs',
|
11
13
|
'query' => '{ "query": { "match": { "message": "Not found"} }}' } }
|
12
14
|
let(:plugin) { described_class.new(config) }
|
13
15
|
let(:event) { LogStash::Event.new({}) }
|
14
16
|
let(:client_options) { Hash.new }
|
15
17
|
|
18
|
+
let(:user) { ENV['ELASTIC_USER'] || 'simpleuser' }
|
19
|
+
let(:password) { ENV['ELASTIC_PASSWORD'] || 'abc123' }
|
20
|
+
let(:ca_file) { "spec/fixtures/test_certs/ca.crt" }
|
21
|
+
|
16
22
|
before(:each) do
|
17
23
|
@es = ESHelper.get_client(client_options)
|
18
24
|
# Delete all templates first.
|
@@ -45,7 +51,7 @@ describe LogStash::Inputs::Elasticsearch do
|
|
45
51
|
end
|
46
52
|
end
|
47
53
|
|
48
|
-
describe 'against an unsecured elasticsearch', :
|
54
|
+
describe 'against an unsecured elasticsearch', integration: true do
|
49
55
|
before(:each) do
|
50
56
|
plugin.register
|
51
57
|
end
|
@@ -53,10 +59,7 @@ describe LogStash::Inputs::Elasticsearch do
|
|
53
59
|
it_behaves_like 'an elasticsearch index plugin'
|
54
60
|
end
|
55
61
|
|
56
|
-
describe 'against a secured elasticsearch', :
|
57
|
-
let(:user) { ENV['ELASTIC_USER'] || 'simpleuser' }
|
58
|
-
let(:password) { ENV['ELASTIC_PASSWORD'] || 'abc123' }
|
59
|
-
let(:ca_file) { "spec/fixtures/test_certs/ca.crt" }
|
62
|
+
describe 'against a secured elasticsearch', secure_integration: true do
|
60
63
|
|
61
64
|
let(:client_options) { { :ca_file => ca_file, :user => user, :password => password } }
|
62
65
|
|
@@ -78,4 +81,28 @@ describe LogStash::Inputs::Elasticsearch do
|
|
78
81
|
end
|
79
82
|
|
80
83
|
end
|
84
|
+
|
85
|
+
context 'setting host:port', integration: true do
|
86
|
+
|
87
|
+
let(:config) do
|
88
|
+
super().merge "hosts" => [ESHelper.get_host_port]
|
89
|
+
end
|
90
|
+
|
91
|
+
it_behaves_like 'an elasticsearch index plugin'
|
92
|
+
|
93
|
+
end
|
94
|
+
|
95
|
+
context 'setting host:port (and ssl)', secure_integration: true do
|
96
|
+
|
97
|
+
let(:client_options) { { :ca_file => ca_file, :user => user, :password => password } }
|
98
|
+
|
99
|
+
let(:config) do
|
100
|
+
config = super().merge "hosts" => [ESHelper.get_host_port]
|
101
|
+
config.merge('user' => user, 'password' => password, 'ssl' => true, 'ca_file' => ca_file)
|
102
|
+
end
|
103
|
+
|
104
|
+
it_behaves_like 'an elasticsearch index plugin'
|
105
|
+
|
106
|
+
end
|
107
|
+
|
81
108
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.12.
|
4
|
+
version: 4.12.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|