logstash-input-lumberjack 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/logstash/inputs/lumberjack.rb +5 -16
- data/lib/logstash/sized_queue_timeout.rb +11 -5
- data/logstash-input-lumberjack.gemspec +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13d047624d0d97f3184fec85ee0d5a3f9a1fd274
|
4
|
+
data.tar.gz: 82d47b698574bd27368c49237c61e67c4bfcd5f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8109970459a4c12f5ee11feb4b0aa12c668da8f840e9ca371e7f448da447993894964bfb1f2310c8766d7e8dd304bf0b30c088a947ecef21745a51d3caf44f9
|
7
|
+
data.tar.gz: 731c6a93b576bc7d221a9aaa66ee965ba12e3be7fe4d1182468195aaa9fb93483d071e136fc004326487af2a03141909981ef17ac2341cc459e82a92aa2b8a27
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# 1.0.3
|
2
|
+
- Fix `concurrent-ruby` deprecation warning (https://github.com/logstash-plugins/logstash-input-lumberjack/pull/39)
|
3
|
+
- Remove deplicate declaration of the threadpool
|
4
|
+
- Force `ruby-lumberjack` to be version 0.0.23 or higher to be in sync with `logstash-output-lumberjack`
|
1
5
|
# 1.0.2
|
2
6
|
- Use a `require_relative` for loading the spec helpers. (https://github.com/logstash-plugins/logstash-input-lumberjack/pull/35)
|
3
7
|
# 1.0.1
|
@@ -29,12 +29,8 @@ class LogStash::Inputs::Lumberjack < LogStash::Inputs::Base
|
|
29
29
|
# SSL key passphrase to use.
|
30
30
|
config :ssl_key_passphrase, :validate => :password
|
31
31
|
|
32
|
-
#
|
33
|
-
|
34
|
-
# connection. This solve an issue when logstash-forwarder clients are
|
35
|
-
# trying to connect to logstash which have a blocked pipeline and will
|
36
|
-
# make logstash crash with an out of memory exception.
|
37
|
-
config :max_clients, :validate => :number, :default => 1000
|
32
|
+
# This setting no longer has any effect and will be removed in a future release.
|
33
|
+
config :max_clients, :validate => :number, :deprecated => "This setting no longer has any effect. See https://github.com/logstash-plugins/logstash-input-lumberjack/pull/12 for the history of this change"
|
38
34
|
|
39
35
|
# TODO(sissel): Add CA to authenticate clients with.
|
40
36
|
|
@@ -52,16 +48,9 @@ class LogStash::Inputs::Lumberjack < LogStash::Inputs::Base
|
|
52
48
|
:ssl_certificate => @ssl_certificate, :ssl_key => @ssl_key,
|
53
49
|
:ssl_key_passphrase => @ssl_key_passphrase)
|
54
50
|
|
55
|
-
#
|
56
|
-
#
|
57
|
-
#
|
58
|
-
# start rejecting new connection and raise an exception
|
59
|
-
@threadpool = Concurrent::ThreadPoolExecutor.new(
|
60
|
-
:min_threads => 1,
|
61
|
-
:max_threads => @max_clients,
|
62
|
-
:max_queue => 1, # in concurrent-ruby, bounded queue need to be at least 1.
|
63
|
-
fallback_policy: :abort
|
64
|
-
)
|
51
|
+
# Create a reusable threadpool, we do not limit the number of connections
|
52
|
+
# to the input, the circuit breaker with the timeout should take care
|
53
|
+
# of `blocked` threads and prevent logstash to go oom.
|
65
54
|
@threadpool = Concurrent::CachedThreadPool.new(:idletime => 15)
|
66
55
|
|
67
56
|
# in 1.5 the main SizeQueue doesnt have the concept of timeout
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require "concurrent/atomic/condition"
|
2
1
|
require "thread"
|
2
|
+
require "concurrent"
|
3
3
|
|
4
4
|
module LogStash
|
5
5
|
# Minimal subset implement of a SizedQueue supporting
|
@@ -12,8 +12,11 @@ module LogStash
|
|
12
12
|
DEFAULT_TIMEOUT = 2 # in seconds
|
13
13
|
|
14
14
|
def initialize(max_size, options = {})
|
15
|
-
|
16
|
-
|
15
|
+
# `concurrent-ruby` are deprecating the `Condition`
|
16
|
+
# in favor of a Synchonization class that you need to implement.
|
17
|
+
# this was bit overkill to only check if the wait did a timeout.
|
18
|
+
@condition_in = ConditionVariable.new
|
19
|
+
@condition_out = ConditionVariable.new
|
17
20
|
|
18
21
|
@max_size = max_size
|
19
22
|
@queue = []
|
@@ -23,8 +26,11 @@ module LogStash
|
|
23
26
|
def push(obj, timeout = DEFAULT_TIMEOUT)
|
24
27
|
@mutex.synchronize do
|
25
28
|
while full? # wake up check
|
26
|
-
|
27
|
-
|
29
|
+
start_time = Concurrent.monotonic_time
|
30
|
+
@condition_out.wait(@mutex, timeout)
|
31
|
+
if start_time + timeout - Concurrent.monotonic_time < 0
|
32
|
+
raise TimeoutError
|
33
|
+
end
|
28
34
|
end
|
29
35
|
|
30
36
|
@queue << obj
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-lumberjack'
|
4
|
-
s.version = '1.0.
|
4
|
+
s.version = '1.0.3'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Receive events using the lumberjack protocol."
|
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/plugin install gemname. This gem is not a stand-alone program"
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_runtime_dependency "logstash-core", '>= 1.4.0', '< 2.0.0'
|
24
24
|
|
25
25
|
s.add_runtime_dependency 'logstash-codec-plain'
|
26
|
-
s.add_runtime_dependency 'jls-lumberjack', ['>=0.0.
|
26
|
+
s.add_runtime_dependency 'jls-lumberjack', ['>=0.0.23']
|
27
27
|
s.add_runtime_dependency "concurrent-ruby"
|
28
28
|
|
29
29
|
s.add_development_dependency 'logstash-devutils'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-lumberjack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core
|
@@ -50,12 +50,12 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - '>='
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0.0.
|
53
|
+
version: 0.0.23
|
54
54
|
requirement: !ruby/object:Gem::Requirement
|
55
55
|
requirements:
|
56
56
|
- - '>='
|
57
57
|
- !ruby/object:Gem::Version
|
58
|
-
version: 0.0.
|
58
|
+
version: 0.0.23
|
59
59
|
prerelease: false
|
60
60
|
type: :runtime
|
61
61
|
- !ruby/object:Gem::Dependency
|