fluentd 1.17.0-x86-mingw32 → 1.18.0-x86-mingw32
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/CHANGELOG.md +100 -0
- data/README.md +1 -0
- data/SECURITY.md +2 -2
- data/fluent.conf +14 -14
- data/lib/fluent/command/cap_ctl.rb +4 -4
- data/lib/fluent/command/fluentd.rb +7 -1
- data/lib/fluent/compat/call_super_mixin.rb +3 -3
- data/lib/fluent/compat/propagate_default.rb +4 -4
- data/lib/fluent/config/literal_parser.rb +9 -2
- data/lib/fluent/config/yaml_parser/parser.rb +4 -0
- data/lib/fluent/engine.rb +49 -33
- data/lib/fluent/env.rb +3 -0
- data/lib/fluent/event_router.rb +2 -2
- data/lib/fluent/log/console_adapter.rb +4 -2
- data/lib/fluent/plugin/filter_parser.rb +27 -51
- data/lib/fluent/plugin/in_exec.rb +14 -2
- data/lib/fluent/plugin/in_http.rb +6 -1
- data/lib/fluent/plugin/in_sample.rb +13 -7
- data/lib/fluent/plugin/in_syslog.rb +4 -0
- data/lib/fluent/plugin/in_tail.rb +65 -23
- data/lib/fluent/plugin/in_tcp.rb +4 -0
- data/lib/fluent/plugin/in_udp.rb +10 -1
- data/lib/fluent/plugin/input.rb +4 -0
- data/lib/fluent/plugin/out_buffer.rb +40 -0
- data/lib/fluent/plugin/out_copy.rb +1 -1
- data/lib/fluent/plugin/out_file.rb +8 -0
- data/lib/fluent/plugin/out_http.rb +12 -0
- data/lib/fluent/plugin/output.rb +2 -0
- data/lib/fluent/plugin/parser_json.rb +4 -12
- data/lib/fluent/plugin_helper/cert_option.rb +8 -0
- data/lib/fluent/plugin_helper/event_emitter.rb +12 -0
- data/lib/fluent/plugin_helper/http_server/server.rb +24 -8
- data/lib/fluent/plugin_helper/server.rb +9 -0
- data/lib/fluent/root_agent.rb +114 -19
- data/lib/fluent/source_only_buffer_agent.rb +102 -0
- data/lib/fluent/supervisor.rb +207 -34
- data/lib/fluent/system_config.rb +15 -3
- data/lib/fluent/version.rb +1 -1
- data/templates/new_gem/fluent-plugin.gemspec.erb +6 -5
- metadata +24 -483
- data/.github/DISCUSSION_TEMPLATE/q-a-japanese.yml +0 -50
- data/.github/DISCUSSION_TEMPLATE/q-a.yml +0 -47
- data/.github/ISSUE_TEMPLATE/bug_report.yml +0 -71
- data/.github/ISSUE_TEMPLATE/config.yml +0 -5
- data/.github/ISSUE_TEMPLATE/feature_request.yml +0 -39
- data/.github/ISSUE_TEMPLATE.md +0 -17
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -14
- data/.github/workflows/stale-actions.yml +0 -24
- data/.github/workflows/test-ruby-head.yml +0 -31
- data/.github/workflows/test.yml +0 -32
- data/.gitignore +0 -30
- data/Gemfile +0 -9
- data/fluentd.gemspec +0 -62
- data/test/command/test_binlog_reader.rb +0 -362
- data/test/command/test_ca_generate.rb +0 -70
- data/test/command/test_cap_ctl.rb +0 -100
- data/test/command/test_cat.rb +0 -128
- data/test/command/test_ctl.rb +0 -56
- data/test/command/test_fluentd.rb +0 -1291
- data/test/command/test_plugin_config_formatter.rb +0 -397
- data/test/command/test_plugin_generator.rb +0 -109
- data/test/compat/test_calls_super.rb +0 -166
- data/test/compat/test_parser.rb +0 -92
- data/test/config/assertions.rb +0 -42
- data/test/config/test_config_parser.rb +0 -551
- data/test/config/test_configurable.rb +0 -1784
- data/test/config/test_configure_proxy.rb +0 -604
- data/test/config/test_dsl.rb +0 -415
- data/test/config/test_element.rb +0 -518
- data/test/config/test_literal_parser.rb +0 -309
- data/test/config/test_plugin_configuration.rb +0 -56
- data/test/config/test_section.rb +0 -191
- data/test/config/test_system_config.rb +0 -195
- data/test/config/test_types.rb +0 -408
- data/test/counter/test_client.rb +0 -563
- data/test/counter/test_error.rb +0 -44
- data/test/counter/test_mutex_hash.rb +0 -179
- data/test/counter/test_server.rb +0 -589
- data/test/counter/test_store.rb +0 -258
- data/test/counter/test_validator.rb +0 -137
- data/test/helper.rb +0 -155
- data/test/helpers/fuzzy_assert.rb +0 -89
- data/test/helpers/process_extenstion.rb +0 -33
- data/test/log/test_console_adapter.rb +0 -117
- data/test/plugin/data/2010/01/20100102-030405.log +0 -0
- data/test/plugin/data/2010/01/20100102-030406.log +0 -0
- data/test/plugin/data/2010/01/20100102.log +0 -0
- data/test/plugin/data/log/bar +0 -0
- data/test/plugin/data/log/foo/bar.log +0 -0
- data/test/plugin/data/log/foo/bar2 +0 -0
- data/test/plugin/data/log/test.log +0 -0
- data/test/plugin/data/log_numeric/01.log +0 -0
- data/test/plugin/data/log_numeric/02.log +0 -0
- data/test/plugin/data/log_numeric/12.log +0 -0
- data/test/plugin/data/log_numeric/14.log +0 -0
- data/test/plugin/data/sd_file/config +0 -11
- data/test/plugin/data/sd_file/config.json +0 -17
- data/test/plugin/data/sd_file/config.yaml +0 -11
- data/test/plugin/data/sd_file/config.yml +0 -11
- data/test/plugin/data/sd_file/invalid_config.yml +0 -7
- data/test/plugin/in_tail/test_fifo.rb +0 -121
- data/test/plugin/in_tail/test_io_handler.rb +0 -150
- data/test/plugin/in_tail/test_position_file.rb +0 -346
- data/test/plugin/out_forward/test_ack_handler.rb +0 -140
- data/test/plugin/out_forward/test_connection_manager.rb +0 -145
- data/test/plugin/out_forward/test_handshake_protocol.rb +0 -112
- data/test/plugin/out_forward/test_load_balancer.rb +0 -106
- data/test/plugin/out_forward/test_socket_cache.rb +0 -174
- data/test/plugin/test_bare_output.rb +0 -131
- data/test/plugin/test_base.rb +0 -247
- data/test/plugin/test_buf_file.rb +0 -1314
- data/test/plugin/test_buf_file_single.rb +0 -898
- data/test/plugin/test_buf_memory.rb +0 -42
- data/test/plugin/test_buffer.rb +0 -1493
- data/test/plugin/test_buffer_chunk.rb +0 -209
- data/test/plugin/test_buffer_file_chunk.rb +0 -871
- data/test/plugin/test_buffer_file_single_chunk.rb +0 -611
- data/test/plugin/test_buffer_memory_chunk.rb +0 -339
- data/test/plugin/test_compressable.rb +0 -87
- data/test/plugin/test_file_util.rb +0 -96
- data/test/plugin/test_filter.rb +0 -368
- data/test/plugin/test_filter_grep.rb +0 -697
- data/test/plugin/test_filter_parser.rb +0 -731
- data/test/plugin/test_filter_record_transformer.rb +0 -577
- data/test/plugin/test_filter_stdout.rb +0 -207
- data/test/plugin/test_formatter_csv.rb +0 -136
- data/test/plugin/test_formatter_hash.rb +0 -38
- data/test/plugin/test_formatter_json.rb +0 -61
- data/test/plugin/test_formatter_ltsv.rb +0 -70
- data/test/plugin/test_formatter_msgpack.rb +0 -28
- data/test/plugin/test_formatter_out_file.rb +0 -116
- data/test/plugin/test_formatter_single_value.rb +0 -44
- data/test/plugin/test_formatter_tsv.rb +0 -76
- data/test/plugin/test_in_debug_agent.rb +0 -49
- data/test/plugin/test_in_exec.rb +0 -261
- data/test/plugin/test_in_forward.rb +0 -1178
- data/test/plugin/test_in_gc_stat.rb +0 -62
- data/test/plugin/test_in_http.rb +0 -1124
- data/test/plugin/test_in_monitor_agent.rb +0 -922
- data/test/plugin/test_in_object_space.rb +0 -66
- data/test/plugin/test_in_sample.rb +0 -190
- data/test/plugin/test_in_syslog.rb +0 -505
- data/test/plugin/test_in_tail.rb +0 -3429
- data/test/plugin/test_in_tcp.rb +0 -328
- data/test/plugin/test_in_udp.rb +0 -296
- data/test/plugin/test_in_unix.rb +0 -181
- data/test/plugin/test_input.rb +0 -137
- data/test/plugin/test_metadata.rb +0 -89
- data/test/plugin/test_metrics.rb +0 -294
- data/test/plugin/test_metrics_local.rb +0 -96
- data/test/plugin/test_multi_output.rb +0 -204
- data/test/plugin/test_out_copy.rb +0 -308
- data/test/plugin/test_out_exec.rb +0 -312
- data/test/plugin/test_out_exec_filter.rb +0 -606
- data/test/plugin/test_out_file.rb +0 -1038
- data/test/plugin/test_out_forward.rb +0 -1349
- data/test/plugin/test_out_http.rb +0 -557
- data/test/plugin/test_out_null.rb +0 -105
- data/test/plugin/test_out_relabel.rb +0 -28
- data/test/plugin/test_out_roundrobin.rb +0 -146
- data/test/plugin/test_out_secondary_file.rb +0 -458
- data/test/plugin/test_out_stdout.rb +0 -205
- data/test/plugin/test_out_stream.rb +0 -103
- data/test/plugin/test_output.rb +0 -1334
- data/test/plugin/test_output_as_buffered.rb +0 -2024
- data/test/plugin/test_output_as_buffered_backup.rb +0 -363
- data/test/plugin/test_output_as_buffered_compress.rb +0 -179
- data/test/plugin/test_output_as_buffered_overflow.rb +0 -250
- data/test/plugin/test_output_as_buffered_retries.rb +0 -966
- data/test/plugin/test_output_as_buffered_secondary.rb +0 -882
- data/test/plugin/test_output_as_standard.rb +0 -374
- data/test/plugin/test_owned_by.rb +0 -34
- data/test/plugin/test_parser.rb +0 -399
- data/test/plugin/test_parser_apache.rb +0 -42
- data/test/plugin/test_parser_apache2.rb +0 -47
- data/test/plugin/test_parser_apache_error.rb +0 -45
- data/test/plugin/test_parser_csv.rb +0 -200
- data/test/plugin/test_parser_json.rb +0 -244
- data/test/plugin/test_parser_labeled_tsv.rb +0 -160
- data/test/plugin/test_parser_msgpack.rb +0 -127
- data/test/plugin/test_parser_multiline.rb +0 -111
- data/test/plugin/test_parser_nginx.rb +0 -88
- data/test/plugin/test_parser_none.rb +0 -52
- data/test/plugin/test_parser_regexp.rb +0 -284
- data/test/plugin/test_parser_syslog.rb +0 -650
- data/test/plugin/test_parser_tsv.rb +0 -122
- data/test/plugin/test_sd_file.rb +0 -228
- data/test/plugin/test_sd_srv.rb +0 -230
- data/test/plugin/test_storage.rb +0 -166
- data/test/plugin/test_storage_local.rb +0 -335
- data/test/plugin/test_string_util.rb +0 -26
- data/test/plugin_helper/data/cert/cert-key.pem +0 -27
- data/test/plugin_helper/data/cert/cert-with-CRLF.pem +0 -19
- data/test/plugin_helper/data/cert/cert-with-no-newline.pem +0 -19
- data/test/plugin_helper/data/cert/cert.pem +0 -19
- data/test/plugin_helper/data/cert/cert_chains/ca-cert-key.pem +0 -27
- data/test/plugin_helper/data/cert/cert_chains/ca-cert.pem +0 -20
- data/test/plugin_helper/data/cert/cert_chains/cert-key.pem +0 -27
- data/test/plugin_helper/data/cert/cert_chains/cert.pem +0 -40
- data/test/plugin_helper/data/cert/empty.pem +0 -0
- data/test/plugin_helper/data/cert/generate_cert.rb +0 -125
- data/test/plugin_helper/data/cert/with_ca/ca-cert-key-pass.pem +0 -30
- data/test/plugin_helper/data/cert/with_ca/ca-cert-key.pem +0 -27
- data/test/plugin_helper/data/cert/with_ca/ca-cert-pass.pem +0 -20
- data/test/plugin_helper/data/cert/with_ca/ca-cert.pem +0 -20
- data/test/plugin_helper/data/cert/with_ca/cert-key-pass.pem +0 -30
- data/test/plugin_helper/data/cert/with_ca/cert-key.pem +0 -27
- data/test/plugin_helper/data/cert/with_ca/cert-pass.pem +0 -21
- data/test/plugin_helper/data/cert/with_ca/cert.pem +0 -21
- data/test/plugin_helper/data/cert/without_ca/cert-key-pass.pem +0 -30
- data/test/plugin_helper/data/cert/without_ca/cert-key.pem +0 -27
- data/test/plugin_helper/data/cert/without_ca/cert-pass.pem +0 -20
- data/test/plugin_helper/data/cert/without_ca/cert.pem +0 -20
- data/test/plugin_helper/http_server/test_app.rb +0 -65
- data/test/plugin_helper/http_server/test_route.rb +0 -32
- data/test/plugin_helper/service_discovery/test_manager.rb +0 -93
- data/test/plugin_helper/service_discovery/test_round_robin_balancer.rb +0 -21
- data/test/plugin_helper/test_cert_option.rb +0 -25
- data/test/plugin_helper/test_child_process.rb +0 -862
- data/test/plugin_helper/test_compat_parameters.rb +0 -358
- data/test/plugin_helper/test_event_emitter.rb +0 -80
- data/test/plugin_helper/test_event_loop.rb +0 -52
- data/test/plugin_helper/test_extract.rb +0 -194
- data/test/plugin_helper/test_formatter.rb +0 -255
- data/test/plugin_helper/test_http_server_helper.rb +0 -372
- data/test/plugin_helper/test_inject.rb +0 -561
- data/test/plugin_helper/test_metrics.rb +0 -137
- data/test/plugin_helper/test_parser.rb +0 -264
- data/test/plugin_helper/test_record_accessor.rb +0 -238
- data/test/plugin_helper/test_retry_state.rb +0 -1006
- data/test/plugin_helper/test_server.rb +0 -1895
- data/test/plugin_helper/test_service_discovery.rb +0 -165
- data/test/plugin_helper/test_socket.rb +0 -146
- data/test/plugin_helper/test_storage.rb +0 -542
- data/test/plugin_helper/test_thread.rb +0 -164
- data/test/plugin_helper/test_timer.rb +0 -130
- data/test/scripts/exec_script.rb +0 -32
- data/test/scripts/fluent/plugin/formatter1/formatter_test1.rb +0 -7
- data/test/scripts/fluent/plugin/formatter2/formatter_test2.rb +0 -7
- data/test/scripts/fluent/plugin/formatter_known.rb +0 -8
- data/test/scripts/fluent/plugin/out_test.rb +0 -81
- data/test/scripts/fluent/plugin/out_test2.rb +0 -80
- data/test/scripts/fluent/plugin/parser_known.rb +0 -4
- data/test/test_capability.rb +0 -74
- data/test/test_clock.rb +0 -164
- data/test/test_config.rb +0 -369
- data/test/test_configdsl.rb +0 -148
- data/test/test_daemonizer.rb +0 -91
- data/test/test_engine.rb +0 -203
- data/test/test_event.rb +0 -531
- data/test/test_event_router.rb +0 -348
- data/test/test_event_time.rb +0 -199
- data/test/test_file_wrapper.rb +0 -53
- data/test/test_filter.rb +0 -121
- data/test/test_fluent_log_event_router.rb +0 -99
- data/test/test_formatter.rb +0 -369
- data/test/test_input.rb +0 -31
- data/test/test_log.rb +0 -1076
- data/test/test_match.rb +0 -148
- data/test/test_mixin.rb +0 -351
- data/test/test_msgpack_factory.rb +0 -50
- data/test/test_oj_options.rb +0 -55
- data/test/test_output.rb +0 -278
- data/test/test_plugin.rb +0 -251
- data/test/test_plugin_classes.rb +0 -370
- data/test/test_plugin_helper.rb +0 -81
- data/test/test_plugin_id.rb +0 -119
- data/test/test_process.rb +0 -14
- data/test/test_root_agent.rb +0 -951
- data/test/test_static_config_analysis.rb +0 -177
- data/test/test_supervisor.rb +0 -821
- data/test/test_test_drivers.rb +0 -136
- data/test/test_time_formatter.rb +0 -301
- data/test/test_time_parser.rb +0 -362
- data/test/test_tls.rb +0 -65
- data/test/test_unique_id.rb +0 -47
- data/test/test_variable_store.rb +0 -65
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60aad222ea9e1a230301949e5e43f9ef65915a01c4a0ddd60e0bfd8c8fd9cfd8
|
4
|
+
data.tar.gz: 74a0834d59f04d01576eaaca3a79a89d4e442cfeda4321c3b33c0ef6b8131d4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22ad594d1389d3df9ac2441baa0232a05709339e14eb3aebac739f02be76f1552784733884375a097221b34ae88c92707bde1b2f354dcdccaaecb88d8640233c
|
7
|
+
data.tar.gz: 65bad71da998272b9065a74d5529d7078b096c9c4f2945b3e39fc3c3c3192796fe7f50d2706cb728d5eac81819f3a6d86ab6f79bee5bc29236f77cc23f1b1a9d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,105 @@
|
|
1
|
+
# v1.18
|
2
|
+
|
3
|
+
## Release v1.18.0 - 2024/11/29
|
4
|
+
|
5
|
+
### Enhancement
|
6
|
+
|
7
|
+
* Add zero-downtime-restart feature for non-Windows
|
8
|
+
https://github.com/fluent/fluentd/pull/4624
|
9
|
+
* Add with-source-only feature
|
10
|
+
https://github.com/fluent/fluentd/pull/4661
|
11
|
+
* `fluentd` command: Add `--with-source-only` option
|
12
|
+
* System configuration: Add `with_source_only` option
|
13
|
+
* Embedded plugin: Add `out_buffer` plugin, which can be used for buffering and relabeling events
|
14
|
+
https://github.com/fluent/fluentd/pull/4661
|
15
|
+
* Config File Syntax: Extend Embedded Ruby Code support for Hashes and Arrays
|
16
|
+
https://github.com/fluent/fluentd/pull/4580
|
17
|
+
* Example: `key {"foo":"#{1 + 1}"} => key {"foo":"2"}`
|
18
|
+
* Please note that this is not backward compatible, although we assume that this will never affect to actual existing configs.
|
19
|
+
* In case the behavior changes unintentionally, you can disable this feature by surrounding the entire value with single quotes.
|
20
|
+
* `key '{"foo":"#{1 + 1}"}' => key {"foo":"#{1 + 1}"}`
|
21
|
+
* transport tls: Use SSL_VERIFY_NONE by default
|
22
|
+
https://github.com/fluent/fluentd/pull/4718
|
23
|
+
* transport tls: Add ensure_fips option to ensure FIPS compliant mode
|
24
|
+
https://github.com/fluent/fluentd/pull/4720
|
25
|
+
* plugin_helper/server: Add receive_buffer_size parameter in transport section
|
26
|
+
https://github.com/fluent/fluentd/pull/4649
|
27
|
+
* filter_parser: Now able to handle multiple parsed results
|
28
|
+
https://github.com/fluent/fluentd/pull/4620
|
29
|
+
* in_http: add `add_tag_prefix` option
|
30
|
+
https://github.com/fluent/fluentd/pull/4655
|
31
|
+
* System configuration: add `path` option in `log` section
|
32
|
+
https://github.com/fluent/fluentd/pull/4604
|
33
|
+
|
34
|
+
### Bug Fix
|
35
|
+
|
36
|
+
* command: fix NoMethodError of --daemon under Windows
|
37
|
+
https://github.com/fluent/fluentd/pull/4716
|
38
|
+
* `fluentd` command: fix `--plugin` (`-p`) option not to overwrite default value
|
39
|
+
https://github.com/fluent/fluentd/pull/4605
|
40
|
+
|
41
|
+
### Misc
|
42
|
+
|
43
|
+
* http_server: Ready to support Async 2.0 gem
|
44
|
+
https://github.com/fluent/fluentd/pull/4619
|
45
|
+
* Minor code refactoring
|
46
|
+
* https://github.com/fluent/fluentd/pull/4641
|
47
|
+
* CI fixes
|
48
|
+
* https://github.com/fluent/fluentd/pull/4638
|
49
|
+
* https://github.com/fluent/fluentd/pull/4644
|
50
|
+
* https://github.com/fluent/fluentd/pull/4675
|
51
|
+
* https://github.com/fluent/fluentd/pull/4676
|
52
|
+
* https://github.com/fluent/fluentd/pull/4677
|
53
|
+
* https://github.com/fluent/fluentd/pull/4686
|
54
|
+
|
1
55
|
# v1.17
|
2
56
|
|
57
|
+
## Release v1.17.1 - 2024/08/19
|
58
|
+
|
59
|
+
### Enhancement
|
60
|
+
|
61
|
+
* out_http: Add `compress gzip` option
|
62
|
+
https://github.com/fluent/fluentd/pull/4528
|
63
|
+
* in_exec: Add `encoding` option to handle non-ascii characters
|
64
|
+
https://github.com/fluent/fluentd/pull/4533
|
65
|
+
* in_tail: Add throttling metrics
|
66
|
+
https://github.com/fluent/fluentd/pull/4578
|
67
|
+
* compat: Improve method call performance
|
68
|
+
https://github.com/fluent/fluentd/pull/4588
|
69
|
+
* in_sample: Add `reuse_record` parameter to reuse the sample data
|
70
|
+
https://github.com/fluent/fluentd/pull/4586
|
71
|
+
* `in_sample` has changed to copy sample data by default to avoid the impact of destructive changes by subsequent plugins.
|
72
|
+
* This increases the load when generating large amounts of sample data.
|
73
|
+
* You can use this new parameter to have the same performance as before.
|
74
|
+
|
75
|
+
### Bug Fix
|
76
|
+
|
77
|
+
* logger: Fix LoadError with console gem v1.25
|
78
|
+
https://github.com/fluent/fluentd/pull/4492
|
79
|
+
* parser_json: Fix wrong LoadError warning
|
80
|
+
https://github.com/fluent/fluentd/pull/4522
|
81
|
+
* in_tail: Fix an issue where a large single line could consume a large amount of memory even though `max_line_size` is set
|
82
|
+
https://github.com/fluent/fluentd/pull/4530
|
83
|
+
* yaml_parser: Support $log_level element
|
84
|
+
https://github.com/fluent/fluentd/pull/4482
|
85
|
+
|
86
|
+
### Misc
|
87
|
+
|
88
|
+
* Comment out inappropriate default configuration about out_forward
|
89
|
+
https://github.com/fluent/fluentd/pull/4523
|
90
|
+
* gemspec: Remove unnecessary files from released gem
|
91
|
+
https://github.com/fluent/fluentd/pull/4534
|
92
|
+
* plugin-generator: Update gemspec to remove unnecessary files
|
93
|
+
https://github.com/fluent/fluentd/pull/4535
|
94
|
+
* Suppress non-parenthesis warnings
|
95
|
+
https://github.com/fluent/fluentd/pull/4594
|
96
|
+
* Fix FrozenError in http_server plugin helper
|
97
|
+
https://github.com/fluent/fluentd/pull/4598
|
98
|
+
* Add logger gem dependency for Ruby 3.5
|
99
|
+
https://github.com/fluent/fluentd/pull/4589
|
100
|
+
* out_file: Add warn message for symlink_path setting
|
101
|
+
https://github.com/fluent/fluentd/pull/4502
|
102
|
+
|
3
103
|
## Release v1.17.0 - 2024/04/30
|
4
104
|
|
5
105
|
### Enhancement
|
data/README.md
CHANGED
@@ -6,6 +6,7 @@ Fluentd: Open-Source Log Collector
|
|
6
6
|
[](https://github.com/fluent/fluentd/actions/workflows/macos-test.yaml)
|
7
7
|
[](https://codeclimate.com/github/fluent/fluentd)
|
8
8
|
[](https://bestpractices.coreinfrastructure.org/projects/1189)
|
9
|
+
[](https://scorecard.dev/viewer/?uri=github.com/fluent/fluentd)
|
9
10
|
|
10
11
|
[Fluentd](https://www.fluentd.org/) collects events from various data sources and writes them to files, RDBMS, NoSQL, IaaS, SaaS, Hadoop and so on. Fluentd helps you unify your logging infrastructure (Learn more about the [Unified Logging Layer](https://www.fluentd.org/blog/unified-logging-layer)).
|
11
12
|
|
data/SECURITY.md
CHANGED
data/fluent.conf
CHANGED
@@ -81,20 +81,20 @@
|
|
81
81
|
@id stdout_output
|
82
82
|
</match>
|
83
83
|
|
84
|
-
|
85
|
-
|
86
|
-
@type forward
|
87
|
-
@id forward_output
|
88
|
-
|
89
|
-
<server>
|
90
|
-
host 192.168.0.11
|
91
|
-
</server>
|
92
|
-
<secondary>
|
93
|
-
<server>
|
94
|
-
host 192.168.0.12
|
95
|
-
</server>
|
96
|
-
</secondary>
|
97
|
-
|
84
|
+
## match tag=system.** and forward to another fluent server
|
85
|
+
#<match system.**>
|
86
|
+
# @type forward
|
87
|
+
# @id forward_output
|
88
|
+
#
|
89
|
+
# <server>
|
90
|
+
# host 192.168.0.11
|
91
|
+
# </server>
|
92
|
+
# <secondary>
|
93
|
+
# <server>
|
94
|
+
# host 192.168.0.12
|
95
|
+
# </server>
|
96
|
+
# </secondary>
|
97
|
+
#</match>
|
98
98
|
|
99
99
|
## match tag=myapp.** and forward and write to file
|
100
100
|
#<match myapp.**>
|
@@ -76,10 +76,10 @@ module Fluent
|
|
76
76
|
parse_options!(@argv)
|
77
77
|
|
78
78
|
target_file = if !!@opts[:target_file]
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
79
|
+
@opts[:target_file]
|
80
|
+
else
|
81
|
+
File.readlink("/proc/self/exe")
|
82
|
+
end
|
83
83
|
|
84
84
|
if @opts[:clear_capabilities]
|
85
85
|
clear_capabilities(@opts, target_file)
|
@@ -46,7 +46,7 @@ op.on('--show-plugin-config=PLUGIN', "[DEPRECATED] Show PLUGIN configuration and
|
|
46
46
|
}
|
47
47
|
|
48
48
|
op.on('-p', '--plugin DIR', "add plugin directory") {|s|
|
49
|
-
(cmd_opts[:plugin_dirs] ||= []) << s
|
49
|
+
(cmd_opts[:plugin_dirs] ||= default_opts[:plugin_dirs]) << s
|
50
50
|
}
|
51
51
|
|
52
52
|
op.on('-I PATH', "add library path") {|s|
|
@@ -127,6 +127,12 @@ op.on('--without-source', "invoke a fluentd without input plugins", TrueClass) {
|
|
127
127
|
cmd_opts[:without_source] = b
|
128
128
|
}
|
129
129
|
|
130
|
+
unless Fluent.windows?
|
131
|
+
op.on('--with-source-only', "Invoke a fluentd only with input plugins. The data is stored in a temporary buffer. Send SIGWINCH to cancel this mode and process the data (Not supported on Windows).", TrueClass) {|b|
|
132
|
+
cmd_opts[:with_source_only] = b
|
133
|
+
}
|
134
|
+
end
|
135
|
+
|
130
136
|
op.on('--config-file-type VALU', 'guessing file type of fluentd configuration. yaml/yml or guess') { |s|
|
131
137
|
if (s == 'yaml') || (s == 'yml')
|
132
138
|
cmd_opts[:config_file_type] = s.to_sym
|
@@ -41,7 +41,7 @@ module Fluent
|
|
41
41
|
def start
|
42
42
|
super
|
43
43
|
unless self.started?
|
44
|
-
@@_super_start[self.class].
|
44
|
+
@@_super_start[self.class].bind_call(self)
|
45
45
|
# #super will reset logdev (especially in test), so this warn should be after calling it
|
46
46
|
log.warn "super was not called in #start: called it forcedly", plugin: self.class
|
47
47
|
end
|
@@ -51,7 +51,7 @@ module Fluent
|
|
51
51
|
super
|
52
52
|
unless self.before_shutdown?
|
53
53
|
log.warn "super was not called in #before_shutdown: calling it forcedly", plugin: self.class
|
54
|
-
@@_super_before_shutdown[self.class].
|
54
|
+
@@_super_before_shutdown[self.class].bind_call(self)
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
@@ -68,7 +68,7 @@ module Fluent
|
|
68
68
|
super
|
69
69
|
unless self.shutdown?
|
70
70
|
log.warn "super was not called in #shutdown: calling it forcedly", plugin: self.class
|
71
|
-
@@_super_shutdown[self.class].
|
71
|
+
@@_super_shutdown[self.class].bind_call(self)
|
72
72
|
end
|
73
73
|
end
|
74
74
|
end
|
@@ -33,25 +33,25 @@ module Fluent
|
|
33
33
|
CONFIGURABLE_CLASS_METHODS = Fluent::Configurable::ClassMethods
|
34
34
|
|
35
35
|
def config_param(name, type = nil, **kwargs, &block)
|
36
|
-
CONFIGURABLE_CLASS_METHODS.instance_method(:config_param).
|
36
|
+
CONFIGURABLE_CLASS_METHODS.instance_method(:config_param).bind_call(self, name, type, **kwargs, &block)
|
37
37
|
pparams = propagate_default_params
|
38
38
|
if kwargs.has_key?(:default) && pparams[name.to_s]
|
39
39
|
newer = pparams[name.to_s].to_sym
|
40
40
|
overridden_default_value = kwargs[:default]
|
41
41
|
|
42
|
-
CONFIGURABLE_CLASS_METHODS.instance_method(:config_section).
|
42
|
+
CONFIGURABLE_CLASS_METHODS.instance_method(:config_section).bind_call(self, :buffer) do
|
43
43
|
config_set_default newer, overridden_default_value
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
48
|
def config_set_default(name, defval)
|
49
|
-
CONFIGURABLE_CLASS_METHODS.instance_method(:config_set_default).
|
49
|
+
CONFIGURABLE_CLASS_METHODS.instance_method(:config_set_default).bind_call(self, name, defval)
|
50
50
|
pparams = propagate_default_params
|
51
51
|
if pparams[name.to_s]
|
52
52
|
newer = pparams[name.to_s].to_sym
|
53
53
|
|
54
|
-
CONFIGURABLE_CLASS_METHODS.instance_method(:config_section).
|
54
|
+
CONFIGURABLE_CLASS_METHODS.instance_method(:config_section).bind_call(self, :buffer) do
|
55
55
|
self.config_set_default newer, defval
|
56
56
|
end
|
57
57
|
end
|
@@ -254,8 +254,15 @@ EOM
|
|
254
254
|
buffer << line_buffer + "\n"
|
255
255
|
line_buffer = ""
|
256
256
|
else
|
257
|
-
|
258
|
-
|
257
|
+
if @ss.exist?(/^\{[^}]+\}/)
|
258
|
+
# if it's interpolated string
|
259
|
+
skip(/\{/)
|
260
|
+
line_buffer << eval_embedded_code(scan_embedded_code)
|
261
|
+
skip(/\}/)
|
262
|
+
else
|
263
|
+
# '#' is a char in json string
|
264
|
+
line_buffer << char
|
265
|
+
end
|
259
266
|
end
|
260
267
|
|
261
268
|
next # This char '#' MUST NOT terminate json object.
|
data/lib/fluent/engine.rb
CHANGED
@@ -43,13 +43,15 @@ module Fluent
|
|
43
43
|
@system_config = SystemConfig.new
|
44
44
|
|
45
45
|
@supervisor_mode = false
|
46
|
+
|
47
|
+
@root_agent_mutex = Mutex.new
|
46
48
|
end
|
47
49
|
|
48
50
|
MAINLOOP_SLEEP_INTERVAL = 0.3
|
49
51
|
|
50
52
|
attr_reader :root_agent, :system_config, :supervisor_mode
|
51
53
|
|
52
|
-
def init(system_config, supervisor_mode: false)
|
54
|
+
def init(system_config, supervisor_mode: false, start_in_parallel: false)
|
53
55
|
@system_config = system_config
|
54
56
|
@supervisor_mode = supervisor_mode
|
55
57
|
|
@@ -58,7 +60,7 @@ module Fluent
|
|
58
60
|
|
59
61
|
@log_event_verbose = system_config.log_event_verbose unless system_config.log_event_verbose.nil?
|
60
62
|
|
61
|
-
@root_agent = RootAgent.new(log: log, system_config: @system_config)
|
63
|
+
@root_agent = RootAgent.new(log: log, system_config: @system_config, start_in_parallel: start_in_parallel)
|
62
64
|
|
63
65
|
self
|
64
66
|
end
|
@@ -133,7 +135,15 @@ module Fluent
|
|
133
135
|
end
|
134
136
|
|
135
137
|
def flush!
|
136
|
-
@
|
138
|
+
@root_agent_mutex.synchronize do
|
139
|
+
@root_agent.flush!
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
def cancel_source_only!
|
144
|
+
@root_agent_mutex.synchronize do
|
145
|
+
@root_agent.cancel_source_only!
|
146
|
+
end
|
137
147
|
end
|
138
148
|
|
139
149
|
def now
|
@@ -144,7 +154,9 @@ module Fluent
|
|
144
154
|
def run
|
145
155
|
begin
|
146
156
|
$log.info "starting fluentd worker", pid: Process.pid, ppid: Process.ppid, worker: worker_id
|
147
|
-
|
157
|
+
@root_agent_mutex.synchronize do
|
158
|
+
start
|
159
|
+
end
|
148
160
|
|
149
161
|
@fluent_log_event_router.start
|
150
162
|
|
@@ -158,47 +170,51 @@ module Fluent
|
|
158
170
|
raise
|
159
171
|
end
|
160
172
|
|
161
|
-
|
173
|
+
@root_agent_mutex.synchronize do
|
174
|
+
stop_phase(@root_agent)
|
175
|
+
end
|
162
176
|
end
|
163
177
|
|
164
178
|
# @param conf [Fluent::Config]
|
165
179
|
# @param supervisor [Bool]
|
166
180
|
# @reutrn nil
|
167
181
|
def reload_config(conf, supervisor: false)
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
182
|
+
@root_agent_mutex.synchronize do
|
183
|
+
# configure first to reduce down time while restarting
|
184
|
+
new_agent = RootAgent.new(log: log, system_config: @system_config)
|
185
|
+
ret = Fluent::StaticConfigAnalysis.call(conf, workers: system_config.workers)
|
186
|
+
|
187
|
+
ret.all_plugins.each do |plugin|
|
188
|
+
if plugin.respond_to?(:reloadable_plugin?) && !plugin.reloadable_plugin?
|
189
|
+
raise Fluent::ConfigError, "Unreloadable plugin plugin: #{Fluent::Plugin.lookup_type_from_class(plugin.class)}, plugin_id: #{plugin.plugin_id}, class_name: #{plugin.class})"
|
190
|
+
end
|
175
191
|
end
|
176
|
-
end
|
177
192
|
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
193
|
+
# Assign @root_agent to new root_agent
|
194
|
+
# for https://github.com/fluent/fluentd/blob/fcef949ce40472547fde295ddd2cfe297e1eddd6/lib/fluent/plugin_helper/event_emitter.rb#L50
|
195
|
+
old_agent, @root_agent = @root_agent, new_agent
|
196
|
+
begin
|
197
|
+
@root_agent.configure(conf)
|
198
|
+
rescue
|
199
|
+
@root_agent = old_agent
|
200
|
+
raise
|
201
|
+
end
|
187
202
|
|
188
|
-
|
189
|
-
|
190
|
-
|
203
|
+
unless @suppress_config_dump
|
204
|
+
$log.info :supervisor, "using configuration file: #{conf.to_s.rstrip}"
|
205
|
+
end
|
191
206
|
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
207
|
+
# supervisor doesn't handle actual data. so the following code is unnecessary.
|
208
|
+
if supervisor
|
209
|
+
old_agent.shutdown # to close thread created in #configure
|
210
|
+
return
|
211
|
+
end
|
197
212
|
|
198
|
-
|
213
|
+
stop_phase(old_agent)
|
199
214
|
|
200
|
-
|
201
|
-
|
215
|
+
$log.info 'restart fluentd worker', worker: worker_id
|
216
|
+
start_phase(new_agent)
|
217
|
+
end
|
202
218
|
end
|
203
219
|
|
204
220
|
def stop
|
data/lib/fluent/env.rb
CHANGED
@@ -14,6 +14,8 @@
|
|
14
14
|
# limitations under the License.
|
15
15
|
#
|
16
16
|
|
17
|
+
require 'securerandom'
|
18
|
+
|
17
19
|
require 'serverengine/utils'
|
18
20
|
require 'fluent/oj_options'
|
19
21
|
|
@@ -25,6 +27,7 @@ module Fluent
|
|
25
27
|
DEFAULT_OJ_OPTIONS = Fluent::OjOptions.load_env
|
26
28
|
DEFAULT_DIR_PERMISSION = 0755
|
27
29
|
DEFAULT_FILE_PERMISSION = 0644
|
30
|
+
INSTANCE_ID = ENV['FLUENT_INSTANCE_ID'] || SecureRandom.uuid
|
28
31
|
|
29
32
|
def self.windows?
|
30
33
|
ServerEngine.windows?
|
data/lib/fluent/event_router.rb
CHANGED
@@ -286,7 +286,7 @@ module Fluent
|
|
286
286
|
|
287
287
|
def find(tag)
|
288
288
|
pipeline = nil
|
289
|
-
@match_rules.
|
289
|
+
@match_rules.each do |rule|
|
290
290
|
if rule.match?(tag)
|
291
291
|
if rule.collector.is_a?(Plugin::Filter)
|
292
292
|
pipeline ||= Pipeline.new
|
@@ -301,7 +301,7 @@ module Fluent
|
|
301
301
|
return pipeline
|
302
302
|
end
|
303
303
|
end
|
304
|
-
|
304
|
+
end
|
305
305
|
|
306
306
|
if pipeline
|
307
307
|
# filter is matched but no match
|
@@ -14,14 +14,16 @@
|
|
14
14
|
# limitations under the License.
|
15
15
|
#
|
16
16
|
|
17
|
-
require 'console
|
17
|
+
require 'console'
|
18
18
|
|
19
19
|
module Fluent
|
20
20
|
class Log
|
21
21
|
# Async gem which is used by http_server helper switched logger mechanism to
|
22
22
|
# Console gem which isn't complatible with Ruby's standard Logger (since
|
23
23
|
# v1.17). This class adapts it to Fluentd's logger mechanism.
|
24
|
-
class ConsoleAdapter < Console::
|
24
|
+
class ConsoleAdapter < Gem::Version.new(Console::VERSION) >= Gem::Version.new("1.25") ?
|
25
|
+
Console::Output::Terminal : Console::Terminal::Logger
|
26
|
+
|
25
27
|
def self.wrap(logger)
|
26
28
|
_, level = Console::Logger::LEVELS.find { |key, value|
|
27
29
|
if logger.level <= 0
|
@@ -54,29 +54,32 @@ module Fluent::Plugin
|
|
54
54
|
@parser = parser_create
|
55
55
|
end
|
56
56
|
|
57
|
-
FAILED_RESULT = [nil, nil].freeze # reduce allocation cost
|
58
57
|
REPLACE_CHAR = '?'.freeze
|
59
58
|
|
60
|
-
def
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
59
|
+
def filter_stream(tag, es)
|
60
|
+
new_es = Fluent::MultiEventStream.new
|
61
|
+
es.each do |time, record|
|
62
|
+
begin
|
63
|
+
raw_value = @accessor.call(record)
|
64
|
+
if raw_value.nil?
|
65
|
+
new_es.add(time, handle_parsed(tag, record, time, {})) if @reserve_data
|
66
|
+
raise ArgumentError, "#{@key_name} does not exist"
|
67
|
+
else
|
68
|
+
filter_one_record(tag, time, record, raw_value) do |result_time, result_record|
|
69
|
+
new_es.add(result_time, result_record)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
rescue => e
|
73
|
+
router.emit_error_event(tag, time, record, e) if @emit_invalid_record_to_error
|
70
74
|
end
|
71
75
|
end
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
# This should be fixed in the future version.
|
77
|
-
result_time = nil
|
78
|
-
result_record = nil
|
76
|
+
new_es
|
77
|
+
end
|
78
|
+
|
79
|
+
private
|
79
80
|
|
81
|
+
def filter_one_record(tag, time, record, raw_value)
|
82
|
+
begin
|
80
83
|
@parser.parse(raw_value) do |t, values|
|
81
84
|
if values
|
82
85
|
t = if @reserve_time
|
@@ -85,38 +88,17 @@ module Fluent::Plugin
|
|
85
88
|
t.nil? ? time : t
|
86
89
|
end
|
87
90
|
@accessor.delete(record) if @remove_key_name_field
|
88
|
-
r = handle_parsed(tag, record, t, values)
|
89
|
-
|
90
|
-
if result_record.nil?
|
91
|
-
result_time = t
|
92
|
-
result_record = r
|
93
|
-
else
|
94
|
-
if @emit_invalid_record_to_error
|
95
|
-
router.emit_error_event(tag, t, r, Fluent::Plugin::Parser::ParserError.new(
|
96
|
-
"Could not emit the event. The parser returned multiple results, but currently filter_parser plugin only returns the first parsed result. Raw data: '#{raw_value}'"
|
97
|
-
))
|
98
|
-
end
|
99
|
-
end
|
100
91
|
else
|
101
|
-
if @emit_invalid_record_to_error
|
102
|
-
router.emit_error_event(tag, time, record, Fluent::Plugin::Parser::ParserError.new("pattern not matched with data '#{raw_value}'"))
|
103
|
-
end
|
104
|
-
|
92
|
+
router.emit_error_event(tag, time, record, Fluent::Plugin::Parser::ParserError.new("pattern not matched with data '#{raw_value}'")) if @emit_invalid_record_to_error
|
105
93
|
next unless @reserve_data
|
106
|
-
|
107
|
-
|
108
|
-
result_time = time
|
109
|
-
result_record = handle_parsed(tag, record, time, {})
|
94
|
+
t = time
|
95
|
+
values = {}
|
110
96
|
end
|
97
|
+
yield(t, handle_parsed(tag, record, t, values))
|
111
98
|
end
|
112
99
|
|
113
|
-
return result_time, result_record
|
114
100
|
rescue Fluent::Plugin::Parser::ParserError => e
|
115
|
-
|
116
|
-
raise e
|
117
|
-
else
|
118
|
-
return FAILED_RESULT
|
119
|
-
end
|
101
|
+
raise e
|
120
102
|
rescue ArgumentError => e
|
121
103
|
raise unless @replace_invalid_sequence
|
122
104
|
raise unless e.message.index("invalid byte sequence in") == 0
|
@@ -124,16 +106,10 @@ module Fluent::Plugin
|
|
124
106
|
raw_value = raw_value.scrub(REPLACE_CHAR)
|
125
107
|
retry
|
126
108
|
rescue => e
|
127
|
-
|
128
|
-
raise Fluent::Plugin::Parser::ParserError, "parse failed #{e.message}"
|
129
|
-
else
|
130
|
-
return FAILED_RESULT
|
131
|
-
end
|
109
|
+
raise Fluent::Plugin::Parser::ParserError, "parse failed #{e.message}"
|
132
110
|
end
|
133
111
|
end
|
134
112
|
|
135
|
-
private
|
136
|
-
|
137
113
|
def handle_parsed(tag, record, t, values)
|
138
114
|
if values && @inject_key_prefix
|
139
115
|
values = Hash[values.map { |k, v| [@inject_key_prefix + k, v] }]
|
@@ -45,6 +45,8 @@ module Fluent::Plugin
|
|
45
45
|
config_param :run_interval, :time, default: nil
|
46
46
|
desc 'The default block size to read if parser requires partial read.'
|
47
47
|
config_param :read_block_size, :size, default: 10240 # 10k
|
48
|
+
desc 'The encoding to receive the result of the command, especially for non-ascii characters.'
|
49
|
+
config_param :encoding, :string, default: nil
|
48
50
|
|
49
51
|
attr_reader :parser
|
50
52
|
|
@@ -63,9 +65,16 @@ module Fluent::Plugin
|
|
63
65
|
if !@tag && (!@extract_config || !@extract_config.tag_key)
|
64
66
|
raise Fluent::ConfigError, "'tag' or 'tag_key' option is required on exec input"
|
65
67
|
end
|
68
|
+
validate_encoding(@encoding) if @encoding
|
66
69
|
@parser = parser_create
|
67
70
|
end
|
68
71
|
|
72
|
+
def validate_encoding(encoding)
|
73
|
+
Encoding.find(encoding)
|
74
|
+
rescue ArgumentError => e
|
75
|
+
raise Fluent::ConfigError, e.message
|
76
|
+
end
|
77
|
+
|
69
78
|
def multi_workers_ready?
|
70
79
|
true
|
71
80
|
end
|
@@ -73,10 +82,13 @@ module Fluent::Plugin
|
|
73
82
|
def start
|
74
83
|
super
|
75
84
|
|
85
|
+
options = { mode: [@connect_mode] }
|
86
|
+
options[:external_encoding] = @encoding if @encoding
|
87
|
+
|
76
88
|
if @run_interval
|
77
|
-
child_process_execute(:exec_input, @command, interval: @run_interval,
|
89
|
+
child_process_execute(:exec_input, @command, interval: @run_interval, **options, &method(:run))
|
78
90
|
else
|
79
|
-
child_process_execute(:exec_input, @command, immediate: true,
|
91
|
+
child_process_execute(:exec_input, @command, immediate: true, **options, &method(:run))
|
80
92
|
end
|
81
93
|
end
|
82
94
|
|