logstash-output-sqs 5.1.1 → 5.1.2
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/docs/index.asciidoc +10 -1
- data/lib/logstash/outputs/sqs.rb +10 -3
- data/logstash-output-sqs.gemspec +1 -1
- data/spec/integration/outputs/sqs_spec.rb +8 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 365f17a24fe817b8800e38e10114d9c86a9d458c67e6ade37feb97c2f0d0c3d7
|
4
|
+
data.tar.gz: b4ccb7477ccf35f1f17e726918d215ecbc0d9bbc2127cc59c9f4f343eb9b0751
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33611f4a29e91d5b9f5e237c75a2dcd7e1b0e8eea6050a2f5082ad910a669a10fbc73ace0f8a644531ecd4116f481850c520ddbd6526c07094187e308316f7bc
|
7
|
+
data.tar.gz: 6a4ce01cc01910008d1377801373d2dd19c4959b947430a1002e2f31d5f42e1f51eebbe64492d9131d80110a8fbba3894fcdb665ca9f8346ef2d69caeb93979b
|
data/CHANGELOG.md
CHANGED
data/docs/index.asciidoc
CHANGED
@@ -181,6 +181,15 @@ URI to proxy server if required
|
|
181
181
|
The name of the target SQS queue. Note that this is just the name of the
|
182
182
|
queue, not the URL or ARN.
|
183
183
|
|
184
|
+
[id="plugins-{type}s-{plugin}-queue_owner_aws_account_id"]
|
185
|
+
===== `queue_owner_aws_account_id`
|
186
|
+
|
187
|
+
* Value type is <<string,string>>
|
188
|
+
* There is no default value for this setting.
|
189
|
+
|
190
|
+
The owning account id of the target SQS queue. IAM permissions need to be
|
191
|
+
configured on both accounts to function.
|
192
|
+
|
184
193
|
[id="plugins-{type}s-{plugin}-region"]
|
185
194
|
===== `region`
|
186
195
|
|
@@ -228,4 +237,4 @@ The AWS Session token for temporary credential
|
|
228
237
|
[id="plugins-{type}s-{plugin}-common-options"]
|
229
238
|
include::{include_path}/{type}.asciidoc[]
|
230
239
|
|
231
|
-
:default_codec!:
|
240
|
+
:default_codec!:
|
data/lib/logstash/outputs/sqs.rb
CHANGED
@@ -87,6 +87,10 @@ class LogStash::Outputs::SQS < LogStash::Outputs::Base
|
|
87
87
|
# queue, not the URL or ARN.
|
88
88
|
config :queue, :validate => :string, :required => true
|
89
89
|
|
90
|
+
# Account ID of the AWS account which owns the queue. Note IAM permissions
|
91
|
+
# need to be configured on both accounts to function.
|
92
|
+
config :queue_owner_aws_account_id, :validate => :string, :required => false
|
93
|
+
|
90
94
|
public
|
91
95
|
def register
|
92
96
|
@sqs = Aws::SQS::Client.new(aws_options_hash)
|
@@ -98,9 +102,12 @@ class LogStash::Outputs::SQS < LogStash::Outputs::Base
|
|
98
102
|
end
|
99
103
|
|
100
104
|
begin
|
101
|
-
|
102
|
-
|
103
|
-
|
105
|
+
params = { queue_name: @queue }
|
106
|
+
params[:queue_owner_aws_account_id] = @queue_owner_aws_account_id if @queue_owner_aws_account_id
|
107
|
+
|
108
|
+
@logger.debug('Connecting to SQS queue', params.merge(region: region))
|
109
|
+
@queue_url = @sqs.get_queue_url(params)[:queue_url]
|
110
|
+
@logger.info('Connected to SQS queue successfully', params.merge(region: region))
|
104
111
|
rescue Aws::SQS::Errors::ServiceError => e
|
105
112
|
@logger.error('Failed to connect to SQS', :error => e)
|
106
113
|
raise LogStash::ConfigurationError, 'Verify the SQS queue name and your credentials'
|
data/logstash-output-sqs.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-output-sqs'
|
4
|
-
s.version = '5.1.
|
4
|
+
s.version = '5.1.2'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Pushes events to an Amazon Web Services Simple Queue Service queue"
|
7
7
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
@@ -47,6 +47,14 @@ describe LogStash::Outputs::SQS, :integration => true do
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
+
context 'with a nonpermissive account id' do
|
51
|
+
let(:config) { super.merge('queue_owner_aws_account_id' => '123456789012')}
|
52
|
+
|
53
|
+
it 'raises a configuration error' do
|
54
|
+
expect { subject.register }.to raise_error(LogStash::ConfigurationError)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
50
58
|
context 'with valid configuration' do
|
51
59
|
it 'does not raise an error' do
|
52
60
|
expect { subject.register }.not_to raise_error
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-sqs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.
|
4
|
+
version: 5.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
118
|
rubyforge_project:
|
119
|
-
rubygems_version: 2.6.
|
119
|
+
rubygems_version: 2.6.13
|
120
120
|
signing_key:
|
121
121
|
specification_version: 4
|
122
122
|
summary: Pushes events to an Amazon Web Services Simple Queue Service queue
|