fluent-plugin-aws-sqs 1.0.20 → 1.0.21
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/README.md +78 -0
- data/lib/fluent/plugin/in_sqs.rb +3 -0
- data/lib/fluent/plugin/version.rb +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: 0e8fc6c47ea4b1852d40fe5a25f149fa6254cb6b073286fb272636668b92d7cb
|
|
4
|
+
data.tar.gz: 354f3f79c0fbe0c06a0398953ed0193c65d613531eb9b62263fcfa76484a9078
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b690232325fb6ef1e7e66f4a6b6e8e7305a331b064c05c0154b3c8d047b5e7c9c3362d69c221101264aad7ef158c40e7dd7e81fb53be57c77d113cf3ed807d91
|
|
7
|
+
data.tar.gz: 8aa0072f3589d017b4c73439849fd2af9ab09097bebfebecf770d09729e0a8362e481af49fa2e1d9923e5369f292315face7a8c371fb93421f3145f34d829b69
|
data/README.md
CHANGED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# fluent-plugin-aws-sqs
|
|
2
|
+
|
|
3
|
+
## General
|
|
4
|
+
This plugin can read data from an AWS SQS.
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
`fluent-gem install fluent-plugin-aws-sqs --no-document --version=1.0.7`
|
|
8
|
+
|
|
9
|
+
## Config
|
|
10
|
+
```
|
|
11
|
+
<source>
|
|
12
|
+
|
|
13
|
+
type sqs
|
|
14
|
+
|
|
15
|
+
# following attribute is required
|
|
16
|
+
|
|
17
|
+
sqs_url {queue_url}
|
|
18
|
+
tag {tag_value}
|
|
19
|
+
|
|
20
|
+
# following attributes are required if you don't use IAM Role nor export credentials to ENV
|
|
21
|
+
|
|
22
|
+
aws_key_id {your_aws_key_id}
|
|
23
|
+
aws_sec_key {your_aws_secret_key}
|
|
24
|
+
|
|
25
|
+
# following attributes are optional
|
|
26
|
+
|
|
27
|
+
attribute_name_to_extract {message custom attribute name, will be extract the string value}
|
|
28
|
+
|
|
29
|
+
region {your_region}
|
|
30
|
+
|
|
31
|
+
### region list ###
|
|
32
|
+
# Asia Pacific (Tokyo) [Default] : ap-northeast-1
|
|
33
|
+
# Asia Pacific (Singapore) : ap-southeast-1
|
|
34
|
+
# US-East (Virginia) : us-east-1
|
|
35
|
+
# US-West (Oregon) : us-west-2
|
|
36
|
+
# US-West (N.California) : us-west-1
|
|
37
|
+
# EU-West (Ireland) : eu-west-1
|
|
38
|
+
# South America (São Paulo) : sa-east-1
|
|
39
|
+
|
|
40
|
+
receive_interval {receive_interval_seconds}
|
|
41
|
+
|
|
42
|
+
max_number_of_messages {max_number_of_messages}
|
|
43
|
+
|
|
44
|
+
wait_time_seconds {receive_message_wait_time_seconds}
|
|
45
|
+
|
|
46
|
+
delete_message {delete_message_after_receiving}
|
|
47
|
+
|
|
48
|
+
</source>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Pre-requisites
|
|
52
|
+
Daemon should be provided with proper credentials and (IAM) permissions to use the SQS queue provided in config. Also, since AWS encourage costumers to use KMS to encrypt data sent to SQS, fluentd agent should also recieve permissions to decrypt KMS keys.
|
|
53
|
+
|
|
54
|
+
### Sample IAM Policy
|
|
55
|
+
```
|
|
56
|
+
{
|
|
57
|
+
"Version": "2012-10-17",
|
|
58
|
+
"Statement": [
|
|
59
|
+
{
|
|
60
|
+
"Effect": "Allow",
|
|
61
|
+
"Action": [
|
|
62
|
+
"kms:Decrypt"
|
|
63
|
+
],
|
|
64
|
+
"Resource": "<<KMS_KEY_ARN>>"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"Effect": "Allow",
|
|
68
|
+
"Action": [
|
|
69
|
+
"sqs:ReceiveMessage",
|
|
70
|
+
"sqs:DeleteMessage",
|
|
71
|
+
"sqs:DeleteMessageBatch"
|
|
72
|
+
],
|
|
73
|
+
"Resource": "<<SQS_QUEUE_ARN>>"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
<b>Note:</b> `DeleteMessage` permission is relevant only if `delete_message` is set to `true` in configuration file.
|
data/lib/fluent/plugin/in_sqs.rb
CHANGED
|
@@ -87,6 +87,9 @@ module Fluent::Plugin
|
|
|
87
87
|
if @attribute_name_to_extract.to_s.strip.length > 0
|
|
88
88
|
record[@attribute_name_to_extract] = message.message_attributes[@attribute_name_to_extract].string_value.to_s
|
|
89
89
|
end
|
|
90
|
+
|
|
91
|
+
log.info("the message is")
|
|
92
|
+
log.info(record)
|
|
90
93
|
|
|
91
94
|
record
|
|
92
95
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-aws-sqs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.21
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shai Moria
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2019-
|
|
13
|
+
date: 2019-10-02 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: fluentd
|