logstash-input-sqs_s3 1.1.15 → 1.1.16

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7810b377cc95a8256dc0b9f331cf0b99cb0567fbc87e82dba5f586e9454d87a8
4
- data.tar.gz: 7e8533137aa8aac6d3f47b0ba58835f95dc1a34dc088e498a767bdf7358d49d3
3
+ metadata.gz: acadffc6b1aa893595029bf29b3e7ff63f24d3b88705436bb33d0f0cfc40791e
4
+ data.tar.gz: f0dde7708dc206d108d991227c4c98a51d2d2b36f685f51f147c7e222f7d24e2
5
5
  SHA512:
6
- metadata.gz: 6fb3e428faa96009cbe150a0317c9c584113170a92ad908b37399f665ea2c7797db5bad48948a5c8fec49b21d47acf7fb5fd8b5dc5d0b84906c0f04badb380b1
7
- data.tar.gz: 4cc96ead08ac6c7e59c0ab5c8df323dabd99dddfe94be7d899145c91c93f4e8c8d3c48cd5c964bd85bb341185fd99271d83bb65baa5ebf403234704a64c31a04
6
+ metadata.gz: fc81387bc885f05ae1f4f75c01994d6c715df9468d423dc6e61faa058dc5ac927add038b1eba3db619e5fe57123397dca8067bd910b43d2b591dc981d4892f59
7
+ data.tar.gz: cecae554a9af3dad5de7652d4ba6ee13bade61443e381f142e0493e1383b7abee2cfb185eaa43ca5d23613db6c87fbd703e62d61e3ad825c6763d918f80491e2
@@ -1,3 +1,6 @@
1
+ ## 1.1.16
2
+ - Fixed not being able to read multiple gzipped file streams in a single file issue
3
+
1
4
  ## 1.1.15
2
5
  - Fixed throttle error
3
6
 
data/Gemfile CHANGED
@@ -1,2 +1,3 @@
1
1
  source 'https://rubygems.org'
2
- gemspec
2
+ gemspec
3
+ gem 'multiple_files_gzip_reader', :git => 'https://github.com/exAspArk/multiple_files_gzip_reader.git'
@@ -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 = Zlib::GzipReader.new(body)
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.15'
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.15
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: 2017-11-16 00:00:00.000000000 Z
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: