fluentd 1.12.4-x86-mingw32 → 1.13.3-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fluentd might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.yaml +69 -0
- data/.github/ISSUE_TEMPLATE/feature_request.yaml +38 -0
- data/.github/workflows/linux-test.yaml +1 -1
- data/.github/workflows/windows-test.yaml +14 -3
- data/.gitlab-ci.yml +0 -22
- data/CHANGELOG.md +129 -0
- data/CONTRIBUTING.md +2 -2
- data/MAINTAINERS.md +1 -1
- data/README.md +3 -3
- data/bin/fluentd +8 -1
- data/example/counter.conf +1 -1
- data/example/v0_12_filter.conf +2 -2
- data/fluentd.gemspec +1 -1
- data/lib/fluent/command/cat.rb +19 -3
- data/lib/fluent/command/fluentd.rb +1 -2
- data/lib/fluent/command/plugin_generator.rb +15 -5
- data/lib/fluent/config.rb +1 -1
- data/lib/fluent/config/section.rb +5 -0
- data/lib/fluent/config/types.rb +15 -0
- data/lib/fluent/config/v1_parser.rb +3 -2
- data/lib/fluent/env.rb +2 -1
- data/lib/fluent/log.rb +1 -0
- data/lib/fluent/oj_options.rb +62 -0
- data/lib/fluent/plugin/file_wrapper.rb +35 -4
- data/lib/fluent/plugin/formatter.rb +1 -0
- data/lib/fluent/plugin/formatter_json.rb +9 -7
- data/lib/fluent/plugin/in_http.rb +10 -0
- data/lib/fluent/plugin/in_tail.rb +159 -41
- data/lib/fluent/plugin/in_tail/position_file.rb +20 -18
- data/lib/fluent/plugin/out_forward.rb +14 -33
- data/lib/fluent/plugin/parser_json.rb +2 -3
- data/lib/fluent/plugin/service_discovery.rb +0 -15
- data/lib/fluent/plugin_helper/http_server/router.rb +1 -1
- data/lib/fluent/plugin_helper/service_discovery.rb +39 -1
- data/lib/fluent/plugin_helper/service_discovery/manager.rb +11 -5
- data/lib/fluent/supervisor.rb +15 -0
- data/lib/fluent/system_config.rb +14 -0
- data/lib/fluent/test/driver/storage.rb +30 -0
- data/lib/fluent/version.rb +1 -1
- data/templates/new_gem/lib/fluent/plugin/storage.rb.erb +40 -0
- data/templates/new_gem/test/plugin/test_storage.rb.erb +18 -0
- data/test/command/test_cat.rb +99 -0
- data/test/command/test_plugin_generator.rb +2 -1
- data/test/config/test_section.rb +9 -0
- data/test/config/test_system_config.rb +46 -0
- data/test/config/test_types.rb +7 -0
- data/test/plugin/in_tail/test_io_handler.rb +4 -4
- data/test/plugin/in_tail/test_position_file.rb +23 -5
- data/test/plugin/test_file_wrapper.rb +22 -1
- data/test/plugin/test_in_forward.rb +59 -83
- data/test/plugin/test_in_http.rb +58 -40
- data/test/plugin/test_in_syslog.rb +66 -56
- data/test/plugin/test_in_tail.rb +341 -1
- data/test/plugin/test_in_tcp.rb +45 -32
- data/test/plugin/test_in_udp.rb +47 -33
- data/test/plugin/test_out_forward.rb +114 -95
- data/test/plugin/test_out_stream.rb +18 -8
- data/test/plugin_helper/http_server/test_route.rb +1 -1
- data/test/plugin_helper/test_child_process.rb +1 -1
- data/test/plugin_helper/test_http_server_helper.rb +33 -26
- data/test/plugin_helper/test_server.rb +137 -138
- data/test/plugin_helper/test_service_discovery.rb +74 -14
- data/test/plugin_helper/test_socket.rb +16 -9
- data/test/test_config.rb +2 -1
- data/test/test_event_time.rb +2 -2
- data/test/test_oj_options.rb +55 -0
- data/test/test_supervisor.rb +35 -0
- metadata +15 -7
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -40
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd9819bfeaa8fe8be243f6c4cf3af80a6ff93e47c7ff4c6bbe1523c5b8ff6c78
|
4
|
+
data.tar.gz: 5868dca822982fe4501beba7c2637f647334a8ff187b097aca2805be1c6eb16d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e419985d7db6bfbeebdd9da123af3a109cc8fb502a6953fd09deb7d92289ed9dc1e6af6e26b74c2ec47e938d87b14d81627801a25a402bd571015e28987e27ca
|
7
|
+
data.tar.gz: 817231dbb280c9fd18fe09eb8fc2912d6de761be28cd5394b8b96b03435f5555903caea124d2d1edd98c0ba8a4c8460f85e9057127ef2fee1a8147d6e680b071
|
@@ -0,0 +1,69 @@
|
|
1
|
+
name: Bug Report
|
2
|
+
description: Create a report with a procedure for reproducing the bug
|
3
|
+
body:
|
4
|
+
- type: markdown
|
5
|
+
attributes:
|
6
|
+
value: |
|
7
|
+
Check [CONTRIBUTING guideline](https://github.com/fluent/fluentd/blob/master/CONTRIBUTING.md) first and here is the list to help us investigate the problem.
|
8
|
+
- type: textarea
|
9
|
+
id: description
|
10
|
+
attributes:
|
11
|
+
label: Describe the bug
|
12
|
+
description: A clear and concise description of what the bug is
|
13
|
+
validations:
|
14
|
+
required: true
|
15
|
+
- type: textarea
|
16
|
+
id: reproduce
|
17
|
+
attributes:
|
18
|
+
label: To Reproduce
|
19
|
+
description: Steps to reproduce the behavior
|
20
|
+
validations:
|
21
|
+
required: true
|
22
|
+
- type: textarea
|
23
|
+
id: expected
|
24
|
+
attributes:
|
25
|
+
label: Expected behavior
|
26
|
+
description: A clear and concise description of what you expected to happen
|
27
|
+
validations:
|
28
|
+
required: true
|
29
|
+
- type: textarea
|
30
|
+
id: environment
|
31
|
+
attributes:
|
32
|
+
label: Your Environment
|
33
|
+
description: |
|
34
|
+
- Fluentd or td-agent version: `fluentd --version` or `td-agent --version`
|
35
|
+
- Operating system: `cat /etc/os-release`
|
36
|
+
- Kernel version: `uname -r`
|
37
|
+
|
38
|
+
Tip: If you hit the problem with older fluentd version, try latest version first.
|
39
|
+
value: |
|
40
|
+
- Fluentd version:
|
41
|
+
- TD Agent version:
|
42
|
+
- Operating system:
|
43
|
+
- Kernel version:
|
44
|
+
render: markdown
|
45
|
+
validations:
|
46
|
+
required: true
|
47
|
+
- type: textarea
|
48
|
+
id: configuration
|
49
|
+
attributes:
|
50
|
+
label: Your Configuration
|
51
|
+
description: |
|
52
|
+
Write your configuration here. Minimum reproducible fluentd.conf is recommended.
|
53
|
+
validations:
|
54
|
+
required: true
|
55
|
+
- type: textarea
|
56
|
+
id: logs
|
57
|
+
attributes:
|
58
|
+
label: Your Error Log
|
59
|
+
description: Write your ALL error log here
|
60
|
+
render: shell
|
61
|
+
validations:
|
62
|
+
required: true
|
63
|
+
- type: textarea
|
64
|
+
id: addtional-context
|
65
|
+
attributes:
|
66
|
+
label: Additional context
|
67
|
+
description: Add any other context about the problem here.
|
68
|
+
validations:
|
69
|
+
required: false
|
@@ -0,0 +1,38 @@
|
|
1
|
+
name: Feature request
|
2
|
+
description: Suggest an idea for this project
|
3
|
+
body:
|
4
|
+
- type: markdown
|
5
|
+
attributes:
|
6
|
+
value: |
|
7
|
+
Check [CONTRIBUTING guideline](https://github.com/fluent/fluentd/blob/master/CONTRIBUTING.md) first and here is the list to help us investigate the problem.
|
8
|
+
- type: textarea
|
9
|
+
id: description
|
10
|
+
attributes:
|
11
|
+
label: Is your feature request related to a problem? Please describe.
|
12
|
+
description: |
|
13
|
+
A clear and concise description of what the problem is.
|
14
|
+
Ex. I'm always frustrated when [...]
|
15
|
+
validations:
|
16
|
+
required: true
|
17
|
+
- type: textarea
|
18
|
+
id: solution
|
19
|
+
attributes:
|
20
|
+
label: Describe the solution you'd like
|
21
|
+
description: A clear and concise description of what you want to happen.
|
22
|
+
validations:
|
23
|
+
required: true
|
24
|
+
- type: textarea
|
25
|
+
id: alternative
|
26
|
+
attributes:
|
27
|
+
label: Describe alternatives you've considered
|
28
|
+
description: A clear and concise description of any alternative solutions or features you've considered.
|
29
|
+
validations:
|
30
|
+
required: true
|
31
|
+
- type: textarea
|
32
|
+
id: addtional-context
|
33
|
+
attributes:
|
34
|
+
label: Additional context
|
35
|
+
description: Add any other context or screenshots about the feature request here.
|
36
|
+
validations:
|
37
|
+
required: false
|
38
|
+
|
@@ -13,14 +13,22 @@ jobs:
|
|
13
13
|
strategy:
|
14
14
|
fail-fast: false
|
15
15
|
matrix:
|
16
|
-
ruby-version: ['2.7', '2.6'
|
16
|
+
ruby-version: ['2.7', '2.6']
|
17
17
|
os:
|
18
18
|
- windows-latest
|
19
19
|
experimental: [false]
|
20
20
|
include:
|
21
|
-
- ruby-version: '3.0'
|
21
|
+
- ruby-version: '3.0.1'
|
22
22
|
os: windows-latest
|
23
23
|
experimental: true
|
24
|
+
# On Ruby 3.0, we need to use fiddle 1.0.8 or later to retrieve correct
|
25
|
+
# error code. In addition, we have to specify the path of fiddle by RUBYLIB
|
26
|
+
# because RubyInstaller loads Ruby's bundled fiddle before initializing gem.
|
27
|
+
# See also:
|
28
|
+
# * https://github.com/ruby/fiddle/issues/72
|
29
|
+
# * https://bugs.ruby-lang.org/issues/17813
|
30
|
+
# * https://github.com/oneclick/rubyinstaller2/blob/8225034c22152d8195bc0aabc42a956c79d6c712/lib/ruby_installer/build/dll_directory.rb
|
31
|
+
ruby-lib-opt: RUBYLIB=%RUNNER_TOOL_CACHE%/Ruby/3.0.1/x64/lib/ruby/gems/3.0.0/gems/fiddle-1.0.8/lib
|
24
32
|
|
25
33
|
name: Unit testing with Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }}
|
26
34
|
steps:
|
@@ -29,7 +37,10 @@ jobs:
|
|
29
37
|
uses: ruby/setup-ruby@v1
|
30
38
|
with:
|
31
39
|
ruby-version: ${{ matrix.ruby-version }}
|
40
|
+
- name: Add Fiddle 1.0.8
|
41
|
+
if: ${{ matrix.ruby-version == '3.0.1' }}
|
42
|
+
run: gem install fiddle --version 1.0.8
|
32
43
|
- name: Install dependencies
|
33
44
|
run: ridk exec bundle install
|
34
45
|
- name: Run tests
|
35
|
-
run: bundle exec rake test TESTOPTS=-v
|
46
|
+
run: bundle exec rake test TESTOPTS=-v ${{ matrix.ruby-lib-opt }}
|
data/.gitlab-ci.yml
CHANGED
@@ -13,16 +13,6 @@ stages:
|
|
13
13
|
- build
|
14
14
|
- tests
|
15
15
|
|
16
|
-
2-5-8:
|
17
|
-
image: "ruby:2.5.8"
|
18
|
-
stage: build
|
19
|
-
extends: .install-template
|
20
|
-
script:
|
21
|
-
- bundle install --jobs=3 --retry=3
|
22
|
-
cache:
|
23
|
-
key: "$CI_COMMIT_REF_SLUG 2-5-8"
|
24
|
-
paths:
|
25
|
-
|
26
16
|
2-6-6:
|
27
17
|
image: "ruby:2.6.6"
|
28
18
|
stage: build
|
@@ -64,18 +54,6 @@ rubyhead:
|
|
64
54
|
paths:
|
65
55
|
- ./*
|
66
56
|
|
67
|
-
2-5-8-test:
|
68
|
-
image: "ruby:2.5.8"
|
69
|
-
stage: tests
|
70
|
-
allow_failure: true
|
71
|
-
extends: .test-template
|
72
|
-
script:
|
73
|
-
- bundle exec rake test
|
74
|
-
cache:
|
75
|
-
key: "$CI_COMMIT_REF_SLUG 2-5-8"
|
76
|
-
paths:
|
77
|
-
- ./*
|
78
|
-
|
79
57
|
2-6-6-test:
|
80
58
|
image: "ruby:2.6.6"
|
81
59
|
stage: tests
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,132 @@
|
|
1
|
+
# v1.13.3
|
2
|
+
|
3
|
+
## Release v1.13.3 - 2021/07/27
|
4
|
+
|
5
|
+
### Bug fix
|
6
|
+
|
7
|
+
* in_tail: Care DeletePending state on Windows
|
8
|
+
https://github.com/fluent/fluentd/pull/3457
|
9
|
+
https://github.com/fluent/fluentd/pull/3460
|
10
|
+
* in_tail: Fix some pos_file bugs.
|
11
|
+
Avoid deleting pos_file entries unexpectedly when both
|
12
|
+
`pos_file_compaction_interval` and `follow_inode` are enabled.
|
13
|
+
Use `bytesize` instead of `size` for path length.
|
14
|
+
https://github.com/fluent/fluentd/pull/3459
|
15
|
+
* in_tail: Fix detecting rotation twice on `follow_inode`.
|
16
|
+
https://github.com/fluent/fluentd/pull/3466
|
17
|
+
|
18
|
+
### Misc
|
19
|
+
|
20
|
+
* Remove needless spaces in a sample config file
|
21
|
+
https://github.com/fluent/fluentd/pull/3456
|
22
|
+
|
23
|
+
### Enhancement
|
24
|
+
|
25
|
+
# v1.13.2
|
26
|
+
|
27
|
+
## Release v1.13.2 - 2021/07/12
|
28
|
+
|
29
|
+
### Enhancement
|
30
|
+
|
31
|
+
* fluent-plugin-generate: Storage plugin was supported.
|
32
|
+
https://github.com/fluent/fluentd/pull/3426
|
33
|
+
* parser_json: Added support to customize configuration of oj options.
|
34
|
+
Use `FLUENT_OJ_OPTION_BIGDECIMAL_LOAD`, `FLUENT_OJ_OPTION_MAX_NESTING`,
|
35
|
+
`FLUENT_OJ_OPTION_MODE`, and `FLUENT_OJ_OPTION_USE_TO_JSON` environment
|
36
|
+
variable to configure it.
|
37
|
+
https://github.com/fluent/fluentd/pull/3315
|
38
|
+
|
39
|
+
### Bug fix
|
40
|
+
|
41
|
+
* binlog_reader: Fixed a crash bug by missing "fluent/env" dependency.
|
42
|
+
https://github.com/fluent/fluentd/pull/3443
|
43
|
+
* Fixed a crash bug on outputting log at the early stage when parsing
|
44
|
+
config file. This is a regression since v1.13.0. If you use invalid
|
45
|
+
'@' prefix parameter, remove it as a workaround.
|
46
|
+
https://github.com/fluent/fluentd/pull/3451
|
47
|
+
* in_tail: Fixed a bug that when rotation is occurred, remaining lines
|
48
|
+
will be discarded if the throttling feature is enabled.
|
49
|
+
https://github.com/fluent/fluentd/pull/3390
|
50
|
+
* fluent-plugin-generate: Fixed a crash bug during gemspec generation.
|
51
|
+
It was unexpectedly introduced by #3305, thus this bug was a
|
52
|
+
regression since 1.12.3.
|
53
|
+
https://github.com/fluent/fluentd/pull/3444
|
54
|
+
|
55
|
+
### Misc
|
56
|
+
|
57
|
+
* Fixed the runtime dependency version of http_parse.rb to 0.7.0.
|
58
|
+
It was fixed because false positive detection is occurred frequently
|
59
|
+
by security scanning tools.
|
60
|
+
https://github.com/fluent/fluentd/pull/3450
|
61
|
+
|
62
|
+
# v1.13.1
|
63
|
+
|
64
|
+
## Release v1.13.1 - 2021/06/25
|
65
|
+
|
66
|
+
### Bug fix
|
67
|
+
|
68
|
+
* out_forward: Fixed a race condition on handshake
|
69
|
+
It's caused by using a same unpacker from multiple threads.
|
70
|
+
https://github.com/fluent/fluentd/pull/3405
|
71
|
+
https://github.com/fluent/fluentd/pull/3406
|
72
|
+
* in_tail: Fixed to remove too much verbose debugging logs
|
73
|
+
It was unexpectedly introduced by #3185 log throttling feature.
|
74
|
+
https://github.com/fluent/fluentd/pull/3418
|
75
|
+
* Fixed not to echo back the provides path as is on a 404 error
|
76
|
+
There was a potential cross-site scripting vector even though
|
77
|
+
it is quite difficult to exploit.
|
78
|
+
https://github.com/fluent/fluentd/pull/3427
|
79
|
+
|
80
|
+
### Misc
|
81
|
+
|
82
|
+
* Pretty print for Fluent::Config::Section has been supported
|
83
|
+
for debugging
|
84
|
+
https://github.com/fluent/fluentd/pull/3398
|
85
|
+
* CI: Dropped to run CI for Ruby 2.5
|
86
|
+
https://github.com/fluent/fluentd/pull/3412
|
87
|
+
|
88
|
+
# v1.13
|
89
|
+
|
90
|
+
## Release v1.13.0 - 2021/05/29
|
91
|
+
|
92
|
+
### Enhancement
|
93
|
+
|
94
|
+
* in_tail: Handle log throttling per file feature
|
95
|
+
https://github.com/fluent/fluentd/pull/3185
|
96
|
+
https://github.com/fluent/fluentd/pull/3364
|
97
|
+
https://github.com/fluent/fluentd/pull/3379
|
98
|
+
* Extend to support service discovery manager in simpler way
|
99
|
+
https://github.com/fluent/fluentd/pull/3299
|
100
|
+
https://github.com/fluent/fluentd/pull/3362
|
101
|
+
* in_http: HTTP GET requests has been supported
|
102
|
+
https://github.com/fluent/fluentd/pull/3373
|
103
|
+
* The log rotate settings in system configuration has been supported
|
104
|
+
https://github.com/fluent/fluentd/pull/3352
|
105
|
+
|
106
|
+
### Bug fix
|
107
|
+
|
108
|
+
* Fix to disable `trace_instruction` when
|
109
|
+
`RubyVM::InstructionSequence` is available. It improves
|
110
|
+
compatibility with `truffleruby` some extent.
|
111
|
+
https://github.com/fluent/fluentd/pull/3376
|
112
|
+
* in_tail: Safely skip files which are used by another process on
|
113
|
+
Windows. It improves exception handling about
|
114
|
+
`ERROR_SHARING_VIOLATION` on Windows.
|
115
|
+
https://github.com/fluent/fluentd/pull/3378
|
116
|
+
* fluent-cat: the issue resending secondary file in specific format
|
117
|
+
has been fixed
|
118
|
+
https://github.com/fluent/fluentd/pull/3368
|
119
|
+
* in_tail: Shutdown immediately & safely even if reading huge files
|
120
|
+
Note that `skip_refresh_on_startup` must be enabled.
|
121
|
+
https://github.com/fluent/fluentd/pull/3380
|
122
|
+
|
123
|
+
### Misc
|
124
|
+
|
125
|
+
* example: Change a path to backup_path in counter_server correctly
|
126
|
+
https://github.com/fluent/fluentd/pull/3359
|
127
|
+
* README: Update link to community forum to discuss.fluentd.org
|
128
|
+
https://github.com/fluent/fluentd/pull/3360
|
129
|
+
|
1
130
|
# v1.12
|
2
131
|
|
3
132
|
## Release v1.12.4 - 2021/05/26
|
data/CONTRIBUTING.md
CHANGED
@@ -6,7 +6,7 @@ We'd love your contribution. Here are the guidelines!
|
|
6
6
|
|
7
7
|
RESOURCES of [Official site](https://www.fluentd.org/) and [Fluentd documentation](https://docs.fluentd.org/) may help you.
|
8
8
|
|
9
|
-
If you have further questions about Fluentd and plugins, please direct these to [
|
9
|
+
If you have further questions about Fluentd and plugins, please direct these to [Community Forum](https://discuss.fluentd.org/).
|
10
10
|
Don't use Github issue for asking questions. Here are examples:
|
11
11
|
|
12
12
|
- I installed xxx plugin but it doesn't work. Why?
|
@@ -16,7 +16,7 @@ Don't use Github issue for asking questions. Here are examples:
|
|
16
16
|
We may close such questions to keep clear repository for developers and users.
|
17
17
|
Github issue is mainly for submitting a bug report or feature request. See below.
|
18
18
|
|
19
|
-
If you can't judge your case is a bug or not, use
|
19
|
+
If you can't judge your case is a bug or not, use community forum or slack first.
|
20
20
|
|
21
21
|
## Found a bug?
|
22
22
|
|
data/MAINTAINERS.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
- [Naotoshi Seo](https://github.com/sonots), [ZOZO Technologies](https://tech.zozo.com/en/)
|
4
4
|
- [Okkez](https://github.com/okkez)
|
5
|
-
- [Hiroshi Hatake](https://github.com/cosmo0920), [
|
5
|
+
- [Hiroshi Hatake](https://github.com/cosmo0920), [Calyptia](https://www.calyptia.com/)
|
6
6
|
- [Masahiro Nakagawa](https://github.com/repeatedly), [Treasure Data](https://www.treasuredata.com/)
|
7
7
|
- [Satoshi Tagomori](https://github.com/tagomoris), [Treasure Data](https://www.treasuredata.com/)
|
8
8
|
- [Eduardo Silva](https://github.com/edsiper), [Arm Treasure Data](https://www.treasuredata.com/)
|
data/README.md
CHANGED
@@ -25,9 +25,9 @@ An event consists of *tag*, *time* and *record*. Tag is a string separated with
|
|
25
25
|
|
26
26
|
Use Case | Description | Diagram
|
27
27
|
-------- | ------------|:---------:
|
28
|
-
Centralizing Apache/Nginx Server Logs | Fluentd can be used to tail access/error logs and transport them reliably to remote systems. | <img src="https://www.fluentd.org/
|
28
|
+
Centralizing Apache/Nginx Server Logs | Fluentd can be used to tail access/error logs and transport them reliably to remote systems. | <img src="https://www.fluentd.org/images/recipes/elasticsearch-s3-fluentd.png" height="150"/>
|
29
29
|
Syslog Alerting | Fluentd can "grep" for events and send out alerts. | <img src="https://www.fluentd.org/images/syslog-fluentd-alert.png" height="100"/>
|
30
|
-
Mobile/Web Application Logging | Fluentd can function as middleware to enable asynchronous, scalable logging for user action events. | <img src="https://www.fluentd.org/
|
30
|
+
Mobile/Web Application Logging | Fluentd can function as middleware to enable asynchronous, scalable logging for user action events. | <img src="https://www.fluentd.org/images/datasources/asynchronous_logging.png" height="150"/>
|
31
31
|
|
32
32
|
## Quick Start
|
33
33
|
|
@@ -77,7 +77,7 @@ You can run specified test via `TEST` environment variable:
|
|
77
77
|
- Website: https://www.fluentd.org/
|
78
78
|
- Documentation: https://docs.fluentd.org/
|
79
79
|
- Project repository: https://github.com/fluent
|
80
|
-
- Discussion: https://
|
80
|
+
- Discussion: https://discuss.fluentd.org/
|
81
81
|
- Slack / Community: https://slack.fluentd.org
|
82
82
|
- Newsletters: https://www.fluentd.org/newsletter
|
83
83
|
- Author: [Sadayuki Furuhashi](https://github.com/frsyuki)
|
data/bin/fluentd
CHANGED
@@ -1,7 +1,14 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# -*- coding: utf-8 -*-
|
3
3
|
|
4
|
-
RubyVM::InstructionSequence
|
4
|
+
# In recent CRuby, RubyVM::InstructionSequence is always defined.
|
5
|
+
# This optimization aims to reduce memory (avg 0.5 megabytes) at startup.
|
6
|
+
# ref: http://atdot.net/~ko1/activities/2017_fukuoka_rubykaigi_02.pdf
|
7
|
+
# But other implementation such as truffleruby does not provide such
|
8
|
+
# class.
|
9
|
+
if defined?(RubyVM::InstructionSequence)
|
10
|
+
RubyVM::InstructionSequence.compile_option = {trace_instruction: false}
|
11
|
+
end
|
5
12
|
|
6
13
|
here = File.dirname(__FILE__)
|
7
14
|
$LOAD_PATH << File.expand_path(File.join(here, '..', 'lib'))
|
data/example/counter.conf
CHANGED
data/example/v0_12_filter.conf
CHANGED
@@ -52,10 +52,10 @@
|
|
52
52
|
</match>
|
53
53
|
|
54
54
|
# Composing two filters. For all events with the tag foo.bar,
|
55
|
-
#
|
55
|
+
#
|
56
56
|
# 1. The first filter filters out all events that has the field "hello"
|
57
57
|
# 2. Then, for those events, we downcase the value of the "name" field.
|
58
|
-
#
|
58
|
+
#
|
59
59
|
# - {"name":"SADA", "hello":100} gets filtered out
|
60
60
|
# - {"name":"SADA"} becomes {"name":"sada"}
|
61
61
|
# - {"last_name":"FURUHASHI"} throws an error because it has no field called "name"
|
data/fluentd.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |gem|
|
|
23
23
|
gem.add_runtime_dependency("yajl-ruby", ["~> 1.0"])
|
24
24
|
gem.add_runtime_dependency("cool.io", [">= 1.4.5", "< 2.0.0"])
|
25
25
|
gem.add_runtime_dependency("serverengine", [">= 2.2.2", "< 3.0.0"])
|
26
|
-
gem.add_runtime_dependency("http_parser.rb", [">= 0.5.1", "< 0.
|
26
|
+
gem.add_runtime_dependency("http_parser.rb", [">= 0.5.1", "< 0.8.0"])
|
27
27
|
gem.add_runtime_dependency("sigdump", ["~> 0.2.2"])
|
28
28
|
gem.add_runtime_dependency("tzinfo", [">= 1.0", "< 3.0"])
|
29
29
|
gem.add_runtime_dependency("tzinfo-data", ["~> 1.0"])
|
data/lib/fluent/command/cat.rb
CHANGED
@@ -152,14 +152,30 @@ class Writer
|
|
152
152
|
super()
|
153
153
|
end
|
154
154
|
|
155
|
+
def secondary_record?(record)
|
156
|
+
record.class != Hash &&
|
157
|
+
record.size == 2 &&
|
158
|
+
record.first.class == Fluent::EventTime &&
|
159
|
+
record.last.class == Hash
|
160
|
+
end
|
161
|
+
|
155
162
|
def write(record)
|
156
|
-
|
157
|
-
|
163
|
+
unless secondary_record?(record)
|
164
|
+
if record.class != Hash
|
165
|
+
raise ArgumentError, "Input must be a map (got #{record.class})"
|
166
|
+
end
|
158
167
|
end
|
159
168
|
|
160
169
|
time = Fluent::EventTime.now
|
161
170
|
time = time.to_i if @time_as_integer
|
162
|
-
entry =
|
171
|
+
entry = if secondary_record?(record)
|
172
|
+
# Even though secondary contains Fluent::EventTime in record,
|
173
|
+
# fluent-cat just ignore it and set Fluent::EventTime.now instead.
|
174
|
+
# This specification is adopted to keep consistency.
|
175
|
+
[time, record.last]
|
176
|
+
else
|
177
|
+
[time, record]
|
178
|
+
end
|
163
179
|
synchronize {
|
164
180
|
unless write_impl([entry])
|
165
181
|
# write failed
|