logstash-filter-linelookup 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/filters/linelookup.rb +8 -2
- data/logstash-filter-linelookup.gemspec +1 -1
- 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: 4327b82865336e7253107ff0432e8797a85ee3a742bff2f8e99645b7eb4260db
|
4
|
+
data.tar.gz: cbac11267e06080de731695f5d56aa4dffc59372969147fec4f9d22237a7d1f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4b742b11ffde2d8a9724d7602a8979be6f2d2b55f65fd9f373d56e1a54ed677765cbfbd2b3f899670fb8efda77959c6d02fa6c6ea597345567cca910d73fcd9
|
7
|
+
data.tar.gz: 6da051a5eb5c699c1986e3775cc6160c48c4c5edab055981376f3da0ba35e8ad1923bc1d7ea6b82ffaeeec8b966deaa0d256e72561939a894f3b86f803c448a6
|
@@ -22,19 +22,21 @@ class LogStash::Filters::Linelookup < LogStash::Filters::Base
|
|
22
22
|
public
|
23
23
|
def register
|
24
24
|
@lookupconn = nil
|
25
|
-
|
25
|
+
@connmu = Mutex.new
|
26
26
|
end
|
27
27
|
|
28
28
|
public
|
29
29
|
def filter(event)
|
30
30
|
retries = 2
|
31
31
|
begin
|
32
|
-
@lookupconn ||= connect
|
33
32
|
|
33
|
+
@connmu.lock
|
34
|
+
@lookupconn ||= connect
|
34
35
|
@lookupconn.puts(event.sprintf(@query))
|
35
36
|
@lookupconn.flush
|
36
37
|
|
37
38
|
response = @lookupconn.gets.chop
|
39
|
+
@connmu.unlock
|
38
40
|
|
39
41
|
if response != @miss_value
|
40
42
|
event.set(@target, response)
|
@@ -60,4 +62,8 @@ class LogStash::Filters::Linelookup < LogStash::Filters::Base
|
|
60
62
|
|
61
63
|
Socket.unix(@socket_path)
|
62
64
|
end
|
65
|
+
|
66
|
+
def close
|
67
|
+
@lookupconn.close
|
68
|
+
end
|
63
69
|
end # class LogStash::Filters::Linelookup
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-filter-linelookup'
|
3
|
-
s.version = '0.1.
|
3
|
+
s.version = '0.1.3'
|
4
4
|
s.licenses = ['MIT']
|
5
5
|
s.summary = 'Logstash Filter Plugin for Linelookup'
|
6
6
|
s.description = 'A logstash filter for enrichment via a simple line-protocol over a socket'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-linelookup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julian Wecke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core-plugin-api
|