logstash-filter-linelookup 0.1.1 → 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: 6f6ae195cc35737fd22bbaf59fb797941c759df47f64a9c6a022c8408164512f
4
- data.tar.gz: 111fd85929c1807d4981177d95c96a68e980080375e6013d5b11d39371b0d652
3
+ metadata.gz: 4327b82865336e7253107ff0432e8797a85ee3a742bff2f8e99645b7eb4260db
4
+ data.tar.gz: cbac11267e06080de731695f5d56aa4dffc59372969147fec4f9d22237a7d1f8
5
5
  SHA512:
6
- metadata.gz: 8680f254747fc79a647f02d471b1a647c5a2d4428c333d67e39a40083b5b50245b47d6d156348800c743008a930766d58d9c103ab523ab5566ad7df5dad397f9
7
- data.tar.gz: e196cce4470a30463cba6e6e10931074e1059cc37858565f3b4ed5a3984b67e64e6b054b3314f7719e523d68dde135d41924b5384b8f05a962bf905d0988104e
6
+ metadata.gz: d4b742b11ffde2d8a9724d7602a8979be6f2d2b55f65fd9f373d56e1a54ed677765cbfbd2b3f899670fb8efda77959c6d02fa6c6ea597345567cca910d73fcd9
7
+ data.tar.gz: 6da051a5eb5c699c1986e3775cc6160c48c4c5edab055981376f3da0ba35e8ad1923bc1d7ea6b82ffaeeec8b966deaa0d256e72561939a894f3b86f803c448a6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ## 0.1.1
2
- - Log retries
2
+ - Log retries
3
3
 
4
4
  ## 0.1.0
5
5
  - Init release
@@ -22,18 +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))
36
+ @lookupconn.flush
35
37
 
36
38
  response = @lookupconn.gets.chop
39
+ @connmu.unlock
37
40
 
38
41
  if response != @miss_value
39
42
  event.set(@target, response)
@@ -59,4 +62,8 @@ class LogStash::Filters::Linelookup < LogStash::Filters::Base
59
62
 
60
63
  Socket.unix(@socket_path)
61
64
  end
65
+
66
+ def close
67
+ @lookupconn.close
68
+ end
62
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.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.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-06-16 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