logstash-input-s3-sns-sqs 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -0
- data/lib/logstash/inputs/s3snssqs.rb +2 -0
- data/lib/logstash/inputs/s3snssqs/log_processor.rb +6 -12
- data/logstash-input-s3-sns-sqs.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: 037f46eeeb1316d0e6a108b5f573ebc9a56649a3ddc0d97276898defbf1e3c5e
|
4
|
+
data.tar.gz: f5b670848c3c7c4da6d00a9a8e224bfe11447eafda3dc0d4f9e03a90e1890562
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8be989f95a4651d4283b4770da33544bfe30d417b44d9de982fbf203a37e310cdb9cc7d3ebfe1be7d798bdc843ce9033762798f2bad2f5b62d6b09657cdbc4c
|
7
|
+
data.tar.gz: e57bed2000ed438e4ee2b543251f2757dd9fea2c8ad6d7d7aa93c9d9083c726e9fcc12c51eaa8bda2322ac12cb975d5c26e7bda34a922123561698e846f28f25
|
data/CHANGELOG.md
CHANGED
@@ -25,6 +25,7 @@ java_import java.io.FileInputStream
|
|
25
25
|
java_import java.io.BufferedReader
|
26
26
|
java_import java.util.zip.GZIPInputStream
|
27
27
|
java_import java.util.zip.ZipException
|
28
|
+
import java.lang.StringBuilder
|
28
29
|
|
29
30
|
# our helper classes
|
30
31
|
# these may go into this file for brevity...
|
@@ -326,6 +327,7 @@ class LogStash::Inputs::S3SNSSQS < LogStash::Inputs::Threadable
|
|
326
327
|
if match = /#{s3_key_prefix}\/?(?<type_folder>.*?)\/.*/.match(key)
|
327
328
|
return match['type_folder']
|
328
329
|
else
|
330
|
+
#FIXME should be NIL instedt of empty sting?
|
329
331
|
return ""
|
330
332
|
end
|
331
333
|
end
|
@@ -75,8 +75,7 @@ module LogProcessor
|
|
75
75
|
@logger.warn("Problem while gzip detection", :error => e)
|
76
76
|
end
|
77
77
|
|
78
|
-
def read_file(filename
|
79
|
-
#@logger.info("begin read_file",:thread => Thread.current[:name])
|
78
|
+
def read_file(filename)
|
80
79
|
completed = false
|
81
80
|
zipped = gzip?(filename)
|
82
81
|
file_stream = FileInputStream.new(filename)
|
@@ -87,28 +86,23 @@ module LogProcessor
|
|
87
86
|
decoder = InputStreamReader.new(file_stream, 'UTF-8')
|
88
87
|
end
|
89
88
|
buffered = BufferedReader.new(decoder)
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
line = buffered.readLine()
|
95
|
-
#@logger.info("next line read",:line => line)
|
89
|
+
|
90
|
+
while (data = buffered.readLine())
|
91
|
+
line = StringBuilder.new(data).append("\n")
|
92
|
+
yield(line.toString())
|
96
93
|
end
|
97
|
-
#@logger.info("finished read_file",:thread => Thread.current[:name])
|
98
94
|
completed = true
|
99
|
-
|
100
95
|
rescue ZipException => e
|
101
96
|
@logger.error("Gzip codec: We cannot uncompress the gzip file", :filename => filename, :error => e)
|
102
|
-
return nil
|
103
97
|
ensure
|
104
98
|
buffered.close unless buffered.nil?
|
105
99
|
decoder.close unless decoder.nil?
|
106
100
|
gzip_stream.close unless gzip_stream.nil?
|
107
101
|
file_stream.close unless file_stream.nil?
|
108
102
|
throw :skip_delete unless completed
|
109
|
-
return nil
|
110
103
|
end
|
111
104
|
|
105
|
+
|
112
106
|
def event_is_metadata?(event)
|
113
107
|
return false unless event.get("message").class == String
|
114
108
|
line = event.get("message")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-input-s3-sns-sqs'
|
3
|
-
s.version = '2.0.
|
3
|
+
s.version = '2.0.3'
|
4
4
|
s.licenses = ['Apache-2.0']
|
5
5
|
s.summary = "Get logs from AWS s3 buckets as issued by an object-created event via sns -> sqs."
|
6
6
|
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-s3-sns-sqs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Herweg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|