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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c4ea24106acf8ee8fccd7abeea77aec4beb2198f34099507b37846ff38ef02d
4
- data.tar.gz: 5e4b5a793b2edd3d76b9fba92afccba3feb676e059a3b949bd91612878a97e86
3
+ metadata.gz: 4327b82865336e7253107ff0432e8797a85ee3a742bff2f8e99645b7eb4260db
4
+ data.tar.gz: cbac11267e06080de731695f5d56aa4dffc59372969147fec4f9d22237a7d1f8
5
5
  SHA512:
6
- metadata.gz: e7f6e62988d0d582310d09a71a0db65f7e8c2c31b2322d257b818da66f0410768e6cf77feee32904127b1d57bf1d905f12faf82b77f16b64c212e36bbc8a5c10
7
- data.tar.gz: 9e37de02eb8d28be8f4616fd69682c7f9c221be90ea9a86c7ce8aa59802ce4ce8a2be135e9a5215309fb7ce2c23674ced2324fa76c0e88d8aa75a2a01dad94ee
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.2'
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.2
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-09 00:00:00.000000000 Z
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