fluentd 1.13.1 → 1.14.0
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/windows-test.yaml +3 -3
- data/CHANGELOG.md +105 -0
- data/README.md +2 -2
- data/example/v0_12_filter.conf +2 -2
- data/fluentd.gemspec +1 -1
- data/lib/fluent/command/fluentd.rb +8 -0
- data/lib/fluent/command/plugin_generator.rb +15 -5
- data/lib/fluent/compat/output.rb +9 -6
- data/lib/fluent/config/types.rb +15 -0
- data/lib/fluent/config/v1_parser.rb +3 -2
- data/lib/fluent/config.rb +1 -1
- data/lib/fluent/env.rb +2 -1
- data/lib/fluent/event_router.rb +28 -1
- data/lib/fluent/oj_options.rb +62 -0
- data/lib/fluent/plugin/bare_output.rb +49 -8
- data/lib/fluent/plugin/buffer.rb +84 -22
- data/lib/fluent/plugin/file_wrapper.rb +22 -0
- data/lib/fluent/plugin/filter.rb +35 -1
- data/lib/fluent/plugin/formatter.rb +1 -0
- data/lib/fluent/plugin/formatter_json.rb +9 -7
- data/lib/fluent/plugin/in_http.rb +21 -2
- data/lib/fluent/plugin/in_monitor_agent.rb +4 -2
- data/lib/fluent/plugin/in_syslog.rb +13 -1
- data/lib/fluent/plugin/in_tail/position_file.rb +20 -18
- data/lib/fluent/plugin/in_tail.rb +45 -3
- data/lib/fluent/plugin/input.rb +39 -1
- data/lib/fluent/plugin/metrics.rb +119 -0
- data/lib/fluent/plugin/metrics_local.rb +96 -0
- data/lib/fluent/plugin/multi_output.rb +43 -6
- data/lib/fluent/plugin/output.rb +74 -33
- data/lib/fluent/plugin/parser_json.rb +2 -3
- data/lib/fluent/plugin.rb +10 -1
- data/lib/fluent/plugin_helper/event_emitter.rb +8 -1
- data/lib/fluent/plugin_helper/metrics.rb +129 -0
- data/lib/fluent/plugin_helper/server.rb +4 -2
- data/lib/fluent/plugin_helper.rb +1 -0
- data/lib/fluent/root_agent.rb +6 -0
- data/lib/fluent/supervisor.rb +2 -0
- data/lib/fluent/system_config.rb +9 -1
- 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_plugin_generator.rb +2 -1
- data/test/config/test_system_config.rb +6 -0
- data/test/config/test_types.rb +7 -0
- data/test/plugin/in_tail/test_position_file.rb +48 -8
- data/test/plugin/test_bare_output.rb +13 -0
- data/test/plugin/test_buffer.rb +8 -2
- data/test/plugin/test_file_wrapper.rb +11 -0
- data/test/plugin/test_filter.rb +11 -0
- data/test/plugin/test_in_http.rb +40 -0
- data/test/plugin/test_in_monitor_agent.rb +214 -8
- data/test/plugin/test_in_syslog.rb +35 -0
- data/test/plugin/test_in_tail.rb +138 -26
- data/test/plugin/test_input.rb +11 -0
- data/test/plugin/test_metrics.rb +294 -0
- data/test/plugin/test_metrics_local.rb +96 -0
- data/test/plugin/test_multi_output.rb +25 -1
- data/test/plugin/test_output.rb +16 -0
- data/test/plugin_helper/test_event_emitter.rb +29 -0
- data/test/plugin_helper/test_metrics.rb +137 -0
- data/test/test_event_time.rb +2 -2
- data/test/test_oj_options.rb +55 -0
- data/test/test_plugin_classes.rb +102 -0
- data/test/test_root_agent.rb +30 -1
- metadata +21 -6
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -40
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -23
data/test/test_root_agent.rb
CHANGED
@@ -16,7 +16,8 @@ class RootAgentTest < ::Test::Unit::TestCase
|
|
16
16
|
|
17
17
|
data(
|
18
18
|
'suppress interval' => [{'emit_error_log_interval' => 30}, {:@suppress_emit_error_log_interval => 30}],
|
19
|
-
'without source' => [{'without_source' => true}, {:@without_source => true}]
|
19
|
+
'without source' => [{'without_source' => true}, {:@without_source => true}],
|
20
|
+
'enable input metrics' => [{'enable_input_metrics' => true}, {:@enable_input_metrics => true}],
|
20
21
|
)
|
21
22
|
def test_initialize_with_opt(data)
|
22
23
|
opt, expected = data
|
@@ -109,6 +110,34 @@ EOC
|
|
109
110
|
end
|
110
111
|
end
|
111
112
|
|
113
|
+
test 'raises configuration error for label without name' do
|
114
|
+
conf = <<-EOC
|
115
|
+
<label>
|
116
|
+
@type test_out
|
117
|
+
</label>
|
118
|
+
EOC
|
119
|
+
errmsg = "Missing symbol argument on <label> directive"
|
120
|
+
assert_raise Fluent::ConfigError.new(errmsg) do
|
121
|
+
configure_ra(conf)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
test 'raises configuration error for <label @ROOT>' do
|
126
|
+
conf = <<-EOC
|
127
|
+
<source>
|
128
|
+
@type test_in
|
129
|
+
@label @ROOT
|
130
|
+
</source>
|
131
|
+
<label @ROOT>
|
132
|
+
@type test_out
|
133
|
+
</label>
|
134
|
+
EOC
|
135
|
+
errmsg = "@ROOT for <label> is not permitted, reserved for getting root router"
|
136
|
+
assert_raise Fluent::ConfigError.new(errmsg) do
|
137
|
+
configure_ra(conf)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
112
141
|
test 'raises configuration error if there are not match sections in label section' do
|
113
142
|
conf = <<-EOC
|
114
143
|
<source>
|
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.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -107,7 +107,7 @@ dependencies:
|
|
107
107
|
version: 0.5.1
|
108
108
|
- - "<"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 0.8.0
|
111
111
|
type: :runtime
|
112
112
|
prerelease: false
|
113
113
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -117,7 +117,7 @@ dependencies:
|
|
117
117
|
version: 0.5.1
|
118
118
|
- - "<"
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version: 0.
|
120
|
+
version: 0.8.0
|
121
121
|
- !ruby/object:Gem::Dependency
|
122
122
|
name: sigdump
|
123
123
|
requirement: !ruby/object:Gem::Requirement
|
@@ -373,9 +373,9 @@ files:
|
|
373
373
|
- ".deepsource.toml"
|
374
374
|
- ".drone.yml"
|
375
375
|
- ".github/ISSUE_TEMPLATE.md"
|
376
|
-
- ".github/ISSUE_TEMPLATE/bug_report.
|
376
|
+
- ".github/ISSUE_TEMPLATE/bug_report.yaml"
|
377
377
|
- ".github/ISSUE_TEMPLATE/config.yml"
|
378
|
-
- ".github/ISSUE_TEMPLATE/feature_request.
|
378
|
+
- ".github/ISSUE_TEMPLATE/feature_request.yaml"
|
379
379
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
380
380
|
- ".github/workflows/issue-auto-closer.yml"
|
381
381
|
- ".github/workflows/linux-test.yaml"
|
@@ -519,6 +519,7 @@ files:
|
|
519
519
|
- lib/fluent/match.rb
|
520
520
|
- lib/fluent/mixin.rb
|
521
521
|
- lib/fluent/msgpack_factory.rb
|
522
|
+
- lib/fluent/oj_options.rb
|
522
523
|
- lib/fluent/output.rb
|
523
524
|
- lib/fluent/output_chain.rb
|
524
525
|
- lib/fluent/parser.rb
|
@@ -568,6 +569,8 @@ files:
|
|
568
569
|
- lib/fluent/plugin/in_udp.rb
|
569
570
|
- lib/fluent/plugin/in_unix.rb
|
570
571
|
- lib/fluent/plugin/input.rb
|
572
|
+
- lib/fluent/plugin/metrics.rb
|
573
|
+
- lib/fluent/plugin/metrics_local.rb
|
571
574
|
- lib/fluent/plugin/multi_output.rb
|
572
575
|
- lib/fluent/plugin/out_copy.rb
|
573
576
|
- lib/fluent/plugin/out_exec.rb
|
@@ -632,6 +635,7 @@ files:
|
|
632
635
|
- lib/fluent/plugin_helper/http_server/server.rb
|
633
636
|
- lib/fluent/plugin_helper/http_server/ssl_context_builder.rb
|
634
637
|
- lib/fluent/plugin_helper/inject.rb
|
638
|
+
- lib/fluent/plugin_helper/metrics.rb
|
635
639
|
- lib/fluent/plugin_helper/parser.rb
|
636
640
|
- lib/fluent/plugin_helper/record_accessor.rb
|
637
641
|
- lib/fluent/plugin_helper/retry_state.rb
|
@@ -664,6 +668,7 @@ files:
|
|
664
668
|
- lib/fluent/test/driver/multi_output.rb
|
665
669
|
- lib/fluent/test/driver/output.rb
|
666
670
|
- lib/fluent/test/driver/parser.rb
|
671
|
+
- lib/fluent/test/driver/storage.rb
|
667
672
|
- lib/fluent/test/driver/test_event_router.rb
|
668
673
|
- lib/fluent/test/filter_test.rb
|
669
674
|
- lib/fluent/test/formatter_test.rb
|
@@ -689,12 +694,14 @@ files:
|
|
689
694
|
- templates/new_gem/lib/fluent/plugin/input.rb.erb
|
690
695
|
- templates/new_gem/lib/fluent/plugin/output.rb.erb
|
691
696
|
- templates/new_gem/lib/fluent/plugin/parser.rb.erb
|
697
|
+
- templates/new_gem/lib/fluent/plugin/storage.rb.erb
|
692
698
|
- templates/new_gem/test/helper.rb.erb
|
693
699
|
- templates/new_gem/test/plugin/test_filter.rb.erb
|
694
700
|
- templates/new_gem/test/plugin/test_formatter.rb.erb
|
695
701
|
- templates/new_gem/test/plugin/test_input.rb.erb
|
696
702
|
- templates/new_gem/test/plugin/test_output.rb.erb
|
697
703
|
- templates/new_gem/test/plugin/test_parser.rb.erb
|
704
|
+
- templates/new_gem/test/plugin/test_storage.rb.erb
|
698
705
|
- templates/plugin_config_formatter/param.md-compact.erb
|
699
706
|
- templates/plugin_config_formatter/param.md-table.erb
|
700
707
|
- templates/plugin_config_formatter/param.md.erb
|
@@ -790,6 +797,8 @@ files:
|
|
790
797
|
- test/plugin/test_in_unix.rb
|
791
798
|
- test/plugin/test_input.rb
|
792
799
|
- test/plugin/test_metadata.rb
|
800
|
+
- test/plugin/test_metrics.rb
|
801
|
+
- test/plugin/test_metrics_local.rb
|
793
802
|
- test/plugin/test_multi_output.rb
|
794
803
|
- test/plugin/test_out_copy.rb
|
795
804
|
- test/plugin/test_out_exec.rb
|
@@ -865,6 +874,7 @@ files:
|
|
865
874
|
- test/plugin_helper/test_formatter.rb
|
866
875
|
- test/plugin_helper/test_http_server_helper.rb
|
867
876
|
- test/plugin_helper/test_inject.rb
|
877
|
+
- test/plugin_helper/test_metrics.rb
|
868
878
|
- test/plugin_helper/test_parser.rb
|
869
879
|
- test/plugin_helper/test_record_accessor.rb
|
870
880
|
- test/plugin_helper/test_retry_state.rb
|
@@ -899,6 +909,7 @@ files:
|
|
899
909
|
- test/test_match.rb
|
900
910
|
- test/test_mixin.rb
|
901
911
|
- test/test_msgpack_factory.rb
|
912
|
+
- test/test_oj_options.rb
|
902
913
|
- test/test_output.rb
|
903
914
|
- test/test_plugin.rb
|
904
915
|
- test/test_plugin_classes.rb
|
@@ -1029,6 +1040,8 @@ test_files:
|
|
1029
1040
|
- test/plugin/test_in_unix.rb
|
1030
1041
|
- test/plugin/test_input.rb
|
1031
1042
|
- test/plugin/test_metadata.rb
|
1043
|
+
- test/plugin/test_metrics.rb
|
1044
|
+
- test/plugin/test_metrics_local.rb
|
1032
1045
|
- test/plugin/test_multi_output.rb
|
1033
1046
|
- test/plugin/test_out_copy.rb
|
1034
1047
|
- test/plugin/test_out_exec.rb
|
@@ -1104,6 +1117,7 @@ test_files:
|
|
1104
1117
|
- test/plugin_helper/test_formatter.rb
|
1105
1118
|
- test/plugin_helper/test_http_server_helper.rb
|
1106
1119
|
- test/plugin_helper/test_inject.rb
|
1120
|
+
- test/plugin_helper/test_metrics.rb
|
1107
1121
|
- test/plugin_helper/test_parser.rb
|
1108
1122
|
- test/plugin_helper/test_record_accessor.rb
|
1109
1123
|
- test/plugin_helper/test_retry_state.rb
|
@@ -1138,6 +1152,7 @@ test_files:
|
|
1138
1152
|
- test/test_match.rb
|
1139
1153
|
- test/test_mixin.rb
|
1140
1154
|
- test/test_msgpack_factory.rb
|
1155
|
+
- test/test_oj_options.rb
|
1141
1156
|
- test/test_output.rb
|
1142
1157
|
- test/test_plugin.rb
|
1143
1158
|
- test/test_plugin_classes.rb
|
@@ -1,40 +0,0 @@
|
|
1
|
-
---
|
2
|
-
name: Bug Report
|
3
|
-
about: Create a report with a procedure for reproducing the bug
|
4
|
-
|
5
|
-
---
|
6
|
-
|
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
|
-
|
9
|
-
**Describe the bug**
|
10
|
-
<!-- A clear and concise description of what the bug is. -->
|
11
|
-
|
12
|
-
**To Reproduce**
|
13
|
-
<!-- Steps to reproduce the behavior: -->
|
14
|
-
|
15
|
-
**Expected behavior**
|
16
|
-
<!-- A clear and concise description of what you expected to happen. -->
|
17
|
-
|
18
|
-
**Your Environment**
|
19
|
-
|
20
|
-
- Fluentd or td-agent version: `fluentd --version` or `td-agent --version`
|
21
|
-
- Operating system: `cat /etc/os-release`
|
22
|
-
- Kernel version: `uname -r`
|
23
|
-
|
24
|
-
If you hit the problem with older fluentd version, try latest version first.
|
25
|
-
|
26
|
-
**Your Configuration**
|
27
|
-
|
28
|
-
```
|
29
|
-
<!-- Write your configuration here -->
|
30
|
-
```
|
31
|
-
|
32
|
-
**Your Error Log**
|
33
|
-
|
34
|
-
```
|
35
|
-
<!-- Write your **ALL** error log here -->
|
36
|
-
```
|
37
|
-
|
38
|
-
**Additional context**
|
39
|
-
|
40
|
-
<!-- Add any other context about the problem here. -->
|
@@ -1,23 +0,0 @@
|
|
1
|
-
---
|
2
|
-
name: Feature request
|
3
|
-
about: Suggest an idea for this project
|
4
|
-
|
5
|
-
---
|
6
|
-
|
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
|
-
|
9
|
-
**Is your feature request related to a problem? Please describe.**
|
10
|
-
|
11
|
-
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
12
|
-
|
13
|
-
**Describe the solution you'd like**
|
14
|
-
|
15
|
-
<!-- A clear and concise description of what you want to happen. -->
|
16
|
-
|
17
|
-
**Describe alternatives you've considered**
|
18
|
-
|
19
|
-
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
20
|
-
|
21
|
-
**Additional context**
|
22
|
-
|
23
|
-
<!-- Add any other context or screenshots about the feature request here. -->
|