logstash-input-s3-sns-sqs 1.1.7 → 1.1.8
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 +2 -0
- data/lib/logstash/inputs/s3snssqs.rb +8 -4
- data/logstash-input-s3-sns-sqs.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b47498a9996e26b8c9c26fa4f0b8b4162276a15
|
4
|
+
data.tar.gz: 63f8aa74667466c11584aac319ef43028f386a49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b4ce293106f3dc37405c52d6b571aea478bb65f4deea3642da7e72e1cc49120962fca54e3ae84b4438d39224f42c5b41dd7d9da00103e07889866152eeb4f68
|
7
|
+
data.tar.gz: aa5d8b70deae51d4161d182dfd425cc8d2c49d5b595c78a5d8608426cd9bf6fe284c372e4aa28528f0e01235ec80cbee3412f42623576ab448bb7004c5beb4ca
|
data/CHANGELOG.md
CHANGED
@@ -93,6 +93,8 @@ class LogStash::Inputs::S3SNSSQS < LogStash::Inputs::Threadable
|
|
93
93
|
config :queue_owner_aws_account_id, :validate => :string, :required => false
|
94
94
|
# Whether to delete files from S3 after processing.
|
95
95
|
config :delete_on_success, :validate => :boolean, :default => false
|
96
|
+
# Whether the event is processed though an SNS to SQS. (S3>SNS>SQS = true |S3>SQS=false)
|
97
|
+
config :from_sns, :validate => :boolean, :default => true
|
96
98
|
|
97
99
|
attr_reader :poller
|
98
100
|
attr_reader :s3
|
@@ -129,14 +131,16 @@ class LogStash::Inputs::S3SNSSQS < LogStash::Inputs::Threadable
|
|
129
131
|
def handle_message(message, queue)
|
130
132
|
hash = JSON.parse message.body
|
131
133
|
@logger.debug("handle_message", :hash => hash, :message => message)
|
134
|
+
#If send via sns there is an additional JSON layer
|
135
|
+
if @from_sns then
|
136
|
+
hash = JSON.parse(hash['Message'])
|
137
|
+
end
|
132
138
|
# there may be test events sent from the s3 bucket which won't contain a Records array,
|
133
139
|
# we will skip those events and remove them from queue
|
134
|
-
|
135
|
-
message = JSON.parse(hash['Message'])
|
136
|
-
if message['Records'] then
|
140
|
+
if hash['Records'] then
|
137
141
|
# typically there will be only 1 record per event, but since it is an array we will
|
138
142
|
# treat it as if there could be more records
|
139
|
-
|
143
|
+
hash['Records'].each do |record|
|
140
144
|
@logger.debug("We found a record", :record => record)
|
141
145
|
# in case there are any events with Records that aren't s3 object-created events and can't therefore be
|
142
146
|
# processed by this plugin, we will skip them and remove them from queue
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-input-s3-sns-sqs'
|
3
|
-
s.version = '1.1.
|
3
|
+
s.version = '1.1.8'
|
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 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: 1.1.
|
4
|
+
version: 1.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Herweg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|