logstash-input-varnishncsa 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/logstash/inputs/varnishncsa.rb +7 -6
- data/logstash-input-varnishncsa.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29b000ebfd65182bdb1cea288aa8ffd26fe4e553
|
4
|
+
data.tar.gz: 1d6f137b024ba3e18442c02061cb31c25f2e7037
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c9f08277f1fd300d3b7e9e3ca1f0244f35ef750a3fdb5ba574a1b912c5b994c61fb585b62df09af1cd4a0c3f75b18cfd9c0af25c765f179a1b023449fa789e7
|
7
|
+
data.tar.gz: ba3422b26b598c29f9f880d4bbea76be51fc8dbd31b27aa6d020159a51afccd56ec4408751bd9e9830fbb092b00bedbbdc8a1d4489d370deb0c124aa0078b112
|
@@ -10,8 +10,6 @@ class LogStash::Inputs::Varnishncsa < LogStash::Inputs::Threadable
|
|
10
10
|
|
11
11
|
config :instance, :validate => :string, :default => "default"
|
12
12
|
|
13
|
-
trap("SIGINT") { @@reopen = 1}
|
14
|
-
|
15
13
|
Logline = Struct.new(
|
16
14
|
:df_H, # %H, Protocol version
|
17
15
|
:df_U, # %U, URL path
|
@@ -54,10 +52,11 @@ class LogStash::Inputs::Varnishncsa < LogStash::Inputs::Threadable
|
|
54
52
|
end # def register
|
55
53
|
|
56
54
|
def run(queue)
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
55
|
+
while !stop? do
|
56
|
+
@q = queue
|
57
|
+
@hostname = Socket.gethostname
|
58
|
+
Varnish::VSL.VSL_Dispatch(@vd, self.method(:h_ncsa).to_proc, FFI::MemoryPointer.new(:pointer))
|
59
|
+
end
|
61
60
|
end # def run
|
62
61
|
|
63
62
|
private
|
@@ -263,8 +262,10 @@ class LogStash::Inputs::Varnishncsa < LogStash::Inputs::Threadable
|
|
263
262
|
begin
|
264
263
|
str = ptr.read_string(len)
|
265
264
|
if spec == :spec_client
|
265
|
+
@logger.debug('Collect client')
|
266
266
|
collect_client(tag, str)
|
267
267
|
elsif spec == :spec_backend
|
268
|
+
@logger.debug('collect backend')
|
268
269
|
collect_backend(tag, str)
|
269
270
|
else
|
270
271
|
return @@reopen
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-varnishncsa'
|
4
|
-
s.version = '2.0.
|
4
|
+
s.version = '2.0.5'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Read from varnish cache's shared memory log and return all value in a logstash field (rewrite of varnishlog in ruby)"
|
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"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-varnishncsa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hans moulron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core
|