logstash-input-sqs_s3 1.1.15 → 1.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile +2 -1
- data/lib/logstash/inputs/sqs_s3.rb +6 -4
- data/logstash-input-sqs_s3.gemspec +2 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acadffc6b1aa893595029bf29b3e7ff63f24d3b88705436bb33d0f0cfc40791e
|
4
|
+
data.tar.gz: f0dde7708dc206d108d991227c4c98a51d2d2b36f685f51f147c7e222f7d24e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc81387bc885f05ae1f4f75c01994d6c715df9468d423dc6e61faa058dc5ac927add038b1eba3db619e5fe57123397dca8067bd910b43d2b591dc981d4892f59
|
7
|
+
data.tar.gz: cecae554a9af3dad5de7652d4ba6ee13bade61443e381f142e0493e1383b7abee2cfb185eaa43ca5d23613db6c87fbd703e62d61e3ad825c6763d918f80491e2
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -6,6 +6,7 @@ require "logstash/timestamp"
|
|
6
6
|
require "logstash/plugin_mixins/aws_config"
|
7
7
|
require "logstash/errors"
|
8
8
|
require "logstash/inputs/sqs_s3/patch"
|
9
|
+
require "multiple_files_gzip_reader"
|
9
10
|
|
10
11
|
# Forcibly load all modules marked to be lazily loaded.
|
11
12
|
#
|
@@ -178,10 +179,10 @@ class LogStash::Inputs::SQSS3 < LogStash::Inputs::Threadable
|
|
178
179
|
# verify downloaded content size
|
179
180
|
if response.content_length == record['s3']['object']['size'] then
|
180
181
|
body = response.body
|
181
|
-
# if necessary unzip
|
182
|
-
if response.content_encoding == "gzip" or record['s3']['object']['key'].end_with?(".gz") then
|
182
|
+
# if necessary unzip. Note: Firehose is automatically gzipped but does NOT include the content encoding or the extension.
|
183
|
+
if response.content_encoding == "gzip" or record['s3']['object']['key'].end_with?(".gz") or record['s3']['object']['key'].include?("/firehose/") then
|
183
184
|
begin
|
184
|
-
temp =
|
185
|
+
temp = MultipleFilesGzipReader.new(body)
|
185
186
|
rescue => e
|
186
187
|
@logger.warn("content is marked to be gzipped but can't unzip it, assuming plain text", :bucket => record['s3']['bucket']['name'], :object => record['s3']['object']['key'], :error => e)
|
187
188
|
temp = body
|
@@ -196,7 +197,8 @@ class LogStash::Inputs::SQSS3 < LogStash::Inputs::Threadable
|
|
196
197
|
lines = body.read.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: "\u2370").split(/\n/)
|
197
198
|
|
198
199
|
# Set the codec to json if required, otherwise the default is plain text
|
199
|
-
if response.content_type == "application/json" then
|
200
|
+
if response.content_type == "application/json" or record['s3']['object']['key'].include?("/firehose/") then
|
201
|
+
p "its firehose!!!"
|
200
202
|
@codec = @jsonCodec
|
201
203
|
|
202
204
|
if response.content_encoding != "gzip" then
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-input-sqs_s3'
|
3
|
-
s.version = '1.1.
|
3
|
+
s.version = '1.1.16'
|
4
4
|
s.licenses = ['Apache License (2.0)']
|
5
5
|
s.summary = "Get logs from AWS s3 buckets as issued by an object-created event via 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. Full credit goes to Heiko Finzel. Republishing this gem to support Logstash 5."
|
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
# Gem dependencies
|
22
22
|
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
|
23
23
|
|
24
|
+
s.add_dependency "multiple_files_gzip_reader"
|
24
25
|
s.add_runtime_dependency 'logstash-codec-json'
|
25
26
|
s.add_runtime_dependency "logstash-mixin-aws", ">= 1.0.0"
|
26
27
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-sqs_s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Heiko Finzel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -30,6 +30,20 @@ dependencies:
|
|
30
30
|
- - "<="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '2.99'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
35
|
+
requirements:
|
36
|
+
- - ">="
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
name: multiple_files_gzip_reader
|
40
|
+
prerelease: false
|
41
|
+
type: :runtime
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
33
47
|
- !ruby/object:Gem::Dependency
|
34
48
|
requirement: !ruby/object:Gem::Requirement
|
35
49
|
requirements:
|