logstash-input-sqs_s3 1.1.14 → 1.1.15
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/CHANGELOG.md +3 -0
- data/lib/logstash/inputs/sqs_s3.rb +10 -12
- data/logstash-input-sqs_s3.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: 7810b377cc95a8256dc0b9f331cf0b99cb0567fbc87e82dba5f586e9454d87a8
|
4
|
+
data.tar.gz: 7e8533137aa8aac6d3f47b0ba58835f95dc1a34dc088e498a767bdf7358d49d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fb3e428faa96009cbe150a0317c9c584113170a92ad908b37399f665ea2c7797db5bad48948a5c8fec49b21d47acf7fb5fd8b5dc5d0b84906c0f04badb380b1
|
7
|
+
data.tar.gz: 4cc96ead08ac6c7e59c0ab5c8df323dabd99dddfe94be7d899145c91c93f4e8c8d3c48cd5c964bd85bb341185fd99271d83bb65baa5ebf403234704a64c31a04
|
data/CHANGELOG.md
CHANGED
@@ -193,7 +193,7 @@ 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")
|
196
|
+
lines = body.read.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: "\u2370").split(/\n/)
|
197
197
|
|
198
198
|
# Set the codec to json if required, otherwise the default is plain text
|
199
199
|
if response.content_type == "application/json" then
|
@@ -201,13 +201,11 @@ class LogStash::Inputs::SQSS3 < LogStash::Inputs::Threadable
|
|
201
201
|
|
202
202
|
if response.content_encoding != "gzip" then
|
203
203
|
# If it's json in plain text, need to remove whitespaces
|
204
|
-
|
205
|
-
else
|
206
|
-
lines = lines.split(/\n/)
|
204
|
+
# TODO...
|
207
205
|
end
|
208
206
|
else
|
209
207
|
@codec = @plainCodec
|
210
|
-
lines = lines.split(/\n/)
|
208
|
+
#lines = lines.split(/\n/)
|
211
209
|
end
|
212
210
|
|
213
211
|
lines.each do |line|
|
@@ -259,15 +257,15 @@ class LogStash::Inputs::SQSS3 < LogStash::Inputs::Threadable
|
|
259
257
|
# Throttle requests is overloaded by big files
|
260
258
|
if @current_load > @max_load_before_throttling/1000000 then
|
261
259
|
throttle_seconds_sleep = @seconds_to_throttle * (@current_load / (@max_load_before_throttling.to_f/1000000)).floor
|
262
|
-
@logger.warn("**********Current load has exceeded " + (@max_load_before_throttling.to_f/1000000).to_s + " MB. Load is currently: " + @current_load.to_s + ". Throttling back by " + throttle_seconds_sleep)
|
260
|
+
@logger.warn("**********Current load has exceeded " + (@max_load_before_throttling.to_f/1000000).to_s + " MB. Load is currently: " + @current_load.to_s + ". Throttling back by " + throttle_seconds_sleep.to_s)
|
263
261
|
|
262
|
+
# Cap the throttle time to 1 min
|
264
263
|
if(throttle_seconds_sleep != 0) then
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
sleep(120)
|
264
|
+
if(throttle_seconds_sleep > 60) then
|
265
|
+
sleep(60)
|
266
|
+
else
|
267
|
+
sleep(throttle_seconds_sleep)
|
268
|
+
end
|
271
269
|
end
|
272
270
|
end
|
273
271
|
|
@@ -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.15'
|
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,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.15
|
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-
|
11
|
+
date: 2017-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|