logstash-output-elasticsearch 5.2.0-java → 5.2.1-java
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b251154b11adcfa757987794bdad62c0488d349
|
4
|
+
data.tar.gz: f23e6896387edeb0eeacab8e669acae81c432aa7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb7d268d9129800467d11b13d577fe367b063f6df75317f57e850cb2f0011ed4c7ac49275138c4334d39d8e1776e0002bc2e4cd031e6ec194f34183d85fe9b1a
|
7
|
+
data.tar.gz: 7dcd51f47cafc2cff0dc1633e373f40de486b5be82a9351e693d834e91aeaa63eb91d733950054075ae8cea35bfb340cdf0961a814bfff12ae119187a180aebe
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 5.2.1
|
2
|
+
- Hide user/password in connection pool
|
3
|
+
- depends on Adressable ~> 2.3.0 to satisfy development dependency of the core ([logstash/#6204](https://github.com/elastic/logstash/issues/6204))
|
4
|
+
|
1
5
|
## 5.2.0
|
2
6
|
- Change default lang for scripts to be painless, inline with ES 5.0. Earlier there was no default.
|
3
7
|
|
@@ -261,7 +261,7 @@ module LogStash; module Outputs; class ElasticSearch; class HttpClient;
|
|
261
261
|
new_urls.each do |url|
|
262
262
|
# URI objects don't have real hash equality! So, since this isn't perf sensitive we do a linear scan
|
263
263
|
unless @url_info.keys.include?(url)
|
264
|
-
state_changes[:added] << url
|
264
|
+
state_changes[:added] << url
|
265
265
|
add_url(url)
|
266
266
|
end
|
267
267
|
end
|
@@ -269,14 +269,24 @@ module LogStash; module Outputs; class ElasticSearch; class HttpClient;
|
|
269
269
|
# Delete connections not in the new list
|
270
270
|
@url_info.each do |url,_|
|
271
271
|
unless new_urls.include?(url)
|
272
|
-
state_changes[:removed] << url
|
272
|
+
state_changes[:removed] << url
|
273
273
|
remove_url(url)
|
274
274
|
end
|
275
275
|
end
|
276
276
|
end
|
277
277
|
|
278
278
|
if state_changes[:removed].size > 0 || state_changes[:added].size > 0
|
279
|
-
logger.info
|
279
|
+
if logger.info?
|
280
|
+
logger.info("Elasticsearch pool URLs updated", :changes => safe_state_changes(state_changes))
|
281
|
+
end
|
282
|
+
end
|
283
|
+
end
|
284
|
+
|
285
|
+
def safe_state_changes(state_changes)
|
286
|
+
state_changes.reduce({}) do |acc, kv|
|
287
|
+
k,v = kv
|
288
|
+
acc[k] = v.map(&LogStash::Outputs::ElasticSearch::SafeURL.method(:without_credentials)).map(&:to_s)
|
289
|
+
acc
|
280
290
|
end
|
281
291
|
end
|
282
292
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-output-elasticsearch'
|
4
|
-
s.version = '5.2.
|
4
|
+
s.version = '5.2.1'
|
5
5
|
s.licenses = ['apache-2.0']
|
6
6
|
s.summary = "Logstash Output to Elasticsearch"
|
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"
|
@@ -23,6 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_runtime_dependency 'cabin', ['~> 0.6']
|
24
24
|
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
|
25
25
|
s.add_development_dependency 'ftw', '~> 0.0.42'
|
26
|
+
s.add_development_dependency 'addressable', "~> 2.3.0" # used by FTW. V 2.5.0 is ruby 2.0 only.
|
26
27
|
s.add_development_dependency 'logstash-codec-plain'
|
27
28
|
|
28
29
|
if RUBY_PLATFORM == 'java'
|
@@ -93,6 +93,21 @@ describe LogStash::Outputs::ElasticSearch::HttpClient::Pool do
|
|
93
93
|
expect(subject).to have_received(:in_use_connections).twice
|
94
94
|
end
|
95
95
|
end
|
96
|
+
|
97
|
+
describe "safe_state_changes" do
|
98
|
+
let(:state_changes) do
|
99
|
+
{
|
100
|
+
:added => [URI.parse("http://sekretu:sekretp@foo1")],
|
101
|
+
:removed => [URI.parse("http://sekretu:sekretp@foo2")]
|
102
|
+
}
|
103
|
+
end
|
104
|
+
let(:processed) { subject.safe_state_changes(state_changes)}
|
105
|
+
|
106
|
+
it "should hide passwords" do
|
107
|
+
expect(processed[:added].any? {|p| p =~ /sekretp/ }).to be false
|
108
|
+
expect(processed[:removed].any? {|p| p =~ /sekretp/ }).to be false
|
109
|
+
end
|
110
|
+
end
|
96
111
|
|
97
112
|
describe "connection management" do
|
98
113
|
context "with only one URL in the list" do
|
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: 5.2.
|
4
|
+
version: 5.2.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,6 +78,20 @@ dependencies:
|
|
78
78
|
- - "~>"
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: 0.0.42
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - "~>"
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: 2.3.0
|
87
|
+
name: addressable
|
88
|
+
prerelease: false
|
89
|
+
type: :development
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - "~>"
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: 2.3.0
|
81
95
|
- !ruby/object:Gem::Dependency
|
82
96
|
requirement: !ruby/object:Gem::Requirement
|
83
97
|
requirements:
|