logstash-filter-grok 3.2.2 → 3.2.3
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: e45feb32b6599f171a7d75ef08a165301a02a798
|
4
|
+
data.tar.gz: d6895d5112db9412404ddb9da3806210b85a15b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5c7c112f2e3e3025ee58eb0ec4dd576db6073e07c3dfd40a53febeca25236aa585d4f8be56d4d6a7c55c4fb961cc665d4116655366ab899d84541da4dbd0301
|
7
|
+
data.tar.gz: 0d26a71dd53d0fd60bfbeaa7c16455c94206d0149c985677b1e413379d3eef5da3371321d1780102f925be5a47e05ca71d0ae7217f6a4e58bb2e8b922eee1b7e
|
data/CHANGELOG.md
CHANGED
@@ -14,24 +14,21 @@ class LogStash::Filters::Grok::TimeoutEnforcer
|
|
14
14
|
|
15
15
|
def grok_till_timeout(event, grok, field, value)
|
16
16
|
begin
|
17
|
-
thread = Thread.
|
17
|
+
thread = java.lang.Thread.currentThread()
|
18
18
|
start_thread_groking(thread)
|
19
19
|
yield
|
20
|
-
rescue
|
21
|
-
|
22
|
-
# so we add them here.
|
23
|
-
# We could store this metadata in the @threads_to_start_time hash
|
24
|
-
# but that'd come at a perf cost and this works just as well.
|
25
|
-
e.grok = grok
|
26
|
-
e.field = field
|
27
|
-
e.value = value
|
28
|
-
raise e
|
20
|
+
rescue InterruptedRegexpError => e
|
21
|
+
raise ::LogStash::Filters::Grok::TimeoutException.new(grok, field, value)
|
29
22
|
ensure
|
30
23
|
stop_thread_groking(thread)
|
24
|
+
# Clear any interrupts from any previous invocations that were not caught by Joni
|
25
|
+
thread.interrupted
|
31
26
|
end
|
32
27
|
end
|
33
28
|
|
34
29
|
def start_thread_groking(thread)
|
30
|
+
# Clear any interrupts from any previous invocations that were not caught by Joni
|
31
|
+
thread.interrupted
|
35
32
|
@timer_mutex.synchronize do
|
36
33
|
@threads_to_start_time[thread] = java.lang.System.nanoTime()
|
37
34
|
end
|
@@ -50,7 +47,10 @@ class LogStash::Filters::Grok::TimeoutEnforcer
|
|
50
47
|
elapsed = java.lang.System.nanoTime - start_time
|
51
48
|
if elapsed > @timeout_nanos
|
52
49
|
elapsed_millis = elapsed / 1000
|
53
|
-
thread.
|
50
|
+
thread.interrupt()
|
51
|
+
# Ensure that we never attempt to cancel this thread twice in the event
|
52
|
+
# of weird races
|
53
|
+
stop_thread_groking(thread)
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
@@ -1,8 +1,7 @@
|
|
1
1
|
class LogStash::Filters::Grok::TimeoutException < Exception
|
2
|
-
|
2
|
+
attr_reader :grok, :field, :value
|
3
3
|
|
4
|
-
def initialize(
|
5
|
-
@elapsed_millis = elapsed_millis
|
4
|
+
def initialize(grok=nil, field=nil, value=nil)
|
6
5
|
@field = field
|
7
6
|
@value = value
|
8
7
|
@grok = grok
|
@@ -20,4 +19,3 @@ class LogStash::Filters::Grok::TimeoutException < Exception
|
|
20
19
|
end
|
21
20
|
end
|
22
21
|
end
|
23
|
-
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-grok'
|
4
|
-
s.version = '3.2.
|
4
|
+
s.version = '3.2.3'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Parse arbitrary text and structure it."
|
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"
|
@@ -27,4 +27,3 @@ Gem::Specification.new do |s|
|
|
27
27
|
|
28
28
|
s.add_development_dependency 'logstash-devutils'
|
29
29
|
end
|
30
|
-
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-grok
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|