fluent-plugin-kinesis 1.3.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -23
- data/CHANGELOG.md +13 -0
- data/Gemfile +9 -9
- data/LICENSE.txt +201 -40
- data/Makefile +24 -31
- data/README.md +179 -308
- data/Rakefile +9 -13
- data/benchmark/task.rake +96 -58
- data/fluent-plugin-kinesis.gemspec +15 -19
- data/gemfiles/Gemfile.fluentd-0.12 +10 -10
- data/lib/fluent/plugin/kinesis.rb +166 -0
- data/lib/fluent/plugin/kinesis_helper/aggregator.rb +99 -0
- data/lib/fluent/plugin/kinesis_helper/api.rb +152 -121
- data/lib/fluent/plugin/kinesis_helper/client.rb +125 -12
- data/lib/fluent/plugin/out_kinesis_firehose.rb +40 -27
- data/lib/fluent/plugin/out_kinesis_streams.rb +51 -30
- data/lib/fluent/plugin/out_kinesis_streams_aggregated.rb +76 -0
- data/lib/fluent_plugin_kinesis/version.rb +10 -10
- metadata +18 -70
- data/README-v0.4.md +0 -348
- data/benchmark/dummy.conf +0 -0
- data/gemfiles/Gemfile.aws-sdk-2.4 +0 -20
- data/gemfiles/Gemfile.fluentd-0.10.58 +0 -20
- data/gemfiles/Gemfile.fluentd-0.14.11 +0 -20
- data/gemfiles/Gemfile.ruby-2.0 +0 -21
- data/gemfiles/Gemfile.ruby-2.1 +0 -21
- data/lib/fluent/plugin/kinesis_helper.rb +0 -36
- data/lib/fluent/plugin/kinesis_helper/class_methods.rb +0 -123
- data/lib/fluent/plugin/kinesis_helper/credentials.rb +0 -51
- data/lib/fluent/plugin/kinesis_helper/error.rb +0 -43
- data/lib/fluent/plugin/kinesis_helper/format.rb +0 -85
- data/lib/fluent/plugin/kinesis_helper/initialize.rb +0 -59
- data/lib/fluent/plugin/kinesis_helper/kpl.rb +0 -82
- data/lib/fluent/plugin/out_kinesis.rb +0 -323
- data/lib/fluent/plugin/out_kinesis_producer.rb +0 -48
- data/lib/fluent/plugin/patched_detach_process_impl.rb +0 -103
- data/lib/kinesis_producer.rb +0 -24
- data/lib/kinesis_producer/binary.rb +0 -10
- data/lib/kinesis_producer/daemon.rb +0 -270
- data/lib/kinesis_producer/library.rb +0 -122
- data/lib/kinesis_producer/protobuf/config.pb.rb +0 -66
- data/lib/kinesis_producer/protobuf/messages.pb.rb +0 -151
- data/lib/kinesis_producer/tasks/binary.rake +0 -73
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24d75eb607afb3a1a251ab9bac156cde85e5053e
|
4
|
+
data.tar.gz: 30bb3774c5c3f9f8aa5f921ed8e78a6bc49e495e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b8d65b4999dc9ad78f88119ee166649dd96b3df1f1acadd707134333f14aa50f4052b58ca2870712e34f5a0bfd583a21c208c71e58538fd60cf6bd7d66e127d
|
7
|
+
data.tar.gz: 598e0b74f91110529ea4a89e22f1d62b5b8f55dd5860d76980001be4e4a7cc57514767fa58e7892741002794fec89c4537fe494dd2ab73e14c47871f8bbf1bb8
|
data/.travis.yml
CHANGED
@@ -2,33 +2,12 @@ language: ruby
|
|
2
2
|
|
3
3
|
matrix:
|
4
4
|
include:
|
5
|
-
- rvm: 2.
|
6
|
-
os: linux
|
7
|
-
gemfile: gemfiles/Gemfile.ruby-2.0
|
8
|
-
- rvm: 2.1.10
|
9
|
-
os: linux
|
10
|
-
gemfile: gemfiles/Gemfile.ruby-2.1
|
11
|
-
- rvm: 2.2.6
|
5
|
+
- rvm: 2.4.1
|
12
6
|
os: linux
|
13
7
|
gemfile: Gemfile
|
14
|
-
- rvm: 2.
|
15
|
-
os: linux
|
16
|
-
gemfile: Gemfile
|
17
|
-
- rvm: 2.4.0
|
18
|
-
os: linux
|
19
|
-
gemfile: Gemfile
|
20
|
-
- rvm: 2.3.3
|
21
|
-
os: linux
|
22
|
-
gemfile: gemfiles/Gemfile.fluentd-0.10.58
|
23
|
-
- rvm: 2.3.3
|
8
|
+
- rvm: 2.1.10
|
24
9
|
os: linux
|
25
10
|
gemfile: gemfiles/Gemfile.fluentd-0.12
|
26
|
-
- rvm: 2.3.3
|
27
|
-
os: linux
|
28
|
-
gemfile: gemfiles/Gemfile.fluentd-0.14.11
|
29
|
-
- rvm: 2.3.3
|
30
|
-
os: linux
|
31
|
-
gemfile: gemfiles/Gemfile.aws-sdk-2.4
|
32
11
|
|
33
12
|
script: bundle exec rake test
|
34
13
|
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2.0.0
|
4
|
+
|
5
|
+
- Feature - Add `kinesis_streams_aggregated` ouput plugin [#107](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/107)
|
6
|
+
- Feature - Support fluentd worker model [#104](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/104)
|
7
|
+
- Feature - Support AWS SDK for Ruby v3 [#102](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/102)
|
8
|
+
- Enhancement - Refactor class design [#103](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/103)
|
9
|
+
- Enhancement - More configuration for AssumeRole [#63](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/63)
|
10
|
+
- Enhancement - Refactor credentials helper [#94](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/94)
|
11
|
+
- Enhancement - Revisit backoff logic [#69](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/69)
|
12
|
+
- Enhancement - Support compressing output [#98](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/98)
|
13
|
+
- Enhancement - Support nanosecond time_key format [#124](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/124)
|
14
|
+
- License - Move back to Apache License Version 2.0
|
15
|
+
|
3
16
|
## 1.3.0
|
4
17
|
|
5
18
|
- Feature - Log KPL stdout/err to logger [#129](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/129) [#130](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/130)
|
data/Gemfile
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
#
|
2
|
-
#
|
2
|
+
# Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
3
|
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
|
+
# may not use this file except in compliance with the License. A copy of
|
6
|
+
# the License is located at
|
7
7
|
#
|
8
|
-
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
9
|
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
10
|
+
# or in the "license" file accompanying this file. This file is
|
11
|
+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
12
|
+
# ANY KIND, either express or implied. See the License for the specific
|
13
|
+
# language governing permissions and limitations under the License.
|
14
14
|
|
15
15
|
source 'https://rubygems.org'
|
16
16
|
|
data/LICENSE.txt
CHANGED
@@ -1,40 +1,201 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
data/Makefile
CHANGED
@@ -1,49 +1,42 @@
|
|
1
1
|
#
|
2
|
-
#
|
2
|
+
# Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
3
|
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
|
+
# may not use this file except in compliance with the License. A copy of
|
6
|
+
# the License is located at
|
7
7
|
#
|
8
|
-
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
9
|
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
10
|
+
# or in the "license" file accompanying this file. This file is
|
11
|
+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
12
|
+
# ANY KIND, either express or implied. See the License for the specific
|
13
|
+
# language governing permissions and limitations under the License.
|
14
14
|
|
15
|
-
.PHONY:
|
15
|
+
.PHONY: run run-v0.12 test test-v.012 install $(wildcard test/test_*.rb) $(wildcard test/**/test_*.rb) benchmark benchmark-remote
|
16
16
|
|
17
17
|
all:
|
18
18
|
bundle install
|
19
|
-
|
19
|
+
|
20
|
+
run:
|
21
|
+
bundle exec fluentd -v
|
22
|
+
|
23
|
+
run-v0.12:
|
24
|
+
BUNDLE_GEMFILE=./gemfiles/Gemfile.fluentd-0.12 bundle exec fluentd -v
|
20
25
|
|
21
26
|
test:
|
22
27
|
bundle exec rake test
|
23
28
|
|
29
|
+
test-v.012:
|
30
|
+
BUNDLE_GEMFILE=./gemfiles/Gemfile.fluentd-0.12 bundle exec rake test
|
31
|
+
|
24
32
|
install:
|
25
33
|
bundle exec rake install:local
|
26
34
|
|
27
|
-
benchmark: benchmark-streams benchmark-producer
|
28
|
-
|
29
|
-
benchmark-streams:
|
30
|
-
bundle exec rake benchmark TYPE=streams
|
31
|
-
|
32
|
-
benchmark-producer:
|
33
|
-
bundle exec rake benchmark TYPE=producer
|
34
|
-
|
35
|
-
hello:
|
36
|
-
echo Hello World | bundle exec fluent-cat --none dummy
|
37
|
-
|
38
35
|
$(wildcard test/test_*.rb) $(wildcard test/**/test_*.rb):
|
39
36
|
bundle exec rake test TEST=$@
|
40
37
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
-or -name 'fluent-plugin-kinesis.gemspec' \
|
47
|
-
-or -name '*.rake' \
|
48
|
-
-or -name '*.rb' \
|
49
|
-
\) -exec sed -i '' -e 's/Copyright 2014-2017/Copyright 2014-2017/' {} \;
|
38
|
+
benchmark:
|
39
|
+
bundle exec rake benchmark:local
|
40
|
+
|
41
|
+
benchmark-remote:
|
42
|
+
bundle exec rake benchmark:remote
|
data/README.md
CHANGED
@@ -1,23 +1,16 @@
|
|
1
1
|
# Fluent plugin for Amazon Kinesis
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/awslabs/aws-fluent-plugin-kinesis.svg?branch=master)](https://travis-ci.org/awslabs/aws-fluent-plugin-kinesis)
|
3
|
+
[![Gitter](https://badges.gitter.im/awslabs/aws-fluent-plugin-kinesis.svg)](https://gitter.im/awslabs/aws-fluent-plugin-kinesis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Build Status](https://travis-ci.org/awslabs/aws-fluent-plugin-kinesis.svg?branch=master)](https://travis-ci.org/awslabs/aws-fluent-plugin-kinesis)
|
4
4
|
|
5
5
|
[Fluentd][fluentd] output plugin
|
6
|
-
that sends events to [Amazon Kinesis Streams][streams]
|
6
|
+
that sends events to [Amazon Kinesis Streams][streams] and [Amazon Kinesis Firehose][firehose]. Also it supports [KPL Aggregated record format][kpl]. This gem includes three output plugins respectively:
|
7
7
|
|
8
8
|
- `kinesis_streams`
|
9
|
-
- `kinesis_producer`
|
10
9
|
- `kinesis_firehose`
|
10
|
+
- `kinesis_streams_aggregated`
|
11
11
|
|
12
12
|
Also, there is a [documentation on Fluentd official site][fluentd-doc-kinesis].
|
13
13
|
|
14
|
-
## Warning: `kinesis` is no longer supported
|
15
|
-
As of v1.0.0, `kinesis` plugin is no longer supported. Still you can use the plugin, but if you see the warn log below, please consider to use `kinesis_streams`.
|
16
|
-
|
17
|
-
[warn]: Deprecated warning: out_kinesis is no longer supported after v1.0.0. Please check out_kinesis_streams out.
|
18
|
-
|
19
|
-
If you still want to use `kinesis`, please see [the old README][old-readme].
|
20
|
-
|
21
14
|
## Installation
|
22
15
|
This fluentd plugin is available as the `fluent-plugin-kinesis` gem from RubyGems.
|
23
16
|
|
@@ -53,8 +46,8 @@ Or just download specify your Ruby library path. Below is the sample for specify
|
|
53
46
|
export RUBYLIB=$RUBYLIB:/path/to/aws-fluent-plugin-kinesis/lib
|
54
47
|
|
55
48
|
## Dependencies
|
56
|
-
* Ruby 2.
|
57
|
-
* Fluentd 0.
|
49
|
+
* Ruby 2.1.0+
|
50
|
+
* Fluentd 0.12.35+
|
58
51
|
|
59
52
|
## Basic Usage
|
60
53
|
Here are general procedures for using this plugin:
|
@@ -87,15 +80,6 @@ Assume you use Amazon EC2 instances with Instance profile. If you want to use sp
|
|
87
80
|
</match>
|
88
81
|
For more detail, see [Configuration: kinesis_streams](#configuration-kinesis_streams)
|
89
82
|
|
90
|
-
### kinesis_producer
|
91
|
-
<match your_tag>
|
92
|
-
@type kinesis_producer
|
93
|
-
region us-east-1
|
94
|
-
stream_name your_stream
|
95
|
-
partition_key key # Otherwise, use random partition key
|
96
|
-
</match>
|
97
|
-
For more detail, see [Configuration: kinesis_producer](#configuration-kinesis_producer)
|
98
|
-
|
99
83
|
### kinesis_firehose
|
100
84
|
<match your_tag>
|
101
85
|
@type kinesis_firehose
|
@@ -104,6 +88,16 @@ For more detail, see [Configuration: kinesis_producer](#configuration-kinesis_pr
|
|
104
88
|
</match>
|
105
89
|
For more detail, see [Configuration: kinesis_firehose](#configuration-kinesis_firehose)
|
106
90
|
|
91
|
+
### kinesis_streams_aggregated
|
92
|
+
<match your_tag>
|
93
|
+
@type kinesis_streams_aggregated
|
94
|
+
region us-east-1
|
95
|
+
stream_name your_stream
|
96
|
+
# Unlike kinesis_streams, there is no way to use dynamic partition key.
|
97
|
+
# fixed_partition_key or random.
|
98
|
+
</match>
|
99
|
+
For more detail, see [Configuration: kinesis_streams_aggregated](#configuration-kinesis_streams_aggregated)
|
100
|
+
|
107
101
|
### For better throughput
|
108
102
|
Add configuration like below:
|
109
103
|
|
@@ -116,346 +110,241 @@ Add configuration like below:
|
|
116
110
|
Note: Each value should be adjusted to your system by yourself.
|
117
111
|
|
118
112
|
## Configuration: Credentials
|
119
|
-
To put records into Amazon Kinesis Streams or Firehose, you need to provide AWS security credentials.
|
113
|
+
To put records into Amazon Kinesis Streams or Firehose, you need to provide AWS security credentials somehow. Without specifiying credentials in config file, this plugin automatically fetch credential just following AWS SDK for Ruby does (environment variable, shared profile, and instance profile).
|
120
114
|
|
121
|
-
|
115
|
+
This plugin uses the same configuration in [fluent-plugin-s3][fluent-plugin-s3].
|
122
116
|
|
123
|
-
|
124
|
-
- Use [**assume_role_credentials**](#assume_role_credentials) section if you set it
|
125
|
-
- Otherwise, default provider chain:
|
126
|
-
- [**aws_key_id**](#aws_key_id) and [**aws_sec_key**](#aws_sec_key)
|
127
|
-
- Environment variables (ex. `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, etc.)
|
128
|
-
- Default shared credentials (`default` in `~/.aws/credentials`)
|
129
|
-
- Instance profile (For Amazon EC2)
|
117
|
+
**aws_key_id**
|
130
118
|
|
131
|
-
|
132
|
-
|
119
|
+
AWS access key id. This parameter is required when your agent is not
|
120
|
+
running on EC2 instance with an IAM Role. When using an IAM role, make
|
121
|
+
sure to configure `instance_profile_credentials`. Usage can be found below.
|
133
122
|
|
134
|
-
|
135
|
-
AWS secret access key.
|
136
|
-
|
137
|
-
### shared_credentials
|
138
|
-
Use this config section to specify shared credential file path and profile name. If you want to use default profile (`default` in `~/.aws/credentials`), you don't have to specify here. For example, you can specify the config like below:
|
123
|
+
**aws_sec_key**
|
139
124
|
|
140
|
-
|
141
|
-
|
142
|
-
</shared_credentials>
|
125
|
+
AWS secret key. This parameter is required when your agent is not running
|
126
|
+
on EC2 instance with an IAM Role.
|
143
127
|
|
144
|
-
|
145
|
-
Profile name of the credential file.
|
128
|
+
**aws_iam_retries**
|
146
129
|
|
147
|
-
|
148
|
-
|
130
|
+
The number of attempts to make (with exponential backoff) when loading
|
131
|
+
instance profile credentials from the EC2 metadata service using an IAM
|
132
|
+
role. Defaults to 5 retries.
|
149
133
|
|
150
134
|
### assume_role_credentials
|
151
|
-
|
135
|
+
Typically, you use AssumeRole for cross-account access or federation.
|
136
|
+
|
137
|
+
<match *>
|
138
|
+
@type kinesis_streams
|
152
139
|
|
153
140
|
<assume_role_credentials>
|
154
|
-
role_arn
|
141
|
+
role_arn ROLE_ARN
|
142
|
+
role_session_name ROLE_SESSION_NAME
|
155
143
|
</assume_role_credentials>
|
156
|
-
|
157
|
-
#### role_arn
|
158
|
-
IAM Role to be assumed with [AssumeRole][assume_role].
|
159
|
-
|
160
|
-
#### external_id
|
161
|
-
A unique identifier that is used by third parties when [assuming roles][assmue_role] in their customers' accounts. Use this option with `role_arn` for third party cross account access. For detail, please see [How to Use an External ID When Granting Access to Your AWS Resources to a Third Party][external_id].
|
162
|
-
|
163
|
-
## Configuraion: Format
|
164
|
-
This plugin use `Fluent::TextFormatter` to serialize record to string. For more detail, see [formatter.rb]. Also, this plugin includes `Fluent::SetTimeKeyMixin` and `Fluent::SetTagKeyMixin` to use **include_time_key** and **include_tagkey**.
|
165
|
-
|
166
|
-
### formatter
|
167
|
-
Default `json`.
|
168
|
-
|
169
|
-
### include_time_key
|
170
|
-
Defalut `false`. If you want to include `time` field in your record, set `true`.
|
171
|
-
|
172
|
-
### include_tag_key
|
173
|
-
Defalut `false`. If you want to include `tag` field in your record, set `true`.
|
174
|
-
|
175
|
-
### data_key
|
176
|
-
If your record contains a field whose string should be sent to Amazon Kinesis directly (without formatter), use this parameter to specify the field. In that case, other fileds than **data_key** are thrown away and never sent to Amazon Kinesis. Default `nil`, which means whole record will be formatted and sent.
|
177
|
-
|
178
|
-
### log_truncate_max_size
|
179
|
-
Integer, default 0. When emitting the log entry, the message will be truncated by this size to avoid infinite loop when the log is also sent to Kinesis. The value 0 (default) means no truncation.
|
180
|
-
|
181
|
-
### reduce_max_size_error_message
|
182
|
-
Boolean, default false. When each record exceeds the maximum size, the original record is put on its error message. If this parameter is turned on, the error message will contain only summarized data to prevent large traffic generated by the error message.
|
183
|
-
|
184
|
-
## Configuration: kinesis_streams
|
185
|
-
Here are `kinesis_streams` specific configurations.
|
186
|
-
|
187
|
-
### stream_name
|
188
|
-
Name of the stream to put data.
|
189
|
-
|
190
|
-
### region
|
191
|
-
AWS region of your stream. It should be in form like `us-east-1`, `us-west-2`. Refer to [Regions and Endpoints in AWS General Reference][region] for supported regions.
|
192
|
-
|
193
|
-
Default `nil`, which means try to find from environment variable `AWS_REGION`.
|
194
|
-
|
195
|
-
### partition_key
|
196
|
-
A key to extract partition key from JSON object. Default `nil`, which means partition key will be generated randomly.
|
197
|
-
|
198
|
-
### retries_on_batch_request
|
199
|
-
Integer, default is 3. The plugin will put multiple records to Amazon Kinesis Streams in batches using PutRecords. A set of records in a batch may fail for reasons documented in the Kinesis Service API Reference for PutRecords. Failed records will be retried **retries_on_batch_request** times. If a record fails all retries an error log will be emitted.
|
200
|
-
|
201
|
-
### reset_backoff_if_success
|
202
|
-
Boolean, default `true`. If enabled, when after retrying, the next retrying checks the number of succeeded records on the former batch request and reset exponential backoff if there is any success. Because batch request could be composed by requests across shards, simple exponential backoff for the batch request wouldn't work some cases.
|
203
|
-
|
204
|
-
### batch_request_max_count
|
205
|
-
Integer, default 500. The number of max count of making batch request from record chunk. It can't exceed the default value because it's API limit.
|
206
|
-
|
207
|
-
### batch_request_max_size
|
208
|
-
Integer, default 5 * 1024 * 1024. The number of max size of making batch request from record chunk. It can't exceed the default value because it's API limit.
|
209
|
-
|
210
|
-
### http_proxy
|
211
|
-
HTTP proxy for API calling. Default `nil`.
|
212
|
-
|
213
|
-
### endpoint
|
214
|
-
API endpoint URL, for testing. Defalut `nil`.
|
215
|
-
|
216
|
-
### ssl_verify_peer
|
217
|
-
Boolean. Disable if you want to verify ssl conncetion, for testing. Default `true`.
|
218
|
-
|
219
|
-
### debug
|
220
|
-
Boolean. Enable if you need to debug Amazon Kinesis Firehose API call. Default is `false`.
|
221
|
-
|
222
|
-
## Configuration: kinesis_producer
|
223
|
-
Here are `kinesis_producer` specific configurations.
|
224
|
-
|
225
|
-
### stream_name
|
226
|
-
Name of the stream to put data.
|
227
|
-
|
228
|
-
### region
|
229
|
-
AWS region of your stream. It should be in form like `us-east-1`, `us-west-2`. Refer to [Regions and Endpoints in AWS General Reference][region] for supported regions.
|
230
|
-
|
231
|
-
Default `nil`, which means try to find from environment variable `AWS_REGION`. If both **region** and `AWS_REGION` are not defined, KPL will try to find region from Amazon EC2 metadata.
|
232
|
-
|
233
|
-
### partition_key
|
234
|
-
A key to extract partition key from JSON object. Default `nil`, which means partition key will be generated randomly.
|
235
|
-
|
236
|
-
### debug
|
237
|
-
Boolean. Enable if you need to debug Kinesis Producer Library metrics. Default is `false`.
|
238
|
-
|
239
|
-
### enable_kpl_logging
|
240
|
-
Boolean, default `false`. If you want to log KPL binary's stdout/err, make this parameter `true`.
|
241
|
-
|
242
|
-
### kinesis_producer
|
243
|
-
This section is configuration for Kinesis Producer Library. Almost all of description comes from [deault_config.propertites of KPL Java Sample Application][default_config.properties]. You should specify configurations below inside `<kinesis_producer>` section like:
|
244
|
-
|
245
|
-
<match your_tag>
|
246
|
-
@type kinesis_producer
|
247
|
-
region us-east-1
|
248
|
-
stream_name your_stream
|
249
|
-
<kinesis_producer>
|
250
|
-
record_max_buffered_time 10
|
251
|
-
</kinesis_producer>
|
252
144
|
</match>
|
253
145
|
|
254
|
-
|
255
|
-
Enable aggregation. With aggregation, multiple user records are packed into a single KinesisRecord. If disabled, each user record is sent in its own KinesisRecord.
|
256
|
-
|
257
|
-
If your records are small, enabling aggregation will allow you to put many more records than you would otherwise be able to for a shard before getting throttled.
|
146
|
+
See also:
|
258
147
|
|
259
|
-
|
148
|
+
* [Using IAM Roles - AWS Identity and Access
|
149
|
+
Management](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html)
|
150
|
+
* [Aws::STS::Client](http://docs.aws.amazon.com/sdkforruby/api/Aws/STS/Client.html)
|
151
|
+
* [Aws::AssumeRoleCredentials](http://docs.aws.amazon.com/sdkforruby/api/Aws/AssumeRoleCredentials.html)
|
260
152
|
|
261
|
-
|
262
|
-
Maximum number of items to pack into an aggregated record.
|
153
|
+
**role_arn (required)**
|
263
154
|
|
264
|
-
|
155
|
+
The Amazon Resource Name (ARN) of the role to assume.
|
265
156
|
|
266
|
-
|
267
|
-
Minimum: 1
|
268
|
-
Maximum (inclusive): 9223372036854775807
|
157
|
+
**role_session_name (required)**
|
269
158
|
|
270
|
-
|
271
|
-
Maximum number of bytes to pack into an aggregated Kinesis record.
|
159
|
+
An identifier for the assumed role session.
|
272
160
|
|
273
|
-
|
161
|
+
**policy**
|
274
162
|
|
275
|
-
|
163
|
+
An IAM policy in JSON format.
|
276
164
|
|
277
|
-
|
278
|
-
Minimum: 64
|
279
|
-
Maximum (inclusive): 1048576
|
165
|
+
**duration_seconds**
|
280
166
|
|
281
|
-
|
282
|
-
|
167
|
+
The duration, in seconds, of the role session. The value can range from
|
168
|
+
900 seconds (15 minutes) to 3600 seconds (1 hour). By default, the value
|
169
|
+
is set to 3600 seconds.
|
283
170
|
|
284
|
-
|
171
|
+
**external_id**
|
285
172
|
|
286
|
-
|
287
|
-
|
288
|
-
Maximum (inclusive): 500
|
173
|
+
A unique identifier that is used by third parties when assuming roles in
|
174
|
+
their customers' accounts.
|
289
175
|
|
290
|
-
|
291
|
-
Maximum amount of data to send with a PutRecords request.
|
176
|
+
### instance_profile_credentials
|
292
177
|
|
293
|
-
|
178
|
+
Retrieve temporary security credentials via HTTP request. This is useful on
|
179
|
+
EC2 instance.
|
294
180
|
|
295
|
-
|
296
|
-
|
297
|
-
Default: 5242880
|
298
|
-
Minimum: 52224
|
299
|
-
Maximum (inclusive): 9223372036854775807
|
300
|
-
|
301
|
-
#### connect_timeout
|
302
|
-
Timeout (milliseconds) for establishing TLS connections.
|
303
|
-
|
304
|
-
Default: 6000
|
305
|
-
Minimum: 100
|
306
|
-
Maximum (inclusive): 300000
|
181
|
+
<match *>
|
182
|
+
@type kinesis_streams
|
307
183
|
|
308
|
-
|
309
|
-
|
184
|
+
<instance_profile_credentials>
|
185
|
+
ip_address IP_ADDRESS
|
186
|
+
port PORT
|
187
|
+
</instance_profile_credentials>
|
188
|
+
</match>
|
310
189
|
|
311
|
-
|
190
|
+
See also:
|
312
191
|
|
313
|
-
|
192
|
+
* [Aws::InstanceProfileCredentials](http://docs.aws.amazon.com/sdkforruby/api/Aws/InstanceProfileCredentials.html)
|
193
|
+
* [Temporary Security Credentials - AWS Identity and Access
|
194
|
+
Management](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html)
|
195
|
+
* [Instance Metadata and User Data - Amazon Elastic Compute
|
196
|
+
Cloud](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
|
314
197
|
|
315
|
-
|
316
|
-
If `true`, throttled puts are not retried. The records that got throttled will be failed immediately upon receiving the throttling error. This is useful if you want to react immediately to any throttling without waiting for the KPL to retry. For example, you can use a different hash key to send the throttled record to a backup shard.
|
198
|
+
**retries**
|
317
199
|
|
318
|
-
|
319
|
-
throttling.
|
200
|
+
Number of times to retry when retrieving credentials. Default is 5.
|
320
201
|
|
321
|
-
|
202
|
+
**ip_address**
|
322
203
|
|
323
|
-
|
324
|
-
Minimum level of logs. Messages below the specified level will not be logged. Logs for the native KPL daemon show up on stderr.
|
204
|
+
Default is 169.254.169.254.
|
325
205
|
|
326
|
-
|
327
|
-
Expected pattern: `info|warning|error`
|
206
|
+
**port**
|
328
207
|
|
329
|
-
|
330
|
-
Maximum number of connections to open to the backend. HTTP requests are sent in parallel over multiple connections.
|
208
|
+
Default is 80.
|
331
209
|
|
332
|
-
|
210
|
+
**http_open_timeout**
|
333
211
|
|
334
|
-
Default
|
335
|
-
Minimum: 1
|
336
|
-
Maximum (inclusive): 128
|
212
|
+
Default is 5.
|
337
213
|
|
338
|
-
|
339
|
-
Controls the granularity of metrics that are uploaded to CloudWatch. Greater granularity produces more metrics.
|
214
|
+
**http_read_timeout**
|
340
215
|
|
341
|
-
|
216
|
+
Default is 5.
|
342
217
|
|
343
|
-
|
218
|
+
### shared_credentials
|
344
219
|
|
345
|
-
|
220
|
+
This loads AWS access credentials from local ini file. This is useful for
|
221
|
+
local developing.
|
346
222
|
|
347
|
-
|
223
|
+
<match *>
|
224
|
+
@type kinesis_streams
|
348
225
|
|
349
|
-
|
226
|
+
<shared_credentials>
|
227
|
+
path PATH
|
228
|
+
profile_name PROFILE_NAME
|
229
|
+
</shared_credentials>
|
230
|
+
</match>
|
350
231
|
|
351
|
-
|
352
|
-
Expected pattern: `global|stream|shard`
|
232
|
+
See also:
|
353
233
|
|
354
|
-
|
355
|
-
Controls the number of metrics that are uploaded to CloudWatch.
|
234
|
+
* [Aws::SharedCredentials](http://docs.aws.amazon.com/sdkforruby/api/Aws/SharedCredentials.html)
|
356
235
|
|
357
|
-
|
236
|
+
**path**
|
358
237
|
|
359
|
-
|
238
|
+
Path to the shared file. Defaults to "#{Dir.home}/.aws/credentials".
|
360
239
|
|
361
|
-
|
240
|
+
**profile_name**
|
362
241
|
|
363
|
-
|
242
|
+
Defaults to 'default' or `[ENV]('AWS_PROFILE')`.
|
364
243
|
|
365
|
-
|
366
|
-
Expected pattern: `none|summary|detailed`
|
244
|
+
## Configuraion: Format
|
367
245
|
|
368
|
-
|
369
|
-
|
246
|
+
### format (section)
|
247
|
+
This plugin use `Fluent::TextFormatter` to serialize record to string. For more detail, see [formatter.rb]. By default, it uses `json` formatter same as specific like below:
|
370
248
|
|
371
|
-
|
249
|
+
<match *>
|
250
|
+
@type kinesis_streams
|
372
251
|
|
373
|
-
|
252
|
+
<format>
|
253
|
+
@type json
|
254
|
+
</format>
|
255
|
+
</match>
|
374
256
|
|
375
|
-
|
376
|
-
|
257
|
+
### inject (section)
|
258
|
+
This plugin use `Fluent::TimeFormatter` and other injection configurations. For more detail, see [inject.rb]. This section only works with Fluentd v0.14.
|
377
259
|
|
378
|
-
|
379
|
-
Delay (in milliseconds) between each metrics upload.
|
260
|
+
For example, the config below will add `time` field whose value is eventtime with nanosecond and `tag` field whose value is its tag. (Mostly same as `include_time key true` and `include_tag_key true`)
|
380
261
|
|
381
|
-
|
262
|
+
<match *>
|
263
|
+
@type kinesis_streams
|
382
264
|
|
383
|
-
|
384
|
-
|
385
|
-
|
265
|
+
<inject>
|
266
|
+
time_key time
|
267
|
+
tag_key tag
|
268
|
+
</inject>
|
269
|
+
</match>
|
386
270
|
|
387
|
-
|
388
|
-
Minimum number of connections to keep open to the backend.
|
271
|
+
By default, `time_type string` and `time_format %Y-%m-%dT%H:%M:%S.%N%z` are already set to be applicable to Elasticsearch subsecond format. Although, you can use any configuration.
|
389
272
|
|
390
|
-
|
273
|
+
Also, there are some format related options below:
|
391
274
|
|
392
|
-
|
393
|
-
|
394
|
-
Maximum (inclusive): 16
|
275
|
+
### include_time_key
|
276
|
+
**Notice** With Fluentd v0.14, you should use inject section.
|
395
277
|
|
396
|
-
|
397
|
-
Server port to connect to. Only useful with [**custom_endpoint**](#custom_endpoint).
|
278
|
+
Defalut `false`. If you want to include `time` field in your record, set `true`.
|
398
279
|
|
399
|
-
|
400
|
-
|
401
|
-
Maximum (inclusive): 65535
|
280
|
+
### include_tag_key
|
281
|
+
**Notice** With Fluentd v0.14, you should use inject section.
|
402
282
|
|
403
|
-
|
404
|
-
Limits the maximum allowed put rate for a shard, as a percentage of the backend limits.
|
283
|
+
Defalut `false`. If you want to include `tag` field in your record, set `true`.
|
405
284
|
|
406
|
-
|
285
|
+
### data_key
|
286
|
+
If your record contains a field whose string should be sent to Amazon Kinesis directly (without formatter), use this parameter to specify the field. In that case, other fileds than **data_key** are thrown away and never sent to Amazon Kinesis. Default `nil`, which means whole record will be formatted and sent.
|
407
287
|
|
408
|
-
|
288
|
+
### compression
|
289
|
+
Specifing compression way for data of each record. Current accepted options are `zlib`. Otherwise, no compression will be preformed.
|
409
290
|
|
410
|
-
|
291
|
+
### log_truncate_max_size
|
292
|
+
Integer, default 1024. When emitting the log entry, the message will be truncated by this size to avoid infinite loop when the log is also sent to Kinesis. The value 0 means no truncation.
|
411
293
|
|
412
|
-
|
413
|
-
|
414
|
-
|
294
|
+
## Configuraion: API
|
295
|
+
### region
|
296
|
+
AWS region of your stream. It should be in form like `us-east-1`, `us-west-2`. Refer to [Regions and Endpoints in AWS General Reference][region] for supported regions.
|
415
297
|
|
416
|
-
|
417
|
-
Maximum amount of time (milliseconds) a record may spend being buffered before it gets sent. Records may be sent sooner than this depending on the other buffering limits.
|
298
|
+
Default `nil`, which means try to find from environment variable `AWS_REGION`.
|
418
299
|
|
419
|
-
|
300
|
+
### max_record_size
|
301
|
+
The upper limit of size of each record. Default is 1 MB which is the limitation of Kinesis.
|
420
302
|
|
421
|
-
|
303
|
+
### http_proxy
|
304
|
+
HTTP proxy for API calling. Default `nil`.
|
422
305
|
|
423
|
-
|
306
|
+
### endpoint
|
307
|
+
API endpoint URL, for testing. Defalut `nil`.
|
424
308
|
|
425
|
-
|
309
|
+
### ssl_verify_peer
|
310
|
+
Boolean. Disable if you want to verify ssl conncetion, for testing. Default `true`.
|
426
311
|
|
427
|
-
|
428
|
-
|
312
|
+
### debug
|
313
|
+
Boolean. Enable if you need to debug Amazon Kinesis Firehose API call. Default is `false`.
|
429
314
|
|
430
|
-
|
431
|
-
|
315
|
+
## Configuration: Batch request
|
316
|
+
### retries_on_batch_request
|
317
|
+
Integer, default is 3. The plugin will put multiple records to Amazon Kinesis Streams in batches using PutRecords. A set of records in a batch may fail for reasons documented in the Kinesis Service API Reference for PutRecords. Failed records will be retried **retries_on_batch_request** times. If a record fails all retries an error log will be emitted.
|
432
318
|
|
433
|
-
|
319
|
+
### reset_backoff_if_success
|
320
|
+
Boolean, default `true`. If enabled, when after retrying, the next retrying checks the number of succeeded records on the former batch request and reset exponential backoff if there is any success. Because batch request could be composed by requests across shards, simple exponential backoff for the batch request wouldn't work some cases.
|
434
321
|
|
435
|
-
|
322
|
+
### batch_request_max_count
|
323
|
+
Integer, default 500. The number of max count of making batch request from record chunk. It can't exceed the default value because it's API limit.
|
436
324
|
|
437
|
-
Default:
|
438
|
-
Minimum: 100
|
439
|
-
Maximum (inclusive): 9223372036854775807
|
325
|
+
Default:
|
440
326
|
|
441
|
-
|
442
|
-
|
327
|
+
- `kinesis_streams`: 500
|
328
|
+
- `kinesis_firehose`: 500
|
329
|
+
- `kinesis_streams_aggregated`: 100,000
|
443
330
|
|
444
|
-
|
331
|
+
### batch_request_max_size
|
332
|
+
Integer. The number of max size of making batch request from record chunk. It can't exceed the default value because it's API limit.
|
445
333
|
|
446
|
-
Default:
|
447
|
-
Minimum: 100
|
448
|
-
Maximum (inclusive): 600000
|
334
|
+
Default:
|
449
335
|
|
450
|
-
|
451
|
-
|
336
|
+
- `kinesis_streams`: 5 MB
|
337
|
+
- `kinesis_firehose`: 4 MB
|
338
|
+
- `kinesis_streams_aggregated`: 1 MB
|
452
339
|
|
453
|
-
|
340
|
+
## Configuration: kinesis_streams
|
341
|
+
Here are `kinesis_streams` specific configurations.
|
454
342
|
|
455
|
-
|
456
|
-
|
343
|
+
### stream_name
|
344
|
+
Name of the stream to put data.
|
457
345
|
|
458
|
-
|
346
|
+
### partition_key
|
347
|
+
A key to extract partition key from JSON object. Default `nil`, which means partition key will be generated randomly.
|
459
348
|
|
460
349
|
## Configuration: kinesis_firehose
|
461
350
|
Here are `kinesis_firehose` specific configurations.
|
@@ -463,37 +352,19 @@ Here are `kinesis_firehose` specific configurations.
|
|
463
352
|
### delivery_stream_name
|
464
353
|
Name of the delivery stream to put data.
|
465
354
|
|
466
|
-
### region
|
467
|
-
AWS region of your stream. It should be in form like `us-east-1`, `us-west-2`. Refer to [Regions and Endpoints in AWS General Reference][region] for supported regions.
|
468
|
-
|
469
|
-
Default `nil`, which means try to find from environment variable `AWS_REGION`.
|
470
|
-
|
471
355
|
### append_new_line
|
472
|
-
Boolean. Default `true`. If it is enabled, the plugin add new line character (`\n`) to each serialized record.
|
356
|
+
Boolean. Default `true`. If it is enabled, the plugin add new line character (`\n`) to each serialized record.
|
473
357
|
|
474
|
-
|
475
|
-
|
358
|
+
## Configuration: kinesis_streams_aggregated
|
359
|
+
Here are `kinesis_streams_aggregated` specific configurations.
|
476
360
|
|
477
|
-
###
|
478
|
-
|
479
|
-
|
480
|
-
### batch_request_max_count
|
481
|
-
Integer, default 500. The number of max count of making batch request from record chunk. It can't exceed the default value because it's API limit.
|
482
|
-
|
483
|
-
### batch_request_max_size
|
484
|
-
Integer, default 4 * 1024*1024. The number of max size of making batch request from record chunk. It can't exceed the default value because it's API limit.
|
485
|
-
|
486
|
-
### http_proxy
|
487
|
-
HTTP proxy for API calling. Default `nil`.
|
488
|
-
|
489
|
-
### endpoint
|
490
|
-
API endpoint URL, for testing. Defalut `nil`.
|
361
|
+
### stream_name
|
362
|
+
Name of the stream to put data.
|
491
363
|
|
492
|
-
###
|
493
|
-
|
364
|
+
### fixed_partition_key
|
365
|
+
A value of fixed partition key. Default `nil`, which means partition key will be generated randomly.
|
494
366
|
|
495
|
-
|
496
|
-
Boolean. Enable if you need to debug Amazon Kinesis Firehose API call. Default is `false`.
|
367
|
+
Note: if you specified this option, all records go to a single shard.
|
497
368
|
|
498
369
|
## Development
|
499
370
|
|
@@ -501,10 +372,12 @@ To launch `fluentd` process with this plugin for development, follow the steps b
|
|
501
372
|
|
502
373
|
git clone https://github.com/awslabs/aws-fluent-plugin-kinesis.git
|
503
374
|
cd aws-fluent-plugin-kinesis
|
504
|
-
make # will install gems
|
375
|
+
make # will install gems dependency
|
505
376
|
bundle exec fluentd -c /path/to/fluent.conf
|
506
377
|
|
507
|
-
|
378
|
+
To launch using Fluentd v0.12, use `BUNDLE_GEMFILE` environment variable:
|
379
|
+
|
380
|
+
BUNDLE_GEMFILE=$PWD/gemfiles/Gemfile.fluentd-0.12 bundle exec fluentd -c /path/to/fluent.conf
|
508
381
|
|
509
382
|
## Contributing
|
510
383
|
|
@@ -518,15 +391,13 @@ Bug reports and pull requests are welcome on [GitHub][github].
|
|
518
391
|
[fluentd]: http://fluentd.org/
|
519
392
|
[streams]: https://aws.amazon.com/kinesis/streams/
|
520
393
|
[firehose]: https://aws.amazon.com/kinesis/firehose/
|
521
|
-
[
|
394
|
+
[kpl]: https://github.com/awslabs/amazon-kinesis-producer/blob/master/aggregation-format.md
|
522
395
|
[td-agent]: https://github.com/treasure-data/td-agent
|
523
396
|
[bundler]: http://bundler.io/
|
524
|
-
[assume_role]: http://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html
|
525
|
-
[external_id]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html
|
526
397
|
[region]: http://docs.aws.amazon.com/general/latest/gr/rande.html#ak_region
|
527
398
|
[fluentd_buffer]: http://docs.fluentd.org/articles/buffer-plugin-overview
|
528
399
|
[github]: https://github.com/awslabs/aws-fluent-plugin-kinesis
|
529
400
|
[formatter.rb]: https://github.com/fluent/fluentd/blob/master/lib/fluent/formatter.rb
|
530
|
-
[
|
531
|
-
[old-readme]: https://github.com/awslabs/aws-fluent-plugin-kinesis/blob/master/README-v0.4.md
|
401
|
+
[inject.rb]: https://github.com/fluent/fluentd/blob/master/lib/fluent/plugin_helper/inject.rb
|
532
402
|
[fluentd-doc-kinesis]: http://docs.fluentd.org/articles/kinesis-stream
|
403
|
+
[fluent-plugin-s3]: https://github.com/fluent/fluent-plugin-s3
|