logstash-input-sqs_s3 1.1.12 → 1.1.13

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: d9a94aef8c03a9df8145522e48b48942a6fb355675cbb244e54d07b4bfc78fb7
4
- data.tar.gz: ed70e0cb422c557900aa59b507527c5fdc59e34e4d06c45ac379906d9dd3e1e3
3
+ metadata.gz: 38979276fe9dbd7f451d3836d7f2d6dc84987188df31e246e25adfe6b1a5b826
4
+ data.tar.gz: ac0eaf21a90af6d50479b6cc68c05718696db5312ac1d2034e3876fbbe048099
5
5
  SHA512:
6
- metadata.gz: c5029542e78e3671d4a29f152f719fb651f184a774cd2608933e65310c03fd5a4977e549bfeb68920b68b6cb1de32b952743e1e76196912d8da516bcd389dd01
7
- data.tar.gz: 1f5deb0bc501959d6c6fa7220ac075c1dcb8a71ee89e938df54d50baea2bd5511f6679291fb99a175eed052621d0569820dd5c6e1e47a5f14a3b60c507f2d39c
6
+ metadata.gz: ec415788a4155790432e73d1a27f60db857b8847b110fc534e824ddae9f82142c4199f5c9526d79ad30511a19bccc317511fd462f61855db554921cf54f15e33
7
+ data.tar.gz: c53bb19b0fbd95d74ca73b8bd1c0ea8d9c92b3bb27c3329848260a58421cb468f9c18a9ec182b90be3a4c0c06befaa387ea057cb8f4ac9997c86919788b4c65f
@@ -1,3 +1,6 @@
1
+ ## 1.1.13
2
+ - Added support for processing plain text json by removing whitespaces first
3
+
1
4
  ## 1.1.12
2
5
  - Updated codec use based on content type and resolved compilation error
3
6
 
@@ -193,14 +193,23 @@ class LogStash::Inputs::SQSS3 < LogStash::Inputs::Threadable
193
193
  # assess currently running load (in MB)
194
194
  @current_load += (record['s3']['object']['size'].to_f / 1000000)
195
195
 
196
+ lines = body.read.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: "\u2370")
197
+
196
198
  # Set the codec to json if required, otherwise the default is plain text
197
199
  if response.content_type == "application/json" then
198
200
  @codec = @jsonCodec
201
+
202
+ if response.content_encoding != "gzip" then
203
+ # If it's json in plain text, need to remove whitespaces
204
+ lines = lines.gsub(/\s+/, "").split(/\n/)
205
+ else
206
+ lines = lines.split(/\n/)
207
+ end
199
208
  else
200
209
  @codec = @plainCodec
210
+ lines = lines.split(/\n/)
201
211
  end
202
212
 
203
- lines = body.read.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: "\u2370").split(/\n/)
204
213
  lines.each do |line|
205
214
  @codec.decode(line) do |event|
206
215
  decorate(event)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-sqs_s3'
3
- s.version = '1.1.12'
3
+ s.version = '1.1.13'
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."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-sqs_s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.12
4
+ version: 1.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Heiko Finzel