fluentd 1.15.3 → 1.16.2
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/ISSUE_TEMPLATE/bug_report.yaml +1 -0
- data/.github/ISSUE_TEMPLATE/feature_request.yaml +1 -0
- data/.github/workflows/linux-test.yaml +2 -2
- data/.github/workflows/macos-test.yaml +2 -2
- data/.github/workflows/stale-actions.yml +24 -0
- data/.github/workflows/windows-test.yaml +2 -2
- data/CHANGELOG.md +151 -0
- data/CONTRIBUTING.md +1 -1
- data/MAINTAINERS.md +5 -3
- data/README.md +0 -1
- data/SECURITY.md +5 -9
- data/fluentd.gemspec +3 -3
- data/lib/fluent/command/ctl.rb +2 -2
- data/lib/fluent/command/fluentd.rb +55 -53
- data/lib/fluent/command/plugin_config_formatter.rb +1 -1
- data/lib/fluent/config/dsl.rb +1 -1
- data/lib/fluent/config/v1_parser.rb +2 -2
- data/lib/fluent/counter/server.rb +1 -1
- data/lib/fluent/counter/validator.rb +3 -3
- data/lib/fluent/daemon.rb +2 -4
- data/lib/fluent/engine.rb +1 -1
- data/lib/fluent/event.rb +8 -4
- data/lib/fluent/log/console_adapter.rb +66 -0
- data/lib/fluent/log.rb +44 -5
- data/lib/fluent/match.rb +1 -1
- data/lib/fluent/msgpack_factory.rb +6 -1
- data/lib/fluent/plugin/base.rb +6 -8
- data/lib/fluent/plugin/buf_file.rb +32 -3
- data/lib/fluent/plugin/buf_file_single.rb +32 -3
- data/lib/fluent/plugin/buffer/file_chunk.rb +1 -1
- data/lib/fluent/plugin/buffer.rb +21 -0
- data/lib/fluent/plugin/filter_record_transformer.rb +1 -1
- data/lib/fluent/plugin/in_forward.rb +1 -1
- data/lib/fluent/plugin/in_http.rb +8 -8
- data/lib/fluent/plugin/in_sample.rb +1 -1
- data/lib/fluent/plugin/in_tail/position_file.rb +32 -18
- data/lib/fluent/plugin/in_tail.rb +58 -24
- data/lib/fluent/plugin/in_tcp.rb +47 -2
- data/lib/fluent/plugin/out_exec_filter.rb +2 -2
- data/lib/fluent/plugin/out_forward/ack_handler.rb +19 -4
- data/lib/fluent/plugin/out_forward.rb +2 -2
- data/lib/fluent/plugin/out_secondary_file.rb +39 -22
- data/lib/fluent/plugin/output.rb +50 -13
- data/lib/fluent/plugin/parser_json.rb +1 -1
- data/lib/fluent/plugin_helper/event_loop.rb +2 -2
- data/lib/fluent/plugin_helper/http_server/server.rb +2 -1
- data/lib/fluent/plugin_helper/record_accessor.rb +1 -1
- data/lib/fluent/plugin_helper/server.rb +8 -0
- data/lib/fluent/plugin_helper/thread.rb +3 -3
- data/lib/fluent/plugin_id.rb +1 -1
- data/lib/fluent/supervisor.rb +157 -251
- data/lib/fluent/test/driver/base.rb +11 -5
- data/lib/fluent/test/driver/filter.rb +4 -0
- data/lib/fluent/test/startup_shutdown.rb +6 -8
- data/lib/fluent/version.rb +1 -1
- data/templates/new_gem/test/helper.rb.erb +0 -1
- data/test/command/test_ctl.rb +1 -1
- data/test/command/test_fluentd.rb +137 -6
- data/test/command/test_plugin_config_formatter.rb +0 -1
- data/test/compat/test_parser.rb +5 -5
- data/test/config/test_system_config.rb +0 -8
- data/test/log/test_console_adapter.rb +110 -0
- data/test/plugin/in_tail/test_position_file.rb +31 -1
- data/test/plugin/out_forward/test_ack_handler.rb +39 -0
- data/test/plugin/test_base.rb +99 -1
- data/test/plugin/test_buf_file.rb +62 -23
- data/test/plugin/test_buf_file_single.rb +65 -0
- data/test/plugin/test_buffer_chunk.rb +11 -0
- data/test/plugin/test_in_forward.rb +9 -9
- data/test/plugin/test_in_http.rb +2 -3
- data/test/plugin/test_in_monitor_agent.rb +2 -3
- data/test/plugin/test_in_tail.rb +379 -0
- data/test/plugin/test_in_tcp.rb +87 -2
- data/test/plugin/test_in_udp.rb +28 -0
- data/test/plugin/test_in_unix.rb +2 -2
- data/test/plugin/test_multi_output.rb +1 -1
- data/test/plugin/test_out_exec_filter.rb +2 -2
- data/test/plugin/test_out_file.rb +2 -2
- data/test/plugin/test_out_forward.rb +14 -18
- data/test/plugin/test_out_http.rb +1 -0
- data/test/plugin/test_output.rb +281 -12
- data/test/plugin/test_output_as_buffered.rb +44 -44
- data/test/plugin/test_output_as_buffered_compress.rb +32 -18
- data/test/plugin/test_output_as_buffered_retries.rb +1 -1
- data/test/plugin/test_output_as_buffered_secondary.rb +2 -2
- data/test/plugin/test_parser_regexp.rb +1 -6
- data/test/plugin_helper/test_child_process.rb +2 -2
- data/test/plugin_helper/test_http_server_helper.rb +1 -1
- data/test/plugin_helper/test_server.rb +60 -6
- data/test/test_config.rb +0 -21
- data/test/test_formatter.rb +23 -20
- data/test/test_log.rb +108 -36
- data/test/test_msgpack_factory.rb +32 -0
- data/test/test_supervisor.rb +287 -279
- metadata +15 -21
- data/.drone.yml +0 -35
- data/.gitlab-ci.yml +0 -103
- data/test/test_logger_initializer.rb +0 -46
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluentd
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.16.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sadayuki Furuhashi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-07-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -84,7 +84,7 @@ dependencies:
|
|
|
84
84
|
requirements:
|
|
85
85
|
- - ">="
|
|
86
86
|
- !ruby/object:Gem::Version
|
|
87
|
-
version: 2.3.
|
|
87
|
+
version: 2.3.2
|
|
88
88
|
- - "<"
|
|
89
89
|
- !ruby/object:Gem::Version
|
|
90
90
|
version: 3.0.0
|
|
@@ -94,7 +94,7 @@ dependencies:
|
|
|
94
94
|
requirements:
|
|
95
95
|
- - ">="
|
|
96
96
|
- !ruby/object:Gem::Version
|
|
97
|
-
version: 2.3.
|
|
97
|
+
version: 2.3.2
|
|
98
98
|
- - "<"
|
|
99
99
|
- !ruby/object:Gem::Version
|
|
100
100
|
version: 3.0.0
|
|
@@ -124,14 +124,14 @@ dependencies:
|
|
|
124
124
|
requirements:
|
|
125
125
|
- - "~>"
|
|
126
126
|
- !ruby/object:Gem::Version
|
|
127
|
-
version: 0.2.
|
|
127
|
+
version: 0.2.5
|
|
128
128
|
type: :runtime
|
|
129
129
|
prerelease: false
|
|
130
130
|
version_requirements: !ruby/object:Gem::Requirement
|
|
131
131
|
requirements:
|
|
132
132
|
- - "~>"
|
|
133
133
|
- !ruby/object:Gem::Version
|
|
134
|
-
version: 0.2.
|
|
134
|
+
version: 0.2.5
|
|
135
135
|
- !ruby/object:Gem::Dependency
|
|
136
136
|
name: tzinfo
|
|
137
137
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -190,22 +190,16 @@ dependencies:
|
|
|
190
190
|
name: webrick
|
|
191
191
|
requirement: !ruby/object:Gem::Requirement
|
|
192
192
|
requirements:
|
|
193
|
-
- - "
|
|
194
|
-
- !ruby/object:Gem::Version
|
|
195
|
-
version: 1.4.2
|
|
196
|
-
- - "<"
|
|
193
|
+
- - "~>"
|
|
197
194
|
- !ruby/object:Gem::Version
|
|
198
|
-
version: 1.
|
|
195
|
+
version: '1.4'
|
|
199
196
|
type: :runtime
|
|
200
197
|
prerelease: false
|
|
201
198
|
version_requirements: !ruby/object:Gem::Requirement
|
|
202
199
|
requirements:
|
|
203
|
-
- - "
|
|
204
|
-
- !ruby/object:Gem::Version
|
|
205
|
-
version: 1.4.2
|
|
206
|
-
- - "<"
|
|
200
|
+
- - "~>"
|
|
207
201
|
- !ruby/object:Gem::Version
|
|
208
|
-
version: 1.
|
|
202
|
+
version: '1.4'
|
|
209
203
|
- !ruby/object:Gem::Dependency
|
|
210
204
|
name: rake
|
|
211
205
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -385,7 +379,6 @@ extensions: []
|
|
|
385
379
|
extra_rdoc_files: []
|
|
386
380
|
files:
|
|
387
381
|
- ".deepsource.toml"
|
|
388
|
-
- ".drone.yml"
|
|
389
382
|
- ".github/ISSUE_TEMPLATE.md"
|
|
390
383
|
- ".github/ISSUE_TEMPLATE/bug_report.yaml"
|
|
391
384
|
- ".github/ISSUE_TEMPLATE/config.yml"
|
|
@@ -393,9 +386,9 @@ files:
|
|
|
393
386
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
|
394
387
|
- ".github/workflows/linux-test.yaml"
|
|
395
388
|
- ".github/workflows/macos-test.yaml"
|
|
389
|
+
- ".github/workflows/stale-actions.yml"
|
|
396
390
|
- ".github/workflows/windows-test.yaml"
|
|
397
391
|
- ".gitignore"
|
|
398
|
-
- ".gitlab-ci.yml"
|
|
399
392
|
- ADOPTERS.md
|
|
400
393
|
- AUTHORS
|
|
401
394
|
- CHANGELOG.md
|
|
@@ -535,6 +528,7 @@ files:
|
|
|
535
528
|
- lib/fluent/label.rb
|
|
536
529
|
- lib/fluent/load.rb
|
|
537
530
|
- lib/fluent/log.rb
|
|
531
|
+
- lib/fluent/log/console_adapter.rb
|
|
538
532
|
- lib/fluent/match.rb
|
|
539
533
|
- lib/fluent/mixin.rb
|
|
540
534
|
- lib/fluent/msgpack_factory.rb
|
|
@@ -756,6 +750,7 @@ files:
|
|
|
756
750
|
- test/helper.rb
|
|
757
751
|
- test/helpers/fuzzy_assert.rb
|
|
758
752
|
- test/helpers/process_extenstion.rb
|
|
753
|
+
- test/log/test_console_adapter.rb
|
|
759
754
|
- test/plugin/data/2010/01/20100102-030405.log
|
|
760
755
|
- test/plugin/data/2010/01/20100102-030406.log
|
|
761
756
|
- test/plugin/data/2010/01/20100102.log
|
|
@@ -925,7 +920,6 @@ files:
|
|
|
925
920
|
- test/test_formatter.rb
|
|
926
921
|
- test/test_input.rb
|
|
927
922
|
- test/test_log.rb
|
|
928
|
-
- test/test_logger_initializer.rb
|
|
929
923
|
- test/test_match.rb
|
|
930
924
|
- test/test_mixin.rb
|
|
931
925
|
- test/test_msgpack_factory.rb
|
|
@@ -964,7 +958,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
964
958
|
- !ruby/object:Gem::Version
|
|
965
959
|
version: '0'
|
|
966
960
|
requirements: []
|
|
967
|
-
rubygems_version: 3.3.
|
|
961
|
+
rubygems_version: 3.3.5
|
|
968
962
|
signing_key:
|
|
969
963
|
specification_version: 4
|
|
970
964
|
summary: Fluentd event collector
|
|
@@ -999,6 +993,7 @@ test_files:
|
|
|
999
993
|
- test/helper.rb
|
|
1000
994
|
- test/helpers/fuzzy_assert.rb
|
|
1001
995
|
- test/helpers/process_extenstion.rb
|
|
996
|
+
- test/log/test_console_adapter.rb
|
|
1002
997
|
- test/plugin/data/2010/01/20100102-030405.log
|
|
1003
998
|
- test/plugin/data/2010/01/20100102-030406.log
|
|
1004
999
|
- test/plugin/data/2010/01/20100102.log
|
|
@@ -1168,7 +1163,6 @@ test_files:
|
|
|
1168
1163
|
- test/test_formatter.rb
|
|
1169
1164
|
- test/test_input.rb
|
|
1170
1165
|
- test/test_log.rb
|
|
1171
|
-
- test/test_logger_initializer.rb
|
|
1172
1166
|
- test/test_match.rb
|
|
1173
1167
|
- test/test_mixin.rb
|
|
1174
1168
|
- test/test_msgpack_factory.rb
|
data/.drone.yml
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
kind: pipeline
|
|
2
|
-
name: fluentd-test-arm64-3-0
|
|
3
|
-
|
|
4
|
-
platform:
|
|
5
|
-
os: linux
|
|
6
|
-
arch: arm64
|
|
7
|
-
|
|
8
|
-
steps:
|
|
9
|
-
- name: fluentd-test-arm64-3-0
|
|
10
|
-
image: arm64v8/ruby:3.0
|
|
11
|
-
commands:
|
|
12
|
-
- apt update
|
|
13
|
-
- apt -y install libgmp3-dev
|
|
14
|
-
- export BUNDLE_GEMFILE=$PWD/Gemfile
|
|
15
|
-
- gem update --system
|
|
16
|
-
- bundle install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
|
|
17
|
-
- bundle exec rake test
|
|
18
|
-
---
|
|
19
|
-
kind: pipeline
|
|
20
|
-
name: fluentd-test-arm64-2-7
|
|
21
|
-
|
|
22
|
-
platform:
|
|
23
|
-
os: linux
|
|
24
|
-
arch: arm64
|
|
25
|
-
|
|
26
|
-
steps:
|
|
27
|
-
- name: fluentd-test-arm64-2-7
|
|
28
|
-
image: arm64v8/ruby:2.7
|
|
29
|
-
commands:
|
|
30
|
-
- apt update
|
|
31
|
-
- apt -y install libgmp3-dev
|
|
32
|
-
- export BUNDLE_GEMFILE=$PWD/Gemfile
|
|
33
|
-
- gem update --system
|
|
34
|
-
- bundle install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
|
|
35
|
-
- bundle exec rake test
|
data/.gitlab-ci.yml
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
.install-template:
|
|
2
|
-
before_script:
|
|
3
|
-
- gem update --system
|
|
4
|
-
- ruby -v
|
|
5
|
-
|
|
6
|
-
.test-template:
|
|
7
|
-
before_script:
|
|
8
|
-
- gem install rake
|
|
9
|
-
- bundle install
|
|
10
|
-
- chmod 777 -R ./test
|
|
11
|
-
|
|
12
|
-
stages:
|
|
13
|
-
- build
|
|
14
|
-
- tests
|
|
15
|
-
|
|
16
|
-
2-6-6:
|
|
17
|
-
image: "ruby:2.6.6"
|
|
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-6-6"
|
|
24
|
-
paths:
|
|
25
|
-
|
|
26
|
-
2-7-2:
|
|
27
|
-
image: "ruby:2.7.2"
|
|
28
|
-
stage: build
|
|
29
|
-
extends: .install-template
|
|
30
|
-
script:
|
|
31
|
-
- bundle install --jobs=3 --retry=3
|
|
32
|
-
cache:
|
|
33
|
-
key: "$CI_COMMIT_REF_SLUG 2-7-2"
|
|
34
|
-
paths:
|
|
35
|
-
|
|
36
|
-
3-0-0:
|
|
37
|
-
image: "ruby:3.0.0"
|
|
38
|
-
stage: build
|
|
39
|
-
extends: .install-template
|
|
40
|
-
script:
|
|
41
|
-
- bundle install --jobs=3 --retry=3
|
|
42
|
-
cache:
|
|
43
|
-
key: "$CI_COMMIT_REF_SLUG 3-0-0"
|
|
44
|
-
paths:
|
|
45
|
-
|
|
46
|
-
rubyhead:
|
|
47
|
-
image: "ruby:latest"
|
|
48
|
-
stage: build
|
|
49
|
-
extends: .install-template
|
|
50
|
-
script:
|
|
51
|
-
- bundle install --jobs=3 --retry=3
|
|
52
|
-
cache:
|
|
53
|
-
key: "$CI_COMMIT_REF_SLUG latest"
|
|
54
|
-
paths:
|
|
55
|
-
- ./*
|
|
56
|
-
|
|
57
|
-
2-6-6-test:
|
|
58
|
-
image: "ruby:2.6.6"
|
|
59
|
-
stage: tests
|
|
60
|
-
allow_failure: true
|
|
61
|
-
extends: .test-template
|
|
62
|
-
script:
|
|
63
|
-
- bundle exec rake test
|
|
64
|
-
cache:
|
|
65
|
-
key: "$CI_COMMIT_REF_SLUG 2-6-6"
|
|
66
|
-
paths:
|
|
67
|
-
- ./*
|
|
68
|
-
|
|
69
|
-
2-7-2-test:
|
|
70
|
-
image: "ruby:2.7.2"
|
|
71
|
-
stage: tests
|
|
72
|
-
allow_failure: true
|
|
73
|
-
extends: .test-template
|
|
74
|
-
script:
|
|
75
|
-
- bundle exec rake test
|
|
76
|
-
cache:
|
|
77
|
-
key: "$CI_COMMIT_REF_SLUG 2-7-2"
|
|
78
|
-
paths:
|
|
79
|
-
- ./*
|
|
80
|
-
|
|
81
|
-
3-0-0-test:
|
|
82
|
-
image: "ruby:3.0.0"
|
|
83
|
-
stage: tests
|
|
84
|
-
allow_failure: true
|
|
85
|
-
extends: .test-template
|
|
86
|
-
script:
|
|
87
|
-
- bundle exec rake test
|
|
88
|
-
cache:
|
|
89
|
-
key: "$CI_COMMIT_REF_SLUG 3-0-0"
|
|
90
|
-
paths:
|
|
91
|
-
- ./*
|
|
92
|
-
|
|
93
|
-
rubyhead-test:
|
|
94
|
-
image: "ruby:latest"
|
|
95
|
-
stage: tests
|
|
96
|
-
allow_failure: true
|
|
97
|
-
extends: .test-template
|
|
98
|
-
script:
|
|
99
|
-
- bundle exec rake test
|
|
100
|
-
cache:
|
|
101
|
-
key: "$CI_COMMIT_REF_SLUG latest"
|
|
102
|
-
paths:
|
|
103
|
-
- ./*
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
require_relative 'helper'
|
|
2
|
-
require 'fluent/supervisor'
|
|
3
|
-
require 'fileutils'
|
|
4
|
-
|
|
5
|
-
class LoggerInitializerTest < ::Test::Unit::TestCase
|
|
6
|
-
TMP_DIR = File.expand_path(File.dirname(__FILE__) + "/tmp/logger_initializer#{ENV['TEST_ENV_NUMBER']}")
|
|
7
|
-
|
|
8
|
-
teardown do
|
|
9
|
-
begin
|
|
10
|
-
FileUtils.rm_rf(TMP_DIR)
|
|
11
|
-
rescue => _
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
test 'when path is given' do
|
|
16
|
-
path = File.join(TMP_DIR, 'fluent_with_path.log')
|
|
17
|
-
|
|
18
|
-
assert_false File.exist?(TMP_DIR)
|
|
19
|
-
logger = Fluent::Supervisor::LoggerInitializer.new(path, Fluent::Log::LEVEL_DEBUG, nil, nil, {})
|
|
20
|
-
mock.proxy(File).chmod(0o777, TMP_DIR).never
|
|
21
|
-
|
|
22
|
-
assert_nothing_raised do
|
|
23
|
-
logger.init(:supervisor, 0)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
assert_true File.exist?(TMP_DIR)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
test 'apply_options with log_dir_perm' do
|
|
30
|
-
omit "NTFS doesn't support UNIX like permissions" if Fluent.windows?
|
|
31
|
-
|
|
32
|
-
path = File.join(TMP_DIR, 'fluent_with_path.log')
|
|
33
|
-
|
|
34
|
-
assert_false File.exist?(TMP_DIR)
|
|
35
|
-
logger = Fluent::Supervisor::LoggerInitializer.new(path, Fluent::Log::LEVEL_DEBUG, nil, nil, {})
|
|
36
|
-
mock.proxy(File).chmod(0o777, TMP_DIR).once
|
|
37
|
-
|
|
38
|
-
assert_nothing_raised do
|
|
39
|
-
logger.init(:supervisor, 0)
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
logger.apply_options(log_dir_perm: 0o777)
|
|
43
|
-
assert_true File.exist?(TMP_DIR)
|
|
44
|
-
assert_equal 0o777, (File.stat(TMP_DIR).mode & 0xFFF)
|
|
45
|
-
end
|
|
46
|
-
end
|