fluent-plugin-kinesis 3.5.0 → 3.6.1
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/.github/workflows/test.yml +21 -13
- data/CHANGELOG.md +9 -0
- data/Makefile +4 -0
- data/README.md +263 -242
- data/fluent-plugin-kinesis.gemspec +2 -2
- data/gemfiles/Gemfile.fluent-package-5.0.7 +21 -0
- data/gemfiles/Gemfile.fluent-package-5.2.0 +21 -0
- data/gemfiles/{Gemfile.fluentd-1.16.3 → Gemfile.fluentd-1.19.0} +1 -1
- data/gemfiles/Gemfile.td-agent-4.5.3 +21 -0
- data/lib/fluent/plugin/gen/kinesis_aggregation_pb.rb +15 -0
- data/lib/fluent/plugin/kinesis_helper/aggregator.rb +1 -18
- data/lib/fluent_plugin_kinesis/version.rb +1 -1
- data/proto/kinesis_aggregation.proto +19 -0
- metadata +11 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2fb86867279f041ba7c6fc4892295bfb06ac0508327033a4f5f3b310dcb5dc5
|
4
|
+
data.tar.gz: 72ebdd6da44b695e66a51b73d6c1b97b6fe458723e34ddeef102b50bdba37045
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20c6c0ff4453ae366ebf13e6c3448ab876f71f04a8247af9ae7e3c71c419c99db0703d488a920141b87748240811ae0868833add58edc7d4d9428784fdf4a6f5
|
7
|
+
data.tar.gz: 7d50da99e747b17192cd769f6537cf07063821a14608f29f3e77b1dc6e98873f8867189332bee18e46ac7509ddf27e2d9e93b281902e7daa61dcbd9fea080694
|
data/.github/workflows/test.yml
CHANGED
@@ -2,8 +2,10 @@ name: test
|
|
2
2
|
|
3
3
|
on: [ push, pull_request ]
|
4
4
|
|
5
|
-
# Test with supported
|
5
|
+
# Test with supported fluent-package versions
|
6
|
+
# https://www.fluentd.org/download/fluent_package
|
6
7
|
# https://docs.fluentd.org/quickstart/support#change-logs
|
8
|
+
# https://github.com/fluent/fluentd/blob/master/CHANGELOG.md
|
7
9
|
# https://github.com/fluent/fluent-package-builder/blob/master/CHANGELOG.md
|
8
10
|
# https://github.com/fluent/fluent-package-builder/blob/master/CHANGELOG-v4.md
|
9
11
|
jobs:
|
@@ -14,11 +16,11 @@ jobs:
|
|
14
16
|
matrix:
|
15
17
|
include:
|
16
18
|
- gemfile: gemfiles/Gemfile.fluentd-0.14.22 # Oldest supported Fluentd
|
17
|
-
ruby-version: 2.
|
18
|
-
- gemfile: gemfiles/Gemfile.fluentd-1.
|
19
|
-
ruby-version: 3.
|
20
|
-
- gemfile: gemfiles/Gemfile.td-agent-3.1.0
|
21
|
-
|
19
|
+
ruby-version: 2.7.1 # Oldest supported Ruby
|
20
|
+
- gemfile: gemfiles/Gemfile.fluentd-1.19.0 # Latest Fluentd / https://rubygems.org/gems/fluentd
|
21
|
+
ruby-version: 3.4.5 # Latest supported Ruby / https://www.ruby-lang.org/en/downloads
|
22
|
+
# - gemfile: gemfiles/Gemfile.td-agent-3.1.0
|
23
|
+
# ruby-version: 2.4.2 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.1.0/config/projects/td-agent3.rb#L20
|
22
24
|
# - gemfile: gemfiles/Gemfile.td-agent-3.1.1
|
23
25
|
# ruby-version: 2.4.2 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.1.1/config/projects/td-agent3.rb#L17
|
24
26
|
# - gemfile: gemfiles/Gemfile.td-agent-3.2.0
|
@@ -43,11 +45,11 @@ jobs:
|
|
43
45
|
# ruby-version: 2.4.10 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.7.1/config/projects/td-agent3.rb#L22
|
44
46
|
# - gemfile: gemfiles/Gemfile.td-agent-3.8.0
|
45
47
|
# ruby-version: 2.4.10 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.8.0/config/projects/td-agent3.rb#L22
|
46
|
-
- gemfile: gemfiles/Gemfile.td-agent-3.8.1 # Latest release of td-agent v3
|
47
|
-
|
48
|
+
# - gemfile: gemfiles/Gemfile.td-agent-3.8.1 # Latest release of td-agent v3
|
49
|
+
# ruby-version: 2.4.10 # https://github.com/treasure-data/omnibus-td-agent/pull/273/files#diff-f73e763ace61e7c4bf48bf94bd6e295bc2cfd1ce5f9e38a4d19e266353e37498R22
|
48
50
|
# - gemfile: gemfiles/Gemfile.td-agent-4.0.0
|
49
51
|
# ruby-version: 2.7.1 # https://github.com/fluent/fluent-package-builder/blob/41b3436d43c21e48a9cf34c58ae640f0e3dfb44c/td-agent/config.rb#L16
|
50
|
-
- gemfile: gemfiles/Gemfile.td-agent-4.0.1
|
52
|
+
- gemfile: gemfiles/Gemfile.td-agent-4.0.1 # Oldest supported td-agent
|
51
53
|
ruby-version: 2.7.1 # https://github.com/fluent/fluent-package-builder/blob/v4.0.1/td-agent/config.rb#L16
|
52
54
|
# - gemfile: gemfiles/Gemfile.td-agent-4.1.0
|
53
55
|
# ruby-version: 2.7.2 # https://github.com/fluent/fluent-package-builder/blob/v4.1.0/td-agent/config.rb#L19
|
@@ -71,14 +73,20 @@ jobs:
|
|
71
73
|
# ruby-version: 2.7.8 # https://github.com/fluent/fluent-package-builder/blob/v4.5.0/td-agent/config.rb#L19
|
72
74
|
# - gemfile: gemfiles/Gemfile.td-agent-4.5.1
|
73
75
|
# ruby-version: 2.7.8 # https://github.com/fluent/fluent-package-builder/blob/v4.5.1/td-agent/config.rb#L19
|
74
|
-
- gemfile: gemfiles/Gemfile.td-agent-4.5.2
|
75
|
-
|
76
|
+
# - gemfile: gemfiles/Gemfile.td-agent-4.5.2
|
77
|
+
# ruby-version: 2.7.8 # https://github.com/fluent/fluent-package-builder/blob/v4.5.2/td-agent/config.rb#L19
|
78
|
+
- gemfile: gemfiles/Gemfile.td-agent-4.5.3 # Latest release of td-agent v4
|
79
|
+
ruby-version: 2.7.8 # https://github.com/fluent/fluent-package-builder/blob/v4.5.3/td-agent/config.rb#L19
|
76
80
|
# - gemfile: gemfiles/Gemfile.fluent-package-5.0.0
|
77
81
|
# ruby-version: 3.2.2 # https://github.com/fluent/fluent-package-builder/blob/v5.0.0/fluent-package/config.rb#L26
|
78
82
|
# - gemfile: gemfiles/Gemfile.fluent-package-5.0.1
|
79
83
|
# ruby-version: 3.2.2 # https://github.com/fluent/fluent-package-builder/blob/v5.0.1/fluent-package/config.rb#L26
|
80
|
-
- gemfile: gemfiles/Gemfile.fluent-package-5.0.2
|
81
|
-
|
84
|
+
# - gemfile: gemfiles/Gemfile.fluent-package-5.0.2
|
85
|
+
# ruby-version: 3.2.2 # https://github.com/fluent/fluent-package-builder/blob/v5.0.2/fluent-package/config.rb#L26
|
86
|
+
- gemfile: gemfiles/Gemfile.fluent-package-5.0.7 # fluent-package LTS
|
87
|
+
ruby-version: 3.2.8 # https://github.com/fluent/fluent-package-builder/blob/v5.0.7/fluent-package/config.rb#L26
|
88
|
+
- gemfile: gemfiles/Gemfile.fluent-package-5.2.0
|
89
|
+
ruby-version: 3.2.6 # https://github.com/fluent/fluent-package-builder/blob/v5.2.0/fluent-package/config.rb#L26
|
82
90
|
|
83
91
|
env:
|
84
92
|
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 3.6.1
|
4
|
+
|
5
|
+
- Dependency - Update gem dependency to Ruby 2.7.1+
|
6
|
+
|
7
|
+
## 3.6.0
|
8
|
+
|
9
|
+
- Enhancement - Add fluent-package 5.2 and Fluentd 1.19.0 with Ruby 3.4.5 to test cases
|
10
|
+
- Dependency - Update google-protobuf dependency to v4
|
11
|
+
|
3
12
|
## 3.5.0
|
4
13
|
|
5
14
|
- Enhancement - Add td-agent 4.3-4.5, fluent-package 5.0, and Fluentd 1.16.3 with Ruby 3.3.0 to test cases
|
data/Makefile
CHANGED
data/README.md
CHANGED
@@ -4,139 +4,227 @@
|
|
4
4
|
[](https://rubygems.org/gems/fluent-plugin-kinesis)
|
5
5
|
[](https://rubygems.org/gems/fluent-plugin-kinesis)
|
6
6
|
|
7
|
-
[
|
8
|
-
|
7
|
+
A fluentd output plugin to send events to [Amazon Kinesis Data Streams][streams] and [Amazon Data Firehose][firehose]. The plugin also supports [KPL Aggregated Record Format][kpl].
|
8
|
+
|
9
|
+
This gem includes following three output plugins:
|
9
10
|
|
10
11
|
- `kinesis_streams`
|
11
12
|
- `kinesis_firehose`
|
12
13
|
- `kinesis_streams_aggregated`
|
13
14
|
|
14
|
-
|
15
|
+
The plugin is also described in [official Fluentd document][fluentd-doc-kinesis].
|
15
16
|
|
16
|
-
**Note**: This README is for v3. Plugin v3 is almost compatible with v2. If you use v1, see
|
17
|
+
**Note**: This README is for the latest v3. Plugin v3 is almost compatible with v2. If you use v1, see [v1 README][v1-readme].
|
17
18
|
|
18
19
|
## Installation
|
19
|
-
This Fluentd plugin is available as the `fluent-plugin-kinesis` gem from RubyGems.
|
20
|
-
|
21
|
-
gem install fluent-plugin-kinesis
|
22
|
-
|
23
|
-
Or you can install this plugin for [td-agent][td-agent] as:
|
24
|
-
|
25
|
-
td-agent-gem install fluent-plugin-kinesis
|
26
|
-
|
27
|
-
If you would like to build by yourself and install, see the section below. Your need [bundler][bundler] for this.
|
28
20
|
|
29
|
-
|
21
|
+
Simply use RubyGems:
|
30
22
|
|
31
|
-
|
32
|
-
cd aws-fluent-plugin-kinesis
|
33
|
-
bundle install
|
34
|
-
bundle exec rake build
|
35
|
-
bundle exec rake install
|
23
|
+
$ gem install fluent-plugin-kinesis --no-document
|
36
24
|
|
37
|
-
|
25
|
+
If you would like to build by yourself and install, you can build and install as follows:
|
38
26
|
|
39
|
-
git clone https://github.com/awslabs/aws-fluent-plugin-kinesis.git
|
40
|
-
cd aws-fluent-plugin-kinesis
|
41
|
-
bundle install
|
42
|
-
bundle exec rake build
|
43
|
-
|
27
|
+
$ git clone https://github.com/awslabs/aws-fluent-plugin-kinesis.git
|
28
|
+
$ cd aws-fluent-plugin-kinesis
|
29
|
+
$ bundle install
|
30
|
+
$ bundle exec rake build
|
31
|
+
$ bundle exec rake install
|
44
32
|
|
45
|
-
|
33
|
+
If using td-agent v4 or lower, use td-agent-gem:
|
46
34
|
|
47
|
-
|
48
|
-
cd aws-fluent-plugin-kinesis
|
49
|
-
bundle install
|
50
|
-
export RUBYLIB=$RUBYLIB:/path/to/aws-fluent-plugin-kinesis/lib
|
35
|
+
$ td-agent-gem install fluent-plugin-kinesis
|
51
36
|
|
52
|
-
|
53
|
-
* Ruby 2.4.2+
|
54
|
-
* Fluentd 0.14.22+ (td-agent v3.1.0+)
|
37
|
+
If using fluent-package v5 or higher, use fluent-gem:
|
55
38
|
|
56
|
-
|
57
|
-
Here are general procedures for using this plugin:
|
39
|
+
$ fluent-gem install fluent-plugin-kinesis
|
58
40
|
|
59
|
-
|
60
|
-
1. Edit configuration
|
61
|
-
1. Run Fluentd or td-agent
|
41
|
+
## Requirements
|
62
42
|
|
63
|
-
|
43
|
+
| fluent-plugin-kinesis | fluentd | ruby |
|
44
|
+
|:---------------------:|:-----------:|:--------:|
|
45
|
+
| >= 3.6.0 | >= 0.14.22 | >= 2.7.1 |
|
46
|
+
| >= 3.5.0 && < 3.6.0 | >= 0.14.22 | >= 2.4.2 |
|
47
|
+
| >= 3.2.0 && < 3.5.0 | >= 0.14.22 | >= 2.3 |
|
48
|
+
| >= 3.0.0 && < 3.2.0 | >= 0.14.10 | >= 2.1 |
|
49
|
+
| >= 2.0.0 && < 3.0.0 | >= 0.12.35 | >= 2.1 |
|
50
|
+
| < 2.0.0 | >= 0.10.58 | >= 2.0 |
|
64
51
|
|
65
|
-
|
66
|
-
1. Edit configuration file and save it as 'fluentd.conf'.
|
67
|
-
1. Then, run `fluentd -c /path/to/fluentd.conf`
|
52
|
+
## Getting Started
|
68
53
|
|
69
|
-
|
54
|
+
When you run this plugin on Amazon EC2 instances or container services, use [instance profiles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) to assume role. If you want to use specific credentials, see [Credentials](#configuration-credentials).
|
70
55
|
|
71
|
-
|
72
|
-
1. Edit configuration file provided by td-agent.
|
73
|
-
1. Then, run or restart td-agent.
|
56
|
+
### kinesis_streams
|
74
57
|
|
75
|
-
|
76
|
-
Assume you use Amazon EC2 instances with Instance profile. If you want to use specific credentials, see [Credentials](#configuration-credentials).
|
58
|
+
In your Fluentd configuration, use `@type kinesis_streams`. The configuration would look like this:
|
77
59
|
|
78
|
-
|
79
|
-
<match your_tag>
|
60
|
+
<match *>
|
80
61
|
@type kinesis_streams
|
81
62
|
region us-east-1
|
82
|
-
stream_name
|
63
|
+
stream_name YOUR_STREAM
|
83
64
|
partition_key key # Otherwise, use random partition key
|
84
65
|
</match>
|
66
|
+
|
85
67
|
For more details, see [Configuration: kinesis_streams](#configuration-kinesis_streams).
|
86
68
|
|
87
69
|
### kinesis_firehose
|
88
|
-
|
70
|
+
|
71
|
+
In your Fluentd configuration, use `@type kinesis_firehose`. The configuration would look like this:
|
72
|
+
|
73
|
+
<match *>
|
89
74
|
@type kinesis_firehose
|
90
75
|
region us-east-1
|
91
|
-
delivery_stream_name
|
76
|
+
delivery_stream_name YOUR_STREAM
|
92
77
|
</match>
|
78
|
+
|
93
79
|
For more details, see [Configuration: kinesis_firehose](#configuration-kinesis_firehose).
|
94
80
|
|
95
81
|
### kinesis_streams_aggregated
|
96
|
-
|
82
|
+
|
83
|
+
In your Fluentd configuration, use `@type kinesis_streams_aggregated`. The configuration would look like this:
|
84
|
+
|
85
|
+
<match *>
|
97
86
|
@type kinesis_streams_aggregated
|
98
87
|
region us-east-1
|
99
|
-
stream_name
|
88
|
+
stream_name YOUR_STREAM
|
100
89
|
# Unlike kinesis_streams, there is no way to use dynamic partition key.
|
101
90
|
# fixed_partition_key or random.
|
102
91
|
</match>
|
92
|
+
|
103
93
|
For more details, see [Configuration: kinesis_streams_aggregated](#configuration-kinesis_streams_aggregated).
|
104
94
|
|
105
|
-
|
106
|
-
|
95
|
+
## Configuration
|
96
|
+
|
97
|
+
- [Configuration: Plugin](#configuration-plugin)
|
98
|
+
- [Configuration: kinesis_streams](#configuration-kinesis_streams)
|
99
|
+
- [Configuration: kinesis_firehose](#configuration-kinesis_firehose)
|
100
|
+
- [Configuration: kinesis_streams_aggregated](#configuration-kinesis_streams_aggregated)
|
101
|
+
- [Configuration: Credentials](#configuration-credentials)
|
102
|
+
- [AWS key and secret authentication](#aws-key-and-secret-authentication)
|
103
|
+
- [\<assume_role_credentials\> section](#assume_role_credentials-section)
|
104
|
+
- [\<web_identity_credentials\> section](#web_identity_credentials-section)
|
105
|
+
- [\<instance_profile_credentials\> section](#instance_profile_credentials-section)
|
106
|
+
- [\<shared_credentials\> section](#shared_credentials-section)
|
107
|
+
- [\<process_credentials\> section](#process_credentials-section)
|
108
|
+
- [Configuration: Performance](#configuration-performance)
|
109
|
+
- [\<buffer\> section](#buffer-section)
|
110
|
+
- [Configuration: Batch Request](#configuration-batch-request)
|
111
|
+
- [Configuration: Format](#configuration-format)
|
112
|
+
- [\<format\> section](#format-section)
|
113
|
+
- [\<inject\> section](#inject-section)
|
114
|
+
- [Configuration: AWS SDK](#configuration-aws-sdk)
|
115
|
+
|
116
|
+
## Configuration: Plugin
|
117
|
+
|
118
|
+
### Configuration: kinesis_streams
|
119
|
+
|
120
|
+
The following parameters are `kinesis_streams` specific configurations.
|
121
|
+
|
122
|
+
#### stream_name
|
123
|
+
|
124
|
+
Name of the stream to put data.
|
125
|
+
|
126
|
+
As of Fluentd v1, you can use placeholders for this `stream_name` parameter. Note that chunk keys are required in your buffer section attributes for placeholders to work.
|
127
|
+
|
128
|
+
The following configuration shows `kinesis_streams` output plugin that applies extract_placeholders on `stream_name`:
|
129
|
+
|
130
|
+
# chunk_key: tag
|
131
|
+
# ${tag} will be replaced with actual tag string
|
132
|
+
<match *>
|
133
|
+
@type kinesis_streams
|
134
|
+
stream_name ${tag}-stream
|
135
|
+
|
136
|
+
<buffer tag>
|
137
|
+
# ...
|
138
|
+
</buffer>
|
139
|
+
</match>
|
107
140
|
|
108
|
-
|
109
|
-
chunk_limit_size 1m
|
110
|
-
flush_thread_interval 0.1
|
111
|
-
flush_thread_burst_interval 0.01
|
112
|
-
flush_thread_count 15
|
141
|
+
The value of `timekey` in buffer chunk keys can be extracted using `strptime` placeholders like this:
|
113
142
|
|
114
|
-
|
143
|
+
# chunk_key: tag and time
|
144
|
+
<match *>
|
145
|
+
@type kinesis_streams
|
146
|
+
stream_name ${tag}-stream-%Y%m%d
|
115
147
|
|
116
|
-
|
148
|
+
<buffer tag, time>
|
149
|
+
# ...
|
150
|
+
</buffer>
|
151
|
+
</match>
|
152
|
+
|
153
|
+
You can also use custom placeholder like this:
|
154
|
+
|
155
|
+
# chunk_key: $.kubernetes.annotations.kinesis_stream
|
156
|
+
<match *>
|
157
|
+
@type kinesis_streams
|
158
|
+
stream_name "${$.kubernetes.annotations.kinesis_stream}"
|
159
|
+
|
160
|
+
<buffer $.kubernetes.annotations.kinesis_stream>
|
161
|
+
# ...
|
162
|
+
</buffer>
|
163
|
+
</match>
|
164
|
+
|
165
|
+
For more details, see [Placeholders in Config: Buffer Section][fluentd-buffer-section-placeholders].
|
166
|
+
|
167
|
+
#### partition_key
|
168
|
+
|
169
|
+
A key to extract partition key from JSON object. Default `nil`, which means partition key will be generated randomly.
|
170
|
+
|
171
|
+
### Configuration: kinesis_firehose
|
172
|
+
|
173
|
+
The following parameters are `kinesis_firehose` specific configurations.
|
174
|
+
|
175
|
+
#### delivery_stream_name
|
176
|
+
|
177
|
+
Name of the delivery stream to put data.
|
178
|
+
|
179
|
+
As of Fluentd v1, placerholders are supported. For more details, see [stream_name for kinesis_streams plugin](#stream_name) and [Placeholders in Config: Buffer Section][fluentd-buffer-section-placeholders].
|
180
|
+
|
181
|
+
#### append_new_line
|
182
|
+
|
183
|
+
Boolean. Default `true`. If it is enabled, the plugin adds new line character (`\n`) to each serialized record.
|
184
|
+
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).
|
185
|
+
|
186
|
+
### Configuration: kinesis_streams_aggregated
|
187
|
+
|
188
|
+
The following parameters are `kinesis_streams_aggregated` specific configurations.
|
189
|
+
|
190
|
+
#### stream_name (kinesis_streams_aggregated)
|
191
|
+
|
192
|
+
Name of the stream to put data.
|
193
|
+
|
194
|
+
As of Fluentd v1, placerholders are supported. For more details, see [stream_name for kinesis_streams plugin](#stream_name) and [Placeholders in Config: Buffer Section][fluentd-buffer-section-placeholders].
|
195
|
+
|
196
|
+
#### fixed_partition_key
|
197
|
+
|
198
|
+
A value of fixed partition key. Default `nil`, which means partition key will be generated randomly. Note that all records will go to single shard if you specify this option.
|
117
199
|
|
118
200
|
## Configuration: Credentials
|
119
|
-
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).
|
120
201
|
|
121
|
-
|
202
|
+
To put records into Amazon Kinesis Data Streams or Amazon Data Firehose, you need to provide AWS security credentials. Without specifying credentials in config file, this plugin automatically fetches credentials just following AWS SDK for Ruby does (environment variable, shared profile, or instance profile).
|
203
|
+
|
204
|
+
This plugin uses almost same configurations as [fluent-plugin-s3][fluent-plugin-s3-credentials], but also supports several additional configurations like `aws_ses_token` for temporary credentials.
|
205
|
+
|
206
|
+
### AWS key and secret authentication
|
122
207
|
|
123
|
-
|
208
|
+
These parameters are 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
209
|
|
125
|
-
|
210
|
+
#### aws_key_id (required)
|
126
211
|
|
127
|
-
|
212
|
+
AWS access key id.
|
128
213
|
|
129
|
-
|
214
|
+
#### aws_sec_key (required)
|
130
215
|
|
131
|
-
|
216
|
+
AWS secret key.
|
217
|
+
|
218
|
+
#### aws_ses_token
|
132
219
|
|
133
220
|
AWS session token. This parameter is optional, but can be provided if using MFA or temporary credentials when your agent is not running on EC2 instance with an IAM Role.
|
134
221
|
|
135
|
-
|
222
|
+
#### aws_iam_retries
|
136
223
|
|
137
224
|
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.
|
138
225
|
|
139
|
-
### assume_role_credentials
|
226
|
+
### \<assume_role_credentials\> section
|
227
|
+
|
140
228
|
Typically, you can use AssumeRole for cross-account access or federation.
|
141
229
|
|
142
230
|
<match *>
|
@@ -155,38 +243,39 @@ See also:
|
|
155
243
|
* [Aws::STS::Client](https://docs.aws.amazon.com/sdkforruby/api/Aws/STS/Client.html)
|
156
244
|
* [Aws::AssumeRoleCredentials](https://docs.aws.amazon.com/sdkforruby/api/Aws/AssumeRoleCredentials.html)
|
157
245
|
|
158
|
-
|
246
|
+
#### role_arn (required)
|
159
247
|
|
160
248
|
The Amazon Resource Name (ARN) of the role to assume.
|
161
249
|
|
162
|
-
|
250
|
+
#### role_session_name (required)
|
163
251
|
|
164
252
|
An identifier for the assumed role session.
|
165
253
|
|
166
|
-
|
254
|
+
#### policy
|
167
255
|
|
168
256
|
An IAM policy in JSON format.
|
169
257
|
|
170
|
-
|
258
|
+
#### duration_seconds
|
171
259
|
|
172
260
|
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.
|
173
261
|
|
174
|
-
|
262
|
+
#### external_id
|
175
263
|
|
176
264
|
A unique identifier that is used by third parties when assuming roles in their customers' accounts.
|
177
265
|
|
178
|
-
|
266
|
+
#### sts_http_proxy
|
179
267
|
|
180
268
|
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.
|
181
|
-
It should be added to assume_role_credentials
|
269
|
+
It should be added to *assume_role_credentials* section in the next format:
|
270
|
+
|
182
271
|
sts_http_proxy http://[username:password]@hostname:port
|
183
272
|
|
184
|
-
|
273
|
+
#### sts_endpoint_url
|
185
274
|
|
186
|
-
STS API endpoint url. This can be used to override the default global STS API endpoint of sts.amazonaws.com
|
275
|
+
STS API endpoint url. This can be used to override the default global STS API endpoint of *sts.amazonaws.com*. Using regional endpoints may be preferred to reduce latency, and are required if utilizing a PrivateLink VPC Endpoint for STS API calls.
|
187
276
|
|
188
277
|
|
189
|
-
### web_identity_credentials
|
278
|
+
### \<web_identity_credentials\> section
|
190
279
|
|
191
280
|
Similar to the assume_role_credentials, but for usage in EKS.
|
192
281
|
|
@@ -207,29 +296,27 @@ See also:
|
|
207
296
|
* [Aws::STS::Client](http://docs.aws.amazon.com/sdkforruby/api/Aws/STS/Client.html)
|
208
297
|
* [Aws::AssumeRoleWebIdentityCredentials](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/AssumeRoleWebIdentityCredentials.html)
|
209
298
|
|
210
|
-
|
299
|
+
#### role_arn (required)
|
211
300
|
|
212
301
|
The Amazon Resource Name (ARN) of the role to assume.
|
213
302
|
|
214
|
-
|
303
|
+
#### role_session_name (required)
|
215
304
|
|
216
305
|
An identifier for the assumed role session.
|
217
306
|
|
218
|
-
|
307
|
+
#### web_identity_token_file (required)
|
219
308
|
|
220
|
-
The absolute path to the file on disk containing the OIDC token
|
309
|
+
The absolute path to the file on disk containing the OIDC token.
|
221
310
|
|
222
|
-
|
311
|
+
#### policy
|
223
312
|
|
224
313
|
An IAM policy in JSON format.
|
225
314
|
|
226
|
-
|
315
|
+
#### duration_seconds
|
227
316
|
|
228
|
-
The duration, in seconds, of the role session. The value can range from
|
229
|
-
900 seconds (15 minutes) to 43200 seconds (12 hours). By default, the value
|
230
|
-
is set to 3600 seconds (1 hour).
|
317
|
+
The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) to 43200 seconds (12 hours). By default, the value is set to 3600 seconds (1 hour).
|
231
318
|
|
232
|
-
### instance_profile_credentials
|
319
|
+
### \<instance_profile_credentials\> section
|
233
320
|
|
234
321
|
Retrieve temporary security credentials via HTTP request. This is useful on EC2 instance.
|
235
322
|
|
@@ -250,27 +337,27 @@ See also:
|
|
250
337
|
* [Instance Metadata and User Data - Amazon Elastic Compute
|
251
338
|
Cloud](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
|
252
339
|
|
253
|
-
|
340
|
+
#### retries
|
254
341
|
|
255
342
|
Number of times to retry when retrieving credentials. Default is 5.
|
256
343
|
|
257
|
-
|
344
|
+
#### ip_address
|
258
345
|
|
259
346
|
Default is 169.254.169.254.
|
260
347
|
|
261
|
-
|
348
|
+
#### port
|
262
349
|
|
263
350
|
Default is 80.
|
264
351
|
|
265
|
-
|
352
|
+
#### http_open_timeout
|
266
353
|
|
267
354
|
Default is 5.
|
268
355
|
|
269
|
-
|
356
|
+
#### http_read_timeout
|
270
357
|
|
271
358
|
Default is 5.
|
272
359
|
|
273
|
-
### shared_credentials
|
360
|
+
### \<shared_credentials\> section
|
274
361
|
|
275
362
|
This loads AWS access credentials from local ini file. This is useful for local developing.
|
276
363
|
|
@@ -287,15 +374,15 @@ See also:
|
|
287
374
|
|
288
375
|
* [Aws::SharedCredentials](https://docs.aws.amazon.com/sdkforruby/api/Aws/SharedCredentials.html)
|
289
376
|
|
290
|
-
|
377
|
+
#### path
|
291
378
|
|
292
379
|
Path to the shared file. Defaults to "#{Dir.home}/.aws/credentials".
|
293
380
|
|
294
|
-
|
381
|
+
#### profile_name
|
295
382
|
|
296
383
|
Defaults to 'default' or `[ENV]('AWS_PROFILE')`.
|
297
384
|
|
298
|
-
### process_credentials
|
385
|
+
### \<process_credentials\> section
|
299
386
|
|
300
387
|
This loads AWS access credentials from an external process.
|
301
388
|
|
@@ -312,85 +399,42 @@ See also:
|
|
312
399
|
* [Aws::ProcessCredentials](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ProcessCredentials.html)
|
313
400
|
* [Sourcing Credentials From External Processes](https://docs.aws.amazon.com/cli/latest/topic/config-vars.html#sourcing-credentials-from-external-processes)
|
314
401
|
|
315
|
-
|
402
|
+
#### process (required)
|
316
403
|
|
317
404
|
Command to be executed as an external process.
|
318
405
|
|
319
|
-
## Configuration:
|
406
|
+
## Configuration: Performance
|
320
407
|
|
321
|
-
###
|
322
|
-
This plugin uses `Fluent::TextFormatter` to serialize record to string. See [formatter.rb] for more details. By default, it uses `json` formatter same as specific like below:
|
408
|
+
### \<buffer\> section
|
323
409
|
|
324
|
-
|
325
|
-
@type kinesis_streams
|
326
|
-
|
327
|
-
<format>
|
328
|
-
@type json
|
329
|
-
</format>
|
330
|
-
</match>
|
331
|
-
|
332
|
-
For other configurations of `json` formatter, see [json formatter plugin][fluentd-formatter-json].
|
333
|
-
|
334
|
-
### inject (section)
|
335
|
-
This plugin uses `Fluent::TimeFormatter` and other injection configurations. See [inject.rb] for more details.
|
336
|
-
|
337
|
-
For example, the config below will add `time` field whose value is event time with nanosecond and `tag` field whose value is its tag.
|
410
|
+
Use Fluentd buffering and flushing parameters to optimize throughput. When you use Fluent v1+ (td-agent v3+), write these configurations in buffer section like this:
|
338
411
|
|
339
412
|
<match *>
|
340
413
|
@type kinesis_streams
|
341
414
|
|
342
|
-
<
|
343
|
-
|
344
|
-
|
345
|
-
|
415
|
+
<buffer>
|
416
|
+
flush_interval 1
|
417
|
+
chunk_limit_size 1m
|
418
|
+
flush_thread_interval 0.1
|
419
|
+
flush_thread_burst_interval 0.01
|
420
|
+
flush_thread_count 15
|
421
|
+
</buffer>
|
346
422
|
</match>
|
347
423
|
|
348
|
-
|
349
|
-
|
350
|
-
Also, there are some format related options below:
|
424
|
+
For more details, see [Config: Buffer Section][fluentd-buffer-section]. Note that each parameter should be adjusted to your system.
|
351
425
|
|
352
|
-
###
|
353
|
-
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.
|
426
|
+
### Configuration: Batch Request
|
354
427
|
|
355
|
-
|
356
|
-
Specifying compression way for data of each record. Current accepted options are `zlib` and `gzip`. Otherwise, no compression will be preformed.
|
428
|
+
#### retries_on_batch_request
|
357
429
|
|
358
|
-
### log_truncate_max_size
|
359
|
-
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.
|
360
|
-
|
361
|
-
### chomp_record
|
362
|
-
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.
|
363
|
-
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).
|
364
|
-
|
365
|
-
## Configuration: API
|
366
|
-
### region
|
367
|
-
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.
|
368
|
-
|
369
|
-
Default `nil`, which means try to find from environment variable `AWS_REGION`.
|
370
|
-
|
371
|
-
### max_record_size
|
372
|
-
The upper limit of size of each record. Default is 1 MB which is the limitation of Kinesis.
|
373
|
-
|
374
|
-
### http_proxy
|
375
|
-
HTTP proxy for API calling. Default `nil`.
|
376
|
-
|
377
|
-
### endpoint
|
378
|
-
API endpoint URL, for testing. Default `nil`.
|
379
|
-
|
380
|
-
### ssl_verify_peer
|
381
|
-
Boolean. Disable if you want to verify ssl connection, for testing. Default `true`.
|
382
|
-
|
383
|
-
### debug
|
384
|
-
Boolean. Enable if you need to debug Amazon Kinesis Data Firehose API call. Default is `false`.
|
385
|
-
|
386
|
-
## Configuration: Batch request
|
387
|
-
### retries_on_batch_request
|
388
430
|
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.
|
389
431
|
|
390
|
-
|
432
|
+
#### reset_backoff_if_success
|
433
|
+
|
391
434
|
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.
|
392
435
|
|
393
|
-
|
436
|
+
#### batch_request_max_count
|
437
|
+
|
394
438
|
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.
|
395
439
|
|
396
440
|
Default:
|
@@ -399,7 +443,8 @@ Default:
|
|
399
443
|
- `kinesis_firehose`: 500
|
400
444
|
- `kinesis_streams_aggregated`: 100,000
|
401
445
|
|
402
|
-
|
446
|
+
#### batch_request_max_size
|
447
|
+
|
403
448
|
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.
|
404
449
|
|
405
450
|
Default:
|
@@ -408,117 +453,95 @@ Default:
|
|
408
453
|
- `kinesis_firehose`: 4 MB
|
409
454
|
- `kinesis_streams_aggregated`: 1 MB
|
410
455
|
|
411
|
-
|
456
|
+
#### drop_failed_records_after_batch_request_retries
|
457
|
+
|
412
458
|
Boolean, default `true`.
|
413
459
|
|
414
460
|
If *drop_failed_records_after_batch_request_retries* is enabled (default), the plugin will drop failed records when batch request fails after retrying max times configured as *retries_on_batch_request*. This dropping can be monitored from [monitor_agent](https://docs.fluentd.org/input/monitor_agent) or [fluent-plugin-prometheus](https://docs.fluentd.org/monitoring-fluentd/monitoring-prometheus) as *retry_count* or *num_errors* metrics.
|
415
461
|
|
416
462
|
If *drop_failed_records_after_batch_request_retries* is disabled, the plugin will raise error and return chunk to Fluentd buffer when batch request fails after retrying max times. Fluentd will retry to send chunk records according to retry config in [Buffer Section](https://docs.fluentd.org/configuration/buffer-section). Note that this retryng may create duplicate records since [PutRecords API](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecords.html) of Kinesis Data Streams and [PutRecordBatch API](https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html) of Kinesis Data Firehose may return a partially successful response.
|
417
463
|
|
418
|
-
|
464
|
+
#### monitor_num_of_batch_request_retries
|
465
|
+
|
419
466
|
Boolean, default `false`. If enabled, the plugin will increment *retry_count* monitoring metrics after internal retrying to send batch request. This configuration enables you to monitor [ProvisionedThroughputExceededException](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecords.html) from [monitor_agent](https://docs.fluentd.org/input/monitor_agent) or [fluent-plugin-prometheus](https://docs.fluentd.org/monitoring-fluentd/monitoring-prometheus). Note that *retry_count* metrics will be counted by the plugin in addition to original Fluentd buffering mechanism if *monitor_num_of_batch_request_retries* is enabled.
|
420
467
|
|
421
|
-
## Configuration:
|
422
|
-
Here are `kinesis_streams` specific configurations.
|
468
|
+
## Configuration: Format
|
423
469
|
|
424
|
-
###
|
425
|
-
Name of the stream to put data.
|
470
|
+
### \<format\> section
|
426
471
|
|
427
|
-
|
472
|
+
This plugin uses `Fluent::TextFormatter` to serialize record to string. See [formatter.rb] for more details. By default, it uses `json` formatter same as specific like below:
|
428
473
|
|
429
|
-
|
430
|
-
|
474
|
+
<match *>
|
475
|
+
@type kinesis_streams
|
431
476
|
|
432
|
-
|
477
|
+
<format>
|
478
|
+
@type json
|
479
|
+
</format>
|
480
|
+
</match>
|
433
481
|
|
434
|
-
|
482
|
+
For other configurations of `json` formatter, see [json formatter plugin][fluentd-formatter-json].
|
435
483
|
|
436
|
-
|
437
|
-
stream_name "${$.kubernetes.annotations.kinesis_streams}"
|
438
|
-
```
|
484
|
+
### \<inject\> section
|
439
485
|
|
440
|
-
|
486
|
+
This plugin uses `Fluent::TimeFormatter` and other injection configurations. See [inject.rb] for more details.
|
441
487
|
|
442
|
-
|
443
|
-
# $.kubernetes.annotations.kinesis_streams needs to be set in buffer attributes
|
444
|
-
<buffer $.kubernetes.annotations.kinesis_streams>
|
445
|
-
# ...
|
446
|
-
</buffer>
|
447
|
-
```
|
488
|
+
For example, the config below will add `time` field whose value is event time with nanosecond and `tag` field whose value is its tag.
|
448
489
|
|
449
|
-
|
490
|
+
<match *>
|
491
|
+
@type kinesis_streams
|
450
492
|
|
451
|
-
|
452
|
-
|
493
|
+
<inject>
|
494
|
+
time_key time
|
495
|
+
tag_key tag
|
496
|
+
</inject>
|
497
|
+
</match>
|
453
498
|
|
454
|
-
|
455
|
-
Here are `kinesis_firehose` specific configurations.
|
499
|
+
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.
|
456
500
|
|
457
|
-
|
458
|
-
Name of the delivery stream to put data.
|
501
|
+
In addition, there are some format related options:
|
459
502
|
|
460
|
-
|
503
|
+
#### data_key
|
461
504
|
|
462
|
-
**
|
463
|
-
Built-in placeholders require target key information in your buffer section attributes.
|
505
|
+
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.
|
464
506
|
|
465
|
-
|
507
|
+
#### compression
|
466
508
|
|
467
|
-
|
509
|
+
Specifying compression way for data of each record. Current accepted options are `zlib` and `gzip`. Otherwise, no compression will be preformed.
|
468
510
|
|
469
|
-
|
470
|
-
delivery_stream_name "${$.kubernetes.annotations.kinesis_firehose_streams}"
|
471
|
-
```
|
511
|
+
#### log_truncate_max_size
|
472
512
|
|
473
|
-
|
513
|
+
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.
|
474
514
|
|
475
|
-
|
476
|
-
# $.kubernetes.annotations.kinesis_firehose_streams needs to be set in buffer attributes
|
477
|
-
<buffer $.kubernetes.annotations.kinesis_firehose_streams>
|
478
|
-
# ...
|
479
|
-
</buffer>
|
480
|
-
```
|
515
|
+
#### chomp_record
|
481
516
|
|
482
|
-
|
517
|
+
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.
|
518
|
+
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).
|
483
519
|
|
484
|
-
|
485
|
-
Boolean. Default `true`. If it is enabled, the plugin adds new line character (`\n`) to each serialized record.
|
486
|
-
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).
|
520
|
+
## Configuration: AWS SDK
|
487
521
|
|
488
|
-
|
489
|
-
Here are `kinesis_streams_aggregated` specific configurations.
|
522
|
+
#### region
|
490
523
|
|
491
|
-
|
492
|
-
Name of the stream to put data.
|
524
|
+
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. Default `nil`, which means try to find from environment variable `AWS_REGION`.
|
493
525
|
|
494
|
-
|
526
|
+
#### max_record_size
|
495
527
|
|
496
|
-
|
497
|
-
Built-in placeholders require target key information in your buffer section attributes.
|
528
|
+
The upper limit of size of each record. Default is 1 MB which is the limitation of Kinesis.
|
498
529
|
|
499
|
-
|
530
|
+
#### http_proxy
|
500
531
|
|
501
|
-
|
532
|
+
HTTP proxy for API calling. Default `nil`.
|
502
533
|
|
503
|
-
|
504
|
-
stream_name "${$.kubernetes.annotations.kinesis_streams_aggregated}"
|
505
|
-
```
|
534
|
+
#### endpoint
|
506
535
|
|
507
|
-
|
536
|
+
API endpoint URL, for testing. Default `nil`.
|
508
537
|
|
509
|
-
|
510
|
-
# $.kubernetes.annotations.kinesis_streams_aggregated needs to be set in buffer attributes
|
511
|
-
<buffer $.kubernetes.annotations.kinesis_streams_aggregated>
|
512
|
-
# ...
|
513
|
-
</buffer>
|
514
|
-
```
|
538
|
+
#### ssl_verify_peer
|
515
539
|
|
516
|
-
|
540
|
+
Boolean. Disable if you want to verify ssl connection, for testing. Default `true`.
|
517
541
|
|
518
|
-
|
519
|
-
A value of fixed partition key. Default `nil`, which means partition key will be generated randomly.
|
542
|
+
#### debug
|
520
543
|
|
521
|
-
|
544
|
+
Boolean. Enable if you need to debug Amazon Data Firehose API call. Default is `false`.
|
522
545
|
|
523
546
|
## Development
|
524
547
|
|
@@ -540,20 +563,18 @@ Bug reports and pull requests are welcome on [GitHub][github].
|
|
540
563
|
## Related Resources
|
541
564
|
|
542
565
|
* [Amazon Kinesis Data Streams Developer Guide](http://docs.aws.amazon.com/kinesis/latest/dev/introduction.html)
|
543
|
-
* [Amazon
|
566
|
+
* [Amazon Data Firehose Developer Guide](http://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html)
|
544
567
|
|
545
|
-
[
|
568
|
+
[github]: https://github.com/awslabs/aws-fluent-plugin-kinesis
|
569
|
+
[fluentd-doc-kinesis]: https://docs.fluentd.org/how-to-guides/kinesis-stream
|
570
|
+
[v1-readme]: https://github.com/awslabs/aws-fluent-plugin-kinesis/blob/v1/README.md
|
546
571
|
[streams]: https://aws.amazon.com/kinesis/streams/
|
547
572
|
[firehose]: https://aws.amazon.com/kinesis/firehose/
|
548
573
|
[kpl]: https://github.com/awslabs/amazon-kinesis-producer/blob/master/aggregation-format.md
|
549
|
-
[td-agent]: https://github.com/treasure-data/omnibus-td-agent
|
550
|
-
[bundler]: https://bundler.io/
|
551
574
|
[region]: https://docs.aws.amazon.com/general/latest/gr/rande.html#ak_region
|
575
|
+
[fluent-plugin-s3-credentials]: https://github.com/fluent/fluent-plugin-s3/blob/master/docs/credentials.md
|
552
576
|
[fluentd-buffer-section]: https://docs.fluentd.org/configuration/buffer-section
|
577
|
+
[fluentd-buffer-section-placeholders]: https://docs.fluentd.org/configuration/buffer-section#placeholders
|
553
578
|
[fluentd-formatter-json]: https://docs.fluentd.org/formatter/json
|
554
|
-
[github]: https://github.com/awslabs/aws-fluent-plugin-kinesis
|
555
579
|
[formatter.rb]: https://github.com/fluent/fluentd/blob/master/lib/fluent/formatter.rb
|
556
580
|
[inject.rb]: https://github.com/fluent/fluentd/blob/master/lib/fluent/plugin_helper/inject.rb
|
557
|
-
[fluentd-doc-kinesis]: https://docs.fluentd.org/how-to-guides/kinesis-stream
|
558
|
-
[fluent-plugin-s3]: https://github.com/fluent/fluent-plugin-s3
|
559
|
-
[v1-readme]: https://github.com/awslabs/aws-fluent-plugin-kinesis/blob/v1/README.md
|
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
29
29
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
30
|
spec.require_paths = ["lib"]
|
31
|
-
spec.required_ruby_version = '>= 2.
|
31
|
+
spec.required_ruby_version = '>= 2.7.1'
|
32
32
|
|
33
33
|
spec.add_dependency "fluentd", ">= 0.14.22", "< 2"
|
34
34
|
|
@@ -55,7 +55,7 @@ Gem::Specification.new do |spec|
|
|
55
55
|
# https://github.com/aws/aws-sdk-ruby/commit/e26577d2a426a4be79cd2d9edc1a4a4176e388ba#diff-10f50e27b30c3dc522b3c25db5782e2e
|
56
56
|
spec.add_dependency "aws-sdk-firehose", "~> 1", "!= 1.5", "!= 1.9", "!= 1.15"
|
57
57
|
|
58
|
-
spec.add_dependency "google-protobuf", "~>
|
58
|
+
spec.add_dependency "google-protobuf", "~> 4"
|
59
59
|
|
60
60
|
spec.add_development_dependency "bundler", ">= 1.10"
|
61
61
|
spec.add_development_dependency "rake", ">= 10.0"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
4
|
+
gemspec path: ".."
|
5
|
+
|
6
|
+
# Specify related gems for fluent-package v5.0.7
|
7
|
+
# https://github.com/fluent/fluent-package-builder/blob/master/CHANGELOG.md
|
8
|
+
# https://github.com/fluent/fluent-package-builder/blob/v5.0.7/fluent-package/config.rb#L10
|
9
|
+
gem "fluentd", "1.16.9"
|
10
|
+
# https://github.com/fluent/fluent-package-builder/blob/v5.0.7/fluent-package/Gemfile#L57-L67
|
11
|
+
gem "prometheus-client", "2.1.0"
|
12
|
+
gem "fluent-plugin-prometheus", "2.1.0"
|
13
|
+
gem "fluent-plugin-prometheus_pushgateway", "0.1.1"
|
14
|
+
gem "jmespath", "1.6.2"
|
15
|
+
gem "aws-partitions", "1.785.0"
|
16
|
+
gem "aws-sdk-core", "3.178.0"
|
17
|
+
gem "aws-sdk-kms", "1.71.0"
|
18
|
+
gem "aws-sdk-sqs", "1.61.0"
|
19
|
+
gem "aws-sigv4", "1.6.0"
|
20
|
+
gem "aws-sdk-s3", "1.129.0"
|
21
|
+
gem "fluent-plugin-s3", "1.7.2"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
4
|
+
gemspec path: ".."
|
5
|
+
|
6
|
+
# Specify related gems for fluent-package v5.2.0
|
7
|
+
# https://github.com/fluent/fluent-package-builder/blob/master/CHANGELOG.md
|
8
|
+
# https://github.com/fluent/fluent-package-builder/blob/v5.2.0/fluent-package/config.rb#L10
|
9
|
+
gem "fluentd", "1.18.0"
|
10
|
+
# https://github.com/fluent/fluent-package-builder/blob/v5.2.0/fluent-package/Gemfile#L55-L65
|
11
|
+
gem "prometheus-client", "2.1.0"
|
12
|
+
gem "fluent-plugin-prometheus", "2.1.0"
|
13
|
+
gem "fluent-plugin-prometheus_pushgateway", "0.1.1"
|
14
|
+
gem "jmespath", "1.6.2"
|
15
|
+
gem "aws-partitions", "1.957.0"
|
16
|
+
gem "aws-sdk-core", "3.201.2"
|
17
|
+
gem "aws-sdk-kms", "1.88.0"
|
18
|
+
gem "aws-sdk-sqs", "1.80.0"
|
19
|
+
gem "aws-sigv4", "1.8.0"
|
20
|
+
gem "aws-sdk-s3", "1.156.0"
|
21
|
+
gem "fluent-plugin-s3", "1.8.1"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
4
|
+
gemspec path: ".."
|
5
|
+
|
6
|
+
# Specify related gems for td-agent v4.5.3
|
7
|
+
# https://github.com/fluent/fluent-package-builder/blob/master/CHANGELOG-v4.md
|
8
|
+
# https://github.com/fluent/fluent-package-builder/blob/v4.5.3/td-agent/config.rb#L4
|
9
|
+
gem "fluentd", "1.16.3"
|
10
|
+
# https://github.com/fluent/fluent-package-builder/blob/v4.5.2/td-agent/Gemfile#L45-L55
|
11
|
+
gem "prometheus-client", "2.1.0"
|
12
|
+
gem "fluent-plugin-prometheus", "2.1.0"
|
13
|
+
gem "fluent-plugin-prometheus_pushgateway", "0.1.1"
|
14
|
+
gem "jmespath", "1.6.2"
|
15
|
+
gem "aws-partitions", "1.785.0"
|
16
|
+
gem "aws-sdk-core", "3.178.0"
|
17
|
+
gem "aws-sdk-kms", "1.71.0"
|
18
|
+
gem "aws-sdk-sqs", "1.61.0"
|
19
|
+
gem "aws-sigv4", "1.6.0"
|
20
|
+
gem "aws-sdk-s3", "1.129.0"
|
21
|
+
gem "fluent-plugin-s3", "1.7.2"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: kinesis_aggregation.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
|
8
|
+
descriptor_data = "\n\x19kinesis_aggregation.proto\"j\n\x10\x41ggregatedRecord\x12\x1b\n\x13partition_key_table\x18\x01 \x03(\t\x12\x1f\n\x17\x65xplicit_hash_key_table\x18\x02 \x03(\t\x12\x18\n\x07records\x18\x03 \x03(\x0b\x32\x07.Record\"!\n\x03Tag\x12\x0b\n\x03key\x18\x01 \x02(\t\x12\r\n\x05value\x18\x02 \x01(\t\"h\n\x06Record\x12\x1b\n\x13partition_key_index\x18\x01 \x02(\x04\x12\x1f\n\x17\x65xplicit_hash_key_index\x18\x02 \x01(\x04\x12\x0c\n\x04\x64\x61ta\x18\x03 \x02(\x0c\x12\x12\n\x04tags\x18\x04 \x03(\x0b\x32\x04.Tag"
|
9
|
+
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
|
+
pool.add_serialized_file(descriptor_data)
|
12
|
+
|
13
|
+
AggregatedRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("AggregatedRecord").msgclass
|
14
|
+
Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Tag").msgclass
|
15
|
+
Record = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Record").msgclass
|
@@ -14,24 +14,7 @@
|
|
14
14
|
|
15
15
|
require 'fluent/configurable'
|
16
16
|
require 'google/protobuf'
|
17
|
-
|
18
|
-
Google::Protobuf::DescriptorPool.generated_pool.build do
|
19
|
-
add_message "AggregatedRecord" do
|
20
|
-
repeated :partition_key_table, :string, 1
|
21
|
-
repeated :explicit_hash_key_table, :string, 2
|
22
|
-
repeated :records, :message, 3, "Record"
|
23
|
-
end
|
24
|
-
add_message "Tag" do
|
25
|
-
optional :key, :string, 1
|
26
|
-
optional :value, :string, 2
|
27
|
-
end
|
28
|
-
add_message "Record" do
|
29
|
-
optional :partition_key_index, :uint64, 1
|
30
|
-
optional :explicit_hash_key_index, :uint64, 2
|
31
|
-
optional :data, :bytes, 3
|
32
|
-
repeated :tags, :message, 4, "Tag"
|
33
|
-
end
|
34
|
-
end
|
17
|
+
require 'fluent/plugin/gen/kinesis_aggregation_pb'
|
35
18
|
|
36
19
|
module Fluent
|
37
20
|
module Plugin
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// Based on https://github.com/awslabs/amazon-kinesis-producer/blob/master/aggregation-format.md
|
2
|
+
|
3
|
+
message AggregatedRecord {
|
4
|
+
repeated string partition_key_table = 1;
|
5
|
+
repeated string explicit_hash_key_table = 2;
|
6
|
+
repeated Record records = 3;
|
7
|
+
}
|
8
|
+
|
9
|
+
message Tag {
|
10
|
+
required string key = 1;
|
11
|
+
optional string value = 2;
|
12
|
+
}
|
13
|
+
|
14
|
+
message Record {
|
15
|
+
required uint64 partition_key_index = 1;
|
16
|
+
optional uint64 explicit_hash_key_index = 2;
|
17
|
+
required bytes data = 3;
|
18
|
+
repeated Tag tags = 4;
|
19
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-kinesis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '4'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '4'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: bundler
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -286,8 +286,10 @@ files:
|
|
286
286
|
- gemfiles/Gemfile.fluent-package-5.0.0
|
287
287
|
- gemfiles/Gemfile.fluent-package-5.0.1
|
288
288
|
- gemfiles/Gemfile.fluent-package-5.0.2
|
289
|
+
- gemfiles/Gemfile.fluent-package-5.0.7
|
290
|
+
- gemfiles/Gemfile.fluent-package-5.2.0
|
289
291
|
- gemfiles/Gemfile.fluentd-0.14.22
|
290
|
-
- gemfiles/Gemfile.fluentd-1.
|
292
|
+
- gemfiles/Gemfile.fluentd-1.19.0
|
291
293
|
- gemfiles/Gemfile.td-agent-3.1.0
|
292
294
|
- gemfiles/Gemfile.td-agent-3.1.1
|
293
295
|
- gemfiles/Gemfile.td-agent-3.2.0
|
@@ -316,6 +318,8 @@ files:
|
|
316
318
|
- gemfiles/Gemfile.td-agent-4.5.0
|
317
319
|
- gemfiles/Gemfile.td-agent-4.5.1
|
318
320
|
- gemfiles/Gemfile.td-agent-4.5.2
|
321
|
+
- gemfiles/Gemfile.td-agent-4.5.3
|
322
|
+
- lib/fluent/plugin/gen/kinesis_aggregation_pb.rb
|
319
323
|
- lib/fluent/plugin/kinesis.rb
|
320
324
|
- lib/fluent/plugin/kinesis_helper/aggregator.rb
|
321
325
|
- lib/fluent/plugin/kinesis_helper/api.rb
|
@@ -325,6 +329,7 @@ files:
|
|
325
329
|
- lib/fluent/plugin/out_kinesis_streams.rb
|
326
330
|
- lib/fluent/plugin/out_kinesis_streams_aggregated.rb
|
327
331
|
- lib/fluent_plugin_kinesis/version.rb
|
332
|
+
- proto/kinesis_aggregation.proto
|
328
333
|
homepage: https://github.com/awslabs/aws-fluent-plugin-kinesis
|
329
334
|
licenses:
|
330
335
|
- Apache-2.0
|
@@ -337,7 +342,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
337
342
|
requirements:
|
338
343
|
- - ">="
|
339
344
|
- !ruby/object:Gem::Version
|
340
|
-
version: 2.
|
345
|
+
version: 2.7.1
|
341
346
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
342
347
|
requirements:
|
343
348
|
- - ">="
|