fluent-plugin-kinesis 2.2.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/PULL_REQUEST_TEMPLATE.md +6 -0
- data/.travis.yml +18 -7
- data/CHANGELOG.md +9 -2
- data/CODE_OF_CONDUCT.md +4 -0
- data/CONTRIBUTING.md +61 -0
- data/README.md +34 -38
- data/benchmark/task.rake +6 -10
- data/fluent-plugin-kinesis.gemspec +20 -13
- data/gemfiles/{Gemfile.td-agent-2.3.5 → Gemfile.fluentd-0.14.10} +1 -6
- data/gemfiles/Gemfile.td-agent-3.1.1 +31 -0
- data/gemfiles/Gemfile.td-agent-3.2.0 +31 -0
- data/gemfiles/Gemfile.td-agent-3.2.1 +31 -0
- data/gemfiles/Gemfile.td-agent-3.3.0 +31 -0
- data/lib/fluent/plugin/kinesis.rb +112 -117
- data/lib/fluent/plugin/kinesis_helper/aggregator.rb +49 -47
- data/lib/fluent/plugin/kinesis_helper/api.rb +139 -137
- data/lib/fluent/plugin/kinesis_helper/client.rb +118 -128
- data/lib/fluent/plugin/out_kinesis_firehose.rb +31 -29
- data/lib/fluent/plugin/out_kinesis_streams.rb +41 -39
- data/lib/fluent/plugin/out_kinesis_streams_aggregated.rb +45 -43
- data/lib/fluent_plugin_kinesis/version.rb +1 -1
- metadata +57 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d525a1183f3d3aec1209db62718f8aa412a7c0eb
|
4
|
+
data.tar.gz: 3b197806fe40602e39462232cdce58ccbc3b02d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0144ae7446308a043139383e64c2de61875163c4114e2344389a4474c9465fcdb8b5bb1bad7c45d1d1fb56be20601016776315ef8d0fe0657fa4fec1c97dc49
|
7
|
+
data.tar.gz: 593f79bec197980ce5d3e9f3b1e9884575efd19166dd3d850280472b174f199ae4f486c33622d312da2d1f3b861f9c41ff50b791868e9ccbb52d5bbc487622b8
|
data/.travis.yml
CHANGED
@@ -1,14 +1,25 @@
|
|
1
1
|
language: ruby
|
2
|
+
os: linux
|
3
|
+
sudo: false
|
4
|
+
|
5
|
+
gemfile:
|
6
|
+
- Gemfile
|
7
|
+
- gemfiles/Gemfile.td-agent-3.3.0
|
2
8
|
|
9
|
+
# Test with supported td-agent versions
|
10
|
+
# https://support.treasuredata.com/hc/en-us/articles/360001479187-The-td-agent-ChangeLog
|
3
11
|
matrix:
|
4
12
|
include:
|
5
13
|
- rvm: 2.4.1
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
gemfile: gemfiles/Gemfile.td-agent-2.
|
14
|
+
gemfile: gemfiles/Gemfile.fluentd-0.14.10
|
15
|
+
- rvm: 2.4.2 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.1.1/config/projects/td-agent3.rb#L17
|
16
|
+
gemfile: gemfiles/Gemfile.td-agent-3.1.1
|
17
|
+
- rvm: 2.4.4 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.2.0/config/projects/td-agent3.rb#L22
|
18
|
+
gemfile: gemfiles/Gemfile.td-agent-3.2.0
|
19
|
+
- rvm: 2.4.4 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.2.1/config/projects/td-agent3.rb#L22
|
20
|
+
gemfile: gemfiles/Gemfile.td-agent-3.2.1
|
21
|
+
- rvm: 2.4.5 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.3.0/config/projects/td-agent3.rb#L22
|
22
|
+
gemfile: gemfiles/Gemfile.td-agent-3.3.0
|
23
|
+
fast_finish: true
|
11
24
|
|
12
25
|
script: bundle exec rake test
|
13
|
-
|
14
|
-
sudo: false
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,15 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
##
|
3
|
+
## 3.0.0
|
4
4
|
|
5
|
-
|
5
|
+
Plugin v3 is almost compatible with v2. You can use v3 with the same configuration as v2. For more details, please see [README](README.md).
|
6
|
+
|
7
|
+
- Enhancement - Use modularized AWS SDK v3 since fluent-plugin-s3 also supports it : [#152](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/152)
|
8
|
+
- Enhancement - Remove support for Fluentd v0.12 and use new Plugin API : [#156](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/156) (also fix [#133](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/133))
|
9
|
+
- Enhancement / Breaking change - Remove *chomp* method from internal formatter : [#142](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/142) [#144](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/144)
|
10
|
+
- Enhancement - Add *chomp_record* option for compatible format with plugin v2 : [#142](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/142)
|
11
|
+
- Bug - Fix undefined method error in flushing buffers : [#133](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/133)
|
12
|
+
- Bug - Fix dependency problem on AWS SDK : [#161](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/161)
|
6
13
|
|
7
14
|
## 2.1.1
|
8
15
|
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,4 @@
|
|
1
|
+
## Code of Conduct
|
2
|
+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
|
3
|
+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
|
4
|
+
opensource-codeofconduct@amazon.com with any additional questions or comments.
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
# Contributing Guidelines
|
2
|
+
|
3
|
+
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
|
4
|
+
documentation, we greatly value feedback and contributions from our community.
|
5
|
+
|
6
|
+
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
|
7
|
+
information to effectively respond to your bug report or contribution.
|
8
|
+
|
9
|
+
|
10
|
+
## Reporting Bugs/Feature Requests
|
11
|
+
|
12
|
+
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
|
13
|
+
|
14
|
+
When filing an issue, please check [existing open](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues), or [recently closed](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
|
15
|
+
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
|
16
|
+
|
17
|
+
* A reproducible test case or series of steps
|
18
|
+
* The version of our code being used
|
19
|
+
* Any modifications you've made relevant to the bug
|
20
|
+
* Anything unusual about your environment or deployment
|
21
|
+
|
22
|
+
|
23
|
+
## Contributing via Pull Requests
|
24
|
+
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
|
25
|
+
|
26
|
+
1. You are working against the latest source on the *master* branch.
|
27
|
+
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
|
28
|
+
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
|
29
|
+
|
30
|
+
To send us a pull request, please:
|
31
|
+
|
32
|
+
1. Fork the repository.
|
33
|
+
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
|
34
|
+
3. Ensure local tests pass.
|
35
|
+
4. Commit to your fork using clear commit messages.
|
36
|
+
5. Send us a pull request, answering any default questions in the pull request interface.
|
37
|
+
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
|
38
|
+
|
39
|
+
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
|
40
|
+
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
|
41
|
+
|
42
|
+
|
43
|
+
## Finding contributions to work on
|
44
|
+
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/awslabs/aws-fluent-plugin-kinesis/labels/help%20wanted) issues is a great place to start.
|
45
|
+
|
46
|
+
|
47
|
+
## Code of Conduct
|
48
|
+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
|
49
|
+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
|
50
|
+
opensource-codeofconduct@amazon.com with any additional questions or comments.
|
51
|
+
|
52
|
+
|
53
|
+
## Security issue notifications
|
54
|
+
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
|
55
|
+
|
56
|
+
|
57
|
+
## Licensing
|
58
|
+
|
59
|
+
See the [LICENSE](https://github.com/awslabs/aws-fluent-plugin-kinesis/blob/master/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
|
60
|
+
|
61
|
+
We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
|
data/README.md
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
# Fluent plugin for Amazon Kinesis
|
2
2
|
|
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)
|
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)
|
4
|
+
[![Build Status](https://travis-ci.org/awslabs/aws-fluent-plugin-kinesis.svg?branch=master)](https://travis-ci.org/awslabs/aws-fluent-plugin-kinesis)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/fluent-plugin-kinesis.svg)](https://rubygems.org/gems/fluent-plugin-kinesis)
|
4
6
|
|
5
7
|
[Fluentd][fluentd] output plugin
|
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:
|
8
|
+
that sends events to [Amazon Kinesis Data Streams][streams] and [Amazon Kinesis Data Firehose][firehose]. Also it supports [KPL Aggregated record format][kpl]. This gem includes three output plugins respectively:
|
7
9
|
|
8
10
|
- `kinesis_streams`
|
9
11
|
- `kinesis_firehose`
|
@@ -11,10 +13,10 @@ that sends events to [Amazon Kinesis Streams][streams] and [Amazon Kinesis Fireh
|
|
11
13
|
|
12
14
|
Also, there is a [documentation on Fluentd official site][fluentd-doc-kinesis].
|
13
15
|
|
14
|
-
**Note**: This README is for v2.
|
16
|
+
**Note**: This README is for v3. Plugin v3 is almost compatible with v2. If you use v1, see the [old README][v1-readme].
|
15
17
|
|
16
18
|
## Installation
|
17
|
-
This
|
19
|
+
This Fluentd plugin is available as the `fluent-plugin-kinesis` gem from RubyGems.
|
18
20
|
|
19
21
|
gem install fluent-plugin-kinesis
|
20
22
|
|
@@ -49,7 +51,7 @@ Or just download specify your Ruby library path. Below is the sample for specify
|
|
49
51
|
|
50
52
|
## Dependencies
|
51
53
|
* Ruby 2.1.0+
|
52
|
-
* Fluentd 0.
|
54
|
+
* Fluentd 0.14.10+
|
53
55
|
|
54
56
|
## Basic Usage
|
55
57
|
Here are general procedures for using this plugin:
|
@@ -112,26 +114,21 @@ Add configuration like below:
|
|
112
114
|
Note: Each value should be adjusted to your system by yourself.
|
113
115
|
|
114
116
|
## Configuration: Credentials
|
115
|
-
To put records into Amazon Kinesis Streams or Firehose, you need to provide AWS security credentials somehow. Without
|
117
|
+
To put records into Amazon Kinesis Data Streams or Firehose, you need to provide AWS security credentials somehow. Without specifying credentials in config file, this plugin automatically fetch credential just following AWS SDK for Ruby does (environment variable, shared profile, and instance profile).
|
116
118
|
|
117
119
|
This plugin uses the same configuration in [fluent-plugin-s3][fluent-plugin-s3].
|
118
120
|
|
119
121
|
**aws_key_id**
|
120
122
|
|
121
|
-
AWS access key id. This parameter is required when your agent is not
|
122
|
-
running on EC2 instance with an IAM Role. When using an IAM role, make
|
123
|
-
sure to configure `instance_profile_credentials`. Usage can be found below.
|
123
|
+
AWS access key id. This parameter is required when your agent is not running on EC2 instance with an IAM Role. When using an IAM role, make sure to configure `instance_profile_credentials`. Usage can be found below.
|
124
124
|
|
125
125
|
**aws_sec_key**
|
126
126
|
|
127
|
-
AWS secret key. This parameter is required when your agent is not running
|
128
|
-
on EC2 instance with an IAM Role.
|
127
|
+
AWS secret key. This parameter is required when your agent is not running on EC2 instance with an IAM Role.
|
129
128
|
|
130
129
|
**aws_iam_retries**
|
131
130
|
|
132
|
-
The number of attempts to make (with exponential backoff) when loading
|
133
|
-
instance profile credentials from the EC2 metadata service using an IAM
|
134
|
-
role. Defaults to 5 retries.
|
131
|
+
The number of attempts to make (with exponential backoff) when loading instance profile credentials from the EC2 metadata service using an IAM role. Defaults to 5 retries.
|
135
132
|
|
136
133
|
### assume_role_credentials
|
137
134
|
Typically, you use AssumeRole for cross-account access or federation.
|
@@ -166,26 +163,21 @@ An IAM policy in JSON format.
|
|
166
163
|
|
167
164
|
**duration_seconds**
|
168
165
|
|
169
|
-
The duration, in seconds, of the role session. The value can range from
|
170
|
-
900 seconds (15 minutes) to 3600 seconds (1 hour). By default, the value
|
171
|
-
is set to 3600 seconds.
|
166
|
+
The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) to 3600 seconds (1 hour). By default, the value is set to 3600 seconds.
|
172
167
|
|
173
168
|
**external_id**
|
174
169
|
|
175
|
-
A unique identifier that is used by third parties when assuming roles in
|
176
|
-
their customers' accounts.
|
170
|
+
A unique identifier that is used by third parties when assuming roles in their customers' accounts.
|
177
171
|
|
178
172
|
**sts_http_proxy**
|
179
173
|
|
180
|
-
Proxy url for proxying requests to amazon sts service api. This needs to be set up independently from global http_proxy parameter
|
181
|
-
for the use case in which requests to kinesis api are going via kinesis vpc endpoint but requests to sts api have to go via http proxy.
|
174
|
+
Proxy url for proxying requests to amazon sts service api. This needs to be set up independently from global http_proxy parameter for the use case in which requests to kinesis api are going via kinesis vpc endpoint but requests to sts api have to go via http proxy.
|
182
175
|
It should be added to assume_role_credentials configuration stanza in the next format:
|
183
176
|
sts_http_proxy http://[username:password]@hostname:port
|
184
177
|
|
185
178
|
### instance_profile_credentials
|
186
179
|
|
187
|
-
Retrieve temporary security credentials via HTTP request. This is useful on
|
188
|
-
EC2 instance.
|
180
|
+
Retrieve temporary security credentials via HTTP request. This is useful on EC2 instance.
|
189
181
|
|
190
182
|
<match *>
|
191
183
|
@type kinesis_streams
|
@@ -226,8 +218,7 @@ Default is 5.
|
|
226
218
|
|
227
219
|
### shared_credentials
|
228
220
|
|
229
|
-
This loads AWS access credentials from local ini file. This is useful for
|
230
|
-
local developing.
|
221
|
+
This loads AWS access credentials from local ini file. This is useful for local developing.
|
231
222
|
|
232
223
|
<match *>
|
233
224
|
@type kinesis_streams
|
@@ -250,7 +241,7 @@ Path to the shared file. Defaults to "#{Dir.home}/.aws/credentials".
|
|
250
241
|
|
251
242
|
Defaults to 'default' or `[ENV]('AWS_PROFILE')`.
|
252
243
|
|
253
|
-
##
|
244
|
+
## Configuration: Format
|
254
245
|
|
255
246
|
### format (section)
|
256
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:
|
@@ -277,7 +268,7 @@ For example, the config below will add `time` field whose value is eventtime wit
|
|
277
268
|
</inject>
|
278
269
|
</match>
|
279
270
|
|
280
|
-
By default, `time_type string` and `time_format %Y-%m-%dT%H:%M:%S.%N%z` are already set to be applicable to Elasticsearch
|
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 sub-second format. Although, you can use any configuration.
|
281
272
|
|
282
273
|
Also, there are some format related options below:
|
283
274
|
|
@@ -292,7 +283,7 @@ Defalut `false`. If you want to include `time` field in your record, set `true`.
|
|
292
283
|
Defalut `false`. If you want to include `tag` field in your record, set `true`.
|
293
284
|
|
294
285
|
### data_key
|
295
|
-
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
|
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 fields than **data_key** are thrown away and never sent to Amazon Kinesis. Default `nil`, which means whole record will be formatted and sent.
|
296
287
|
|
297
288
|
### compression
|
298
289
|
Specifing compression way for data of each record. Current accepted options are `zlib`. Otherwise, no compression will be preformed.
|
@@ -300,7 +291,11 @@ Specifing compression way for data of each record. Current accepted options are
|
|
300
291
|
### log_truncate_max_size
|
301
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.
|
302
293
|
|
303
|
-
|
294
|
+
### chomp_record
|
295
|
+
Boolean. Default `false`. If it is enabled, the plugin calls chomp and removes separator from the end of each record. This option is for compatible format with plugin v2. See [#142](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/142) for more details.
|
296
|
+
When you use [kinesis_firehose](#kinesis_firehose) output, [append_new_line](#append_new_line) option is `true` as default. If [append_new_line](#append_new_line) is enabled, the plugin calls chomp as [chomp_record](#chomp_record) is `true` before appending `\n` to each record. Therefore, you don't need to enable [chomp_record](#chomp_record) option when you use [kinesis_firehose](#kinesis_firehose) with default configuration. If you want to set [append_new_line](#append_new_line) `false`, you can choose [chomp_record](#chomp_record) `false` (default) or `true` (compatible format with plugin v2).
|
297
|
+
|
298
|
+
## Configuration: API
|
304
299
|
### region
|
305
300
|
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.
|
306
301
|
|
@@ -313,17 +308,17 @@ The upper limit of size of each record. Default is 1 MB which is the limitation
|
|
313
308
|
HTTP proxy for API calling. Default `nil`.
|
314
309
|
|
315
310
|
### endpoint
|
316
|
-
API endpoint URL, for testing.
|
311
|
+
API endpoint URL, for testing. Default `nil`.
|
317
312
|
|
318
313
|
### ssl_verify_peer
|
319
|
-
Boolean. Disable if you want to verify ssl
|
314
|
+
Boolean. Disable if you want to verify ssl connection, for testing. Default `true`.
|
320
315
|
|
321
316
|
### debug
|
322
|
-
Boolean. Enable if you need to debug Amazon Kinesis Firehose API call. Default is `false`.
|
317
|
+
Boolean. Enable if you need to debug Amazon Kinesis Data Firehose API call. Default is `false`.
|
323
318
|
|
324
319
|
## Configuration: Batch request
|
325
320
|
### retries_on_batch_request
|
326
|
-
Integer, default is
|
321
|
+
Integer, default is 8. The plugin will put multiple records to Amazon Kinesis Data 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.
|
327
322
|
|
328
323
|
### reset_backoff_if_success
|
329
324
|
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.
|
@@ -362,7 +357,8 @@ Here are `kinesis_firehose` specific configurations.
|
|
362
357
|
Name of the delivery stream to put data.
|
363
358
|
|
364
359
|
### append_new_line
|
365
|
-
Boolean. Default `true`. If it is enabled, the plugin
|
360
|
+
Boolean. Default `true`. If it is enabled, the plugin adds new line character (`\n`) to each serialized record.
|
361
|
+
Before appending `\n`, plugin calls chomp and removes separator from the end of each record as [chomp_record](#chomp_record) is `true`. Therefore, you don't need to enable [chomp_record](#chomp_record) option when you use [kinesis_firehose](#kinesis_firehose) output with default configuration ([append_new_line](#append_new_line) is `true`). If you want to set [append_new_line](#append_new_line) `false`, you can choose [chomp_record](#chomp_record) `false` (default) or `true` (compatible format with plugin v2).
|
366
362
|
|
367
363
|
## Configuration: kinesis_streams_aggregated
|
368
364
|
Here are `kinesis_streams_aggregated` specific configurations.
|
@@ -384,9 +380,9 @@ To launch `fluentd` process with this plugin for development, follow the steps b
|
|
384
380
|
make # will install gems dependency
|
385
381
|
bundle exec fluentd -c /path/to/fluent.conf
|
386
382
|
|
387
|
-
To launch using Fluentd
|
383
|
+
To launch using specified version of Fluentd, use `BUNDLE_GEMFILE` environment variable:
|
388
384
|
|
389
|
-
BUNDLE_GEMFILE=$PWD/gemfiles/Gemfile.td-agent-
|
385
|
+
BUNDLE_GEMFILE=$PWD/gemfiles/Gemfile.td-agent-3.3.0 bundle exec fluentd -c /path/to/fluent.conf
|
390
386
|
|
391
387
|
## Contributing
|
392
388
|
|
@@ -394,8 +390,8 @@ Bug reports and pull requests are welcome on [GitHub][github].
|
|
394
390
|
|
395
391
|
## Related Resources
|
396
392
|
|
397
|
-
* [Amazon Kinesis Streams Developer Guide](http://docs.aws.amazon.com/kinesis/latest/dev/introduction.html)
|
398
|
-
* [Amazon Kinesis Firehose Developer Guide](http://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html)
|
393
|
+
* [Amazon Kinesis Data Streams Developer Guide](http://docs.aws.amazon.com/kinesis/latest/dev/introduction.html)
|
394
|
+
* [Amazon Kinesis Data Firehose Developer Guide](http://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html)
|
399
395
|
|
400
396
|
[fluentd]: http://fluentd.org/
|
401
397
|
[streams]: https://aws.amazon.com/kinesis/streams/
|
data/benchmark/task.rake
CHANGED
@@ -78,11 +78,11 @@ class KinesisBenchmark
|
|
78
78
|
def create_driver(type, conf = default_config)
|
79
79
|
klass = case type
|
80
80
|
when :streams
|
81
|
-
Fluent::KinesisStreamsOutput
|
81
|
+
Fluent::Plugin::KinesisStreamsOutput
|
82
82
|
when :streams_aggregated
|
83
|
-
Fluent::KinesisStreamsAggregatedOutput
|
83
|
+
Fluent::Plugin::KinesisStreamsAggregatedOutput
|
84
84
|
when :firehose
|
85
|
-
Fluent::KinesisFirehoseOutput
|
85
|
+
Fluent::Plugin::KinesisFirehoseOutput
|
86
86
|
end
|
87
87
|
conf += case type
|
88
88
|
when :streams, :streams_aggregated
|
@@ -90,13 +90,9 @@ class KinesisBenchmark
|
|
90
90
|
when :firehose
|
91
91
|
"delivery_stream_name fluent-plugin-test"
|
92
92
|
end
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
else
|
97
|
-
Fluent::Test::Driver::Output.new(klass) do
|
98
|
-
end.configure(conf)
|
99
|
-
end
|
93
|
+
|
94
|
+
Fluent::Test::Driver::Output.new(klass) do
|
95
|
+
end.configure(conf)
|
100
96
|
end
|
101
97
|
|
102
98
|
def benchmark(size, count)
|
@@ -30,20 +30,27 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.require_paths = ["lib"]
|
31
31
|
spec.required_ruby_version = '>= 2.1'
|
32
32
|
|
33
|
-
spec.add_dependency "fluentd", ">= 0.
|
34
|
-
spec.add_dependency "aws-sdk", ">= 2.9.9", "< 4"
|
35
|
-
# TODO: fluent-plugin-s3 depends on v2 only.
|
36
|
-
# https://github.com/fluent/fluent-plugin-s3/issues/208
|
37
|
-
#
|
38
|
-
# This plugin is sometimes used with s3 plugin.
|
39
|
-
# Unless s3 plugin is updated to be available with v3,
|
40
|
-
# this plugin should depend on v2 only.
|
41
|
-
# spec.add_dependency "aws-sdk-kinesis", "~> 1"
|
42
|
-
# spec.add_dependency "aws-sdk-firehose", "~> 1"
|
43
|
-
spec.add_dependency "google-protobuf", "~> 3", "< 3.7"
|
33
|
+
spec.add_dependency "fluentd", ">= 0.14.10", "< 2"
|
44
34
|
|
45
|
-
|
46
|
-
|
35
|
+
# This plugin is sometimes used with s3 plugin, so watch out for conflicts
|
36
|
+
# https://rubygems.org/gems/fluent-plugin-s3
|
37
|
+
# Exclude v1.5 to avoid aws-sdk dependency problem due to this issue
|
38
|
+
# https://github.com/aws/aws-sdk-ruby/issues/1872
|
39
|
+
# Exclude aws-sdk-kinesis v1.4 to avoid aws-sdk-core dependency problem with td-agent v3.1.1
|
40
|
+
# NoMethodError: undefined method `event=' for #<Seahorse::Model::Shapes::ShapeRef:*>
|
41
|
+
# https://github.com/aws/aws-sdk-ruby/commit/03d60f9d3d821e645bd2a3efca066f37350ef906#diff-c69f15af8ea3eb9ab152659476e04608R401
|
42
|
+
# https://github.com/aws/aws-sdk-ruby/commit/571c2d0e5ff9c24ff72893a08a74790db591fb57#diff-a55155f04aa6559460a0814e264eb0cdR43
|
43
|
+
spec.add_dependency "aws-sdk-kinesis", "~> 1", "!= 1.4", "!= 1.5"
|
44
|
+
# Exclude aws-sdk-firehose v1.9 to avoid aws-sdk-core dependency problem with td-agent v3.2.1
|
45
|
+
# LoadError: cannot load such file -- aws-sdk-core/plugins/endpoint_discovery.rb
|
46
|
+
# https://github.com/aws/aws-sdk-ruby/commit/85d8538a62255e58d9e176ee524a9f94354b51a0#diff-d51486091a10ada65b308b7f45966af1R18
|
47
|
+
# https://github.com/aws/aws-sdk-ruby/commit/7c9584bc6473100df9aec9333ab491ad4faeeca8#diff-be94f87e58e00329a6c0e03e43d5c292
|
48
|
+
spec.add_dependency "aws-sdk-firehose", "~> 1", "!= 1.5", "!= 1.9"
|
49
|
+
|
50
|
+
spec.add_dependency "google-protobuf", "~> 3"
|
51
|
+
|
52
|
+
spec.add_development_dependency "bundler", ">= 1.10"
|
53
|
+
spec.add_development_dependency "rake", ">= 10.0"
|
47
54
|
spec.add_development_dependency "test-unit", ">= 3.0.8"
|
48
55
|
spec.add_development_dependency "test-unit-rr", ">= 1.0.3"
|
49
56
|
spec.add_development_dependency "pry", ">= 0.10.1"
|
@@ -17,9 +17,4 @@ source 'https://rubygems.org'
|
|
17
17
|
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
18
18
|
gemspec path: ".."
|
19
19
|
|
20
|
-
|
21
|
-
# https://github.com/treasure-data/omnibus-td-agent/blob/release-2.3.5/config/projects/td-agent2.rb#L23
|
22
|
-
gem "fluentd", "0.12.35"
|
23
|
-
# https://github.com/treasure-data/omnibus-td-agent/blob/release-2.3.5/plugin_gems.rb#L13-L15
|
24
|
-
gem "fluent-plugin-s3", "0.8.2"
|
25
|
-
gem "aws-sdk", "2.9.9"
|
20
|
+
gem "fluentd", "0.14.10"
|
@@ -0,0 +1,31 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
|
+
#
|
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
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
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
|
+
|
15
|
+
source 'https://rubygems.org'
|
16
|
+
|
17
|
+
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
18
|
+
gemspec path: ".."
|
19
|
+
|
20
|
+
# Specify related gems for td-agent v3.1.1
|
21
|
+
# https://github.com/treasure-data/omnibus-td-agent/blob/v3.1.1/config/projects/td-agent3.rb#L22
|
22
|
+
gem "fluentd", "1.0.2"
|
23
|
+
# https://github.com/treasure-data/omnibus-td-agent/blob/v3.1.0/plugin_gems.rb#L16-L23
|
24
|
+
gem "jmespath", "1.3.1"
|
25
|
+
gem "aws-partitions", "1.42.0"
|
26
|
+
gem "aws-sigv4", "1.0.2"
|
27
|
+
gem "aws-sdk-core", "3.11.0"
|
28
|
+
gem "aws-sdk-kms", "1.3.0"
|
29
|
+
gem "aws-sdk-sqs", "1.3.0"
|
30
|
+
gem "aws-sdk-s3", "1.8.0"
|
31
|
+
gem "fluent-plugin-s3", "1.1.0"
|