fluentd 1.17.0-x86-mingw32 → 1.18.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (278) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +100 -0
  3. data/README.md +1 -0
  4. data/SECURITY.md +2 -2
  5. data/fluent.conf +14 -14
  6. data/lib/fluent/command/cap_ctl.rb +4 -4
  7. data/lib/fluent/command/fluentd.rb +7 -1
  8. data/lib/fluent/compat/call_super_mixin.rb +3 -3
  9. data/lib/fluent/compat/propagate_default.rb +4 -4
  10. data/lib/fluent/config/literal_parser.rb +9 -2
  11. data/lib/fluent/config/yaml_parser/parser.rb +4 -0
  12. data/lib/fluent/engine.rb +49 -33
  13. data/lib/fluent/env.rb +3 -0
  14. data/lib/fluent/event_router.rb +2 -2
  15. data/lib/fluent/log/console_adapter.rb +4 -2
  16. data/lib/fluent/plugin/filter_parser.rb +27 -51
  17. data/lib/fluent/plugin/in_exec.rb +14 -2
  18. data/lib/fluent/plugin/in_http.rb +6 -1
  19. data/lib/fluent/plugin/in_sample.rb +13 -7
  20. data/lib/fluent/plugin/in_syslog.rb +4 -0
  21. data/lib/fluent/plugin/in_tail.rb +65 -23
  22. data/lib/fluent/plugin/in_tcp.rb +4 -0
  23. data/lib/fluent/plugin/in_udp.rb +10 -1
  24. data/lib/fluent/plugin/input.rb +4 -0
  25. data/lib/fluent/plugin/out_buffer.rb +40 -0
  26. data/lib/fluent/plugin/out_copy.rb +1 -1
  27. data/lib/fluent/plugin/out_file.rb +8 -0
  28. data/lib/fluent/plugin/out_http.rb +12 -0
  29. data/lib/fluent/plugin/output.rb +2 -0
  30. data/lib/fluent/plugin/parser_json.rb +4 -12
  31. data/lib/fluent/plugin_helper/cert_option.rb +8 -0
  32. data/lib/fluent/plugin_helper/event_emitter.rb +12 -0
  33. data/lib/fluent/plugin_helper/http_server/server.rb +24 -8
  34. data/lib/fluent/plugin_helper/server.rb +9 -0
  35. data/lib/fluent/root_agent.rb +114 -19
  36. data/lib/fluent/source_only_buffer_agent.rb +102 -0
  37. data/lib/fluent/supervisor.rb +207 -34
  38. data/lib/fluent/system_config.rb +15 -3
  39. data/lib/fluent/version.rb +1 -1
  40. data/templates/new_gem/fluent-plugin.gemspec.erb +6 -5
  41. metadata +24 -483
  42. data/.github/DISCUSSION_TEMPLATE/q-a-japanese.yml +0 -50
  43. data/.github/DISCUSSION_TEMPLATE/q-a.yml +0 -47
  44. data/.github/ISSUE_TEMPLATE/bug_report.yml +0 -71
  45. data/.github/ISSUE_TEMPLATE/config.yml +0 -5
  46. data/.github/ISSUE_TEMPLATE/feature_request.yml +0 -39
  47. data/.github/ISSUE_TEMPLATE.md +0 -17
  48. data/.github/PULL_REQUEST_TEMPLATE.md +0 -14
  49. data/.github/workflows/stale-actions.yml +0 -24
  50. data/.github/workflows/test-ruby-head.yml +0 -31
  51. data/.github/workflows/test.yml +0 -32
  52. data/.gitignore +0 -30
  53. data/Gemfile +0 -9
  54. data/fluentd.gemspec +0 -62
  55. data/test/command/test_binlog_reader.rb +0 -362
  56. data/test/command/test_ca_generate.rb +0 -70
  57. data/test/command/test_cap_ctl.rb +0 -100
  58. data/test/command/test_cat.rb +0 -128
  59. data/test/command/test_ctl.rb +0 -56
  60. data/test/command/test_fluentd.rb +0 -1291
  61. data/test/command/test_plugin_config_formatter.rb +0 -397
  62. data/test/command/test_plugin_generator.rb +0 -109
  63. data/test/compat/test_calls_super.rb +0 -166
  64. data/test/compat/test_parser.rb +0 -92
  65. data/test/config/assertions.rb +0 -42
  66. data/test/config/test_config_parser.rb +0 -551
  67. data/test/config/test_configurable.rb +0 -1784
  68. data/test/config/test_configure_proxy.rb +0 -604
  69. data/test/config/test_dsl.rb +0 -415
  70. data/test/config/test_element.rb +0 -518
  71. data/test/config/test_literal_parser.rb +0 -309
  72. data/test/config/test_plugin_configuration.rb +0 -56
  73. data/test/config/test_section.rb +0 -191
  74. data/test/config/test_system_config.rb +0 -195
  75. data/test/config/test_types.rb +0 -408
  76. data/test/counter/test_client.rb +0 -563
  77. data/test/counter/test_error.rb +0 -44
  78. data/test/counter/test_mutex_hash.rb +0 -179
  79. data/test/counter/test_server.rb +0 -589
  80. data/test/counter/test_store.rb +0 -258
  81. data/test/counter/test_validator.rb +0 -137
  82. data/test/helper.rb +0 -155
  83. data/test/helpers/fuzzy_assert.rb +0 -89
  84. data/test/helpers/process_extenstion.rb +0 -33
  85. data/test/log/test_console_adapter.rb +0 -117
  86. data/test/plugin/data/2010/01/20100102-030405.log +0 -0
  87. data/test/plugin/data/2010/01/20100102-030406.log +0 -0
  88. data/test/plugin/data/2010/01/20100102.log +0 -0
  89. data/test/plugin/data/log/bar +0 -0
  90. data/test/plugin/data/log/foo/bar.log +0 -0
  91. data/test/plugin/data/log/foo/bar2 +0 -0
  92. data/test/plugin/data/log/test.log +0 -0
  93. data/test/plugin/data/log_numeric/01.log +0 -0
  94. data/test/plugin/data/log_numeric/02.log +0 -0
  95. data/test/plugin/data/log_numeric/12.log +0 -0
  96. data/test/plugin/data/log_numeric/14.log +0 -0
  97. data/test/plugin/data/sd_file/config +0 -11
  98. data/test/plugin/data/sd_file/config.json +0 -17
  99. data/test/plugin/data/sd_file/config.yaml +0 -11
  100. data/test/plugin/data/sd_file/config.yml +0 -11
  101. data/test/plugin/data/sd_file/invalid_config.yml +0 -7
  102. data/test/plugin/in_tail/test_fifo.rb +0 -121
  103. data/test/plugin/in_tail/test_io_handler.rb +0 -150
  104. data/test/plugin/in_tail/test_position_file.rb +0 -346
  105. data/test/plugin/out_forward/test_ack_handler.rb +0 -140
  106. data/test/plugin/out_forward/test_connection_manager.rb +0 -145
  107. data/test/plugin/out_forward/test_handshake_protocol.rb +0 -112
  108. data/test/plugin/out_forward/test_load_balancer.rb +0 -106
  109. data/test/plugin/out_forward/test_socket_cache.rb +0 -174
  110. data/test/plugin/test_bare_output.rb +0 -131
  111. data/test/plugin/test_base.rb +0 -247
  112. data/test/plugin/test_buf_file.rb +0 -1314
  113. data/test/plugin/test_buf_file_single.rb +0 -898
  114. data/test/plugin/test_buf_memory.rb +0 -42
  115. data/test/plugin/test_buffer.rb +0 -1493
  116. data/test/plugin/test_buffer_chunk.rb +0 -209
  117. data/test/plugin/test_buffer_file_chunk.rb +0 -871
  118. data/test/plugin/test_buffer_file_single_chunk.rb +0 -611
  119. data/test/plugin/test_buffer_memory_chunk.rb +0 -339
  120. data/test/plugin/test_compressable.rb +0 -87
  121. data/test/plugin/test_file_util.rb +0 -96
  122. data/test/plugin/test_filter.rb +0 -368
  123. data/test/plugin/test_filter_grep.rb +0 -697
  124. data/test/plugin/test_filter_parser.rb +0 -731
  125. data/test/plugin/test_filter_record_transformer.rb +0 -577
  126. data/test/plugin/test_filter_stdout.rb +0 -207
  127. data/test/plugin/test_formatter_csv.rb +0 -136
  128. data/test/plugin/test_formatter_hash.rb +0 -38
  129. data/test/plugin/test_formatter_json.rb +0 -61
  130. data/test/plugin/test_formatter_ltsv.rb +0 -70
  131. data/test/plugin/test_formatter_msgpack.rb +0 -28
  132. data/test/plugin/test_formatter_out_file.rb +0 -116
  133. data/test/plugin/test_formatter_single_value.rb +0 -44
  134. data/test/plugin/test_formatter_tsv.rb +0 -76
  135. data/test/plugin/test_in_debug_agent.rb +0 -49
  136. data/test/plugin/test_in_exec.rb +0 -261
  137. data/test/plugin/test_in_forward.rb +0 -1178
  138. data/test/plugin/test_in_gc_stat.rb +0 -62
  139. data/test/plugin/test_in_http.rb +0 -1124
  140. data/test/plugin/test_in_monitor_agent.rb +0 -922
  141. data/test/plugin/test_in_object_space.rb +0 -66
  142. data/test/plugin/test_in_sample.rb +0 -190
  143. data/test/plugin/test_in_syslog.rb +0 -505
  144. data/test/plugin/test_in_tail.rb +0 -3429
  145. data/test/plugin/test_in_tcp.rb +0 -328
  146. data/test/plugin/test_in_udp.rb +0 -296
  147. data/test/plugin/test_in_unix.rb +0 -181
  148. data/test/plugin/test_input.rb +0 -137
  149. data/test/plugin/test_metadata.rb +0 -89
  150. data/test/plugin/test_metrics.rb +0 -294
  151. data/test/plugin/test_metrics_local.rb +0 -96
  152. data/test/plugin/test_multi_output.rb +0 -204
  153. data/test/plugin/test_out_copy.rb +0 -308
  154. data/test/plugin/test_out_exec.rb +0 -312
  155. data/test/plugin/test_out_exec_filter.rb +0 -606
  156. data/test/plugin/test_out_file.rb +0 -1038
  157. data/test/plugin/test_out_forward.rb +0 -1349
  158. data/test/plugin/test_out_http.rb +0 -557
  159. data/test/plugin/test_out_null.rb +0 -105
  160. data/test/plugin/test_out_relabel.rb +0 -28
  161. data/test/plugin/test_out_roundrobin.rb +0 -146
  162. data/test/plugin/test_out_secondary_file.rb +0 -458
  163. data/test/plugin/test_out_stdout.rb +0 -205
  164. data/test/plugin/test_out_stream.rb +0 -103
  165. data/test/plugin/test_output.rb +0 -1334
  166. data/test/plugin/test_output_as_buffered.rb +0 -2024
  167. data/test/plugin/test_output_as_buffered_backup.rb +0 -363
  168. data/test/plugin/test_output_as_buffered_compress.rb +0 -179
  169. data/test/plugin/test_output_as_buffered_overflow.rb +0 -250
  170. data/test/plugin/test_output_as_buffered_retries.rb +0 -966
  171. data/test/plugin/test_output_as_buffered_secondary.rb +0 -882
  172. data/test/plugin/test_output_as_standard.rb +0 -374
  173. data/test/plugin/test_owned_by.rb +0 -34
  174. data/test/plugin/test_parser.rb +0 -399
  175. data/test/plugin/test_parser_apache.rb +0 -42
  176. data/test/plugin/test_parser_apache2.rb +0 -47
  177. data/test/plugin/test_parser_apache_error.rb +0 -45
  178. data/test/plugin/test_parser_csv.rb +0 -200
  179. data/test/plugin/test_parser_json.rb +0 -244
  180. data/test/plugin/test_parser_labeled_tsv.rb +0 -160
  181. data/test/plugin/test_parser_msgpack.rb +0 -127
  182. data/test/plugin/test_parser_multiline.rb +0 -111
  183. data/test/plugin/test_parser_nginx.rb +0 -88
  184. data/test/plugin/test_parser_none.rb +0 -52
  185. data/test/plugin/test_parser_regexp.rb +0 -284
  186. data/test/plugin/test_parser_syslog.rb +0 -650
  187. data/test/plugin/test_parser_tsv.rb +0 -122
  188. data/test/plugin/test_sd_file.rb +0 -228
  189. data/test/plugin/test_sd_srv.rb +0 -230
  190. data/test/plugin/test_storage.rb +0 -166
  191. data/test/plugin/test_storage_local.rb +0 -335
  192. data/test/plugin/test_string_util.rb +0 -26
  193. data/test/plugin_helper/data/cert/cert-key.pem +0 -27
  194. data/test/plugin_helper/data/cert/cert-with-CRLF.pem +0 -19
  195. data/test/plugin_helper/data/cert/cert-with-no-newline.pem +0 -19
  196. data/test/plugin_helper/data/cert/cert.pem +0 -19
  197. data/test/plugin_helper/data/cert/cert_chains/ca-cert-key.pem +0 -27
  198. data/test/plugin_helper/data/cert/cert_chains/ca-cert.pem +0 -20
  199. data/test/plugin_helper/data/cert/cert_chains/cert-key.pem +0 -27
  200. data/test/plugin_helper/data/cert/cert_chains/cert.pem +0 -40
  201. data/test/plugin_helper/data/cert/empty.pem +0 -0
  202. data/test/plugin_helper/data/cert/generate_cert.rb +0 -125
  203. data/test/plugin_helper/data/cert/with_ca/ca-cert-key-pass.pem +0 -30
  204. data/test/plugin_helper/data/cert/with_ca/ca-cert-key.pem +0 -27
  205. data/test/plugin_helper/data/cert/with_ca/ca-cert-pass.pem +0 -20
  206. data/test/plugin_helper/data/cert/with_ca/ca-cert.pem +0 -20
  207. data/test/plugin_helper/data/cert/with_ca/cert-key-pass.pem +0 -30
  208. data/test/plugin_helper/data/cert/with_ca/cert-key.pem +0 -27
  209. data/test/plugin_helper/data/cert/with_ca/cert-pass.pem +0 -21
  210. data/test/plugin_helper/data/cert/with_ca/cert.pem +0 -21
  211. data/test/plugin_helper/data/cert/without_ca/cert-key-pass.pem +0 -30
  212. data/test/plugin_helper/data/cert/without_ca/cert-key.pem +0 -27
  213. data/test/plugin_helper/data/cert/without_ca/cert-pass.pem +0 -20
  214. data/test/plugin_helper/data/cert/without_ca/cert.pem +0 -20
  215. data/test/plugin_helper/http_server/test_app.rb +0 -65
  216. data/test/plugin_helper/http_server/test_route.rb +0 -32
  217. data/test/plugin_helper/service_discovery/test_manager.rb +0 -93
  218. data/test/plugin_helper/service_discovery/test_round_robin_balancer.rb +0 -21
  219. data/test/plugin_helper/test_cert_option.rb +0 -25
  220. data/test/plugin_helper/test_child_process.rb +0 -862
  221. data/test/plugin_helper/test_compat_parameters.rb +0 -358
  222. data/test/plugin_helper/test_event_emitter.rb +0 -80
  223. data/test/plugin_helper/test_event_loop.rb +0 -52
  224. data/test/plugin_helper/test_extract.rb +0 -194
  225. data/test/plugin_helper/test_formatter.rb +0 -255
  226. data/test/plugin_helper/test_http_server_helper.rb +0 -372
  227. data/test/plugin_helper/test_inject.rb +0 -561
  228. data/test/plugin_helper/test_metrics.rb +0 -137
  229. data/test/plugin_helper/test_parser.rb +0 -264
  230. data/test/plugin_helper/test_record_accessor.rb +0 -238
  231. data/test/plugin_helper/test_retry_state.rb +0 -1006
  232. data/test/plugin_helper/test_server.rb +0 -1895
  233. data/test/plugin_helper/test_service_discovery.rb +0 -165
  234. data/test/plugin_helper/test_socket.rb +0 -146
  235. data/test/plugin_helper/test_storage.rb +0 -542
  236. data/test/plugin_helper/test_thread.rb +0 -164
  237. data/test/plugin_helper/test_timer.rb +0 -130
  238. data/test/scripts/exec_script.rb +0 -32
  239. data/test/scripts/fluent/plugin/formatter1/formatter_test1.rb +0 -7
  240. data/test/scripts/fluent/plugin/formatter2/formatter_test2.rb +0 -7
  241. data/test/scripts/fluent/plugin/formatter_known.rb +0 -8
  242. data/test/scripts/fluent/plugin/out_test.rb +0 -81
  243. data/test/scripts/fluent/plugin/out_test2.rb +0 -80
  244. data/test/scripts/fluent/plugin/parser_known.rb +0 -4
  245. data/test/test_capability.rb +0 -74
  246. data/test/test_clock.rb +0 -164
  247. data/test/test_config.rb +0 -369
  248. data/test/test_configdsl.rb +0 -148
  249. data/test/test_daemonizer.rb +0 -91
  250. data/test/test_engine.rb +0 -203
  251. data/test/test_event.rb +0 -531
  252. data/test/test_event_router.rb +0 -348
  253. data/test/test_event_time.rb +0 -199
  254. data/test/test_file_wrapper.rb +0 -53
  255. data/test/test_filter.rb +0 -121
  256. data/test/test_fluent_log_event_router.rb +0 -99
  257. data/test/test_formatter.rb +0 -369
  258. data/test/test_input.rb +0 -31
  259. data/test/test_log.rb +0 -1076
  260. data/test/test_match.rb +0 -148
  261. data/test/test_mixin.rb +0 -351
  262. data/test/test_msgpack_factory.rb +0 -50
  263. data/test/test_oj_options.rb +0 -55
  264. data/test/test_output.rb +0 -278
  265. data/test/test_plugin.rb +0 -251
  266. data/test/test_plugin_classes.rb +0 -370
  267. data/test/test_plugin_helper.rb +0 -81
  268. data/test/test_plugin_id.rb +0 -119
  269. data/test/test_process.rb +0 -14
  270. data/test/test_root_agent.rb +0 -951
  271. data/test/test_static_config_analysis.rb +0 -177
  272. data/test/test_supervisor.rb +0 -821
  273. data/test/test_test_drivers.rb +0 -136
  274. data/test/test_time_formatter.rb +0 -301
  275. data/test/test_time_parser.rb +0 -362
  276. data/test/test_tls.rb +0 -65
  277. data/test/test_unique_id.rb +0 -47
  278. data/test/test_variable_store.rb +0 -65
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc7924012e09f9568cbda96bbb4d1449074a4db721795d74900261b984b04047
4
- data.tar.gz: 8c3e8f5ef86237b5c18943ffbf393188338f9dbd3dbcac3d9fb321973ba3b43e
3
+ metadata.gz: 60aad222ea9e1a230301949e5e43f9ef65915a01c4a0ddd60e0bfd8c8fd9cfd8
4
+ data.tar.gz: 74a0834d59f04d01576eaaca3a79a89d4e442cfeda4321c3b33c0ef6b8131d4c
5
5
  SHA512:
6
- metadata.gz: 7998a2f12349a767e7952dcf3a17a108cfb0f2e2063524862d97b83159012e8b753e46d2e4893e235e6a4bb1d43533f3068dc955601533fddf839f75edcca096
7
- data.tar.gz: '09dac9716859404ddb3b563408cab32921c894300f2701b3e7aff89a608be154d0090e321adbbed9e0615459b06a4be3038f3e5b16206e624a0e1e770970c803'
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
  [![Testing on macOS](https://github.com/fluent/fluentd/actions/workflows/macos-test.yaml/badge.svg?branch=master)](https://github.com/fluent/fluentd/actions/workflows/macos-test.yaml)
7
7
  [![Code Climate](https://codeclimate.com/github/fluent/fluentd/badges/gpa.svg)](https://codeclimate.com/github/fluent/fluentd)
8
8
  [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1189/badge)](https://bestpractices.coreinfrastructure.org/projects/1189)
9
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/fluent/fluentd/badge)](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
@@ -4,9 +4,9 @@
4
4
 
5
5
  | Version | Supported |
6
6
  | ------- | ------------------ |
7
+ | 1.17.x | :white_check_mark: |
7
8
  | 1.16.x | :white_check_mark: |
8
- | 1.15.x | :white_check_mark: |
9
- | <= 1.14.x | :x: |
9
+ | <= 1.15.x | :x: |
10
10
 
11
11
  ## Reporting a Vulnerability
12
12
 
data/fluent.conf CHANGED
@@ -81,20 +81,20 @@
81
81
  @id stdout_output
82
82
  </match>
83
83
 
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>
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
- @opts[:target_file]
80
- else
81
- File.readlink("/proc/self/exe")
82
- end
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].bind(self).call
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].bind(self).call
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].bind(self).call
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).bind(self).call(name, type, **kwargs, &block)
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).bind(self).call(:buffer) do
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).bind(self).call(name, defval)
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).bind(self).call(:buffer) do
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
- # '#' is a char in json string
258
- line_buffer << char
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.
@@ -138,6 +138,10 @@ module Fluent
138
138
  sb.add_line('@id', v)
139
139
  end
140
140
 
141
+ if (v = config.delete('$log_level'))
142
+ sb.add_line('@log_level', v)
143
+ end
144
+
141
145
  config.each do |key, val|
142
146
  if val.is_a?(Array)
143
147
  val.each do |v|
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
- @root_agent.flush!
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
- start
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
- stop_phase(@root_agent)
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
- # configure first to reduce down time while restarting
169
- new_agent = RootAgent.new(log: log, system_config: @system_config)
170
- ret = Fluent::StaticConfigAnalysis.call(conf, workers: system_config.workers)
171
-
172
- ret.all_plugins.each do |plugin|
173
- if plugin.respond_to?(:reloadable_plugin?) && !plugin.reloadable_plugin?
174
- raise Fluent::ConfigError, "Unreloadable plugin plugin: #{Fluent::Plugin.lookup_type_from_class(plugin.class)}, plugin_id: #{plugin.plugin_id}, class_name: #{plugin.class})"
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
- # Assign @root_agent to new root_agent
179
- # for https://github.com/fluent/fluentd/blob/fcef949ce40472547fde295ddd2cfe297e1eddd6/lib/fluent/plugin_helper/event_emitter.rb#L50
180
- old_agent, @root_agent = @root_agent, new_agent
181
- begin
182
- @root_agent.configure(conf)
183
- rescue
184
- @root_agent = old_agent
185
- raise
186
- end
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
- unless @suppress_config_dump
189
- $log.info :supervisor, "using configuration file: #{conf.to_s.rstrip}"
190
- end
203
+ unless @suppress_config_dump
204
+ $log.info :supervisor, "using configuration file: #{conf.to_s.rstrip}"
205
+ end
191
206
 
192
- # supervisor doesn't handle actual data. so the following code is unnecessary.
193
- if supervisor
194
- old_agent.shutdown # to close thread created in #configure
195
- return
196
- end
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
- stop_phase(old_agent)
213
+ stop_phase(old_agent)
199
214
 
200
- $log.info 'restart fluentd worker', worker: worker_id
201
- start_phase(new_agent)
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?
@@ -286,7 +286,7 @@ module Fluent
286
286
 
287
287
  def find(tag)
288
288
  pipeline = nil
289
- @match_rules.each_with_index { |rule, i|
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/terminal/logger'
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::Terminal::Logger
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 filter_with_time(tag, time, record)
61
- raw_value = @accessor.call(record)
62
- if raw_value.nil?
63
- if @emit_invalid_record_to_error
64
- router.emit_error_event(tag, time, record, ArgumentError.new("#{@key_name} does not exist"))
65
- end
66
- if @reserve_data
67
- return time, handle_parsed(tag, record, time, {})
68
- else
69
- return FAILED_RESULT
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
- begin
73
- # Note: https://github.com/fluent/fluentd/issues/4100
74
- # If the parser returns multiple records from one raw_value,
75
- # this returns only the first one record.
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
- next unless result_record.nil?
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
- if @emit_invalid_record_to_error
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
- if @emit_invalid_record_to_error
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, mode: [@connect_mode], &method(:run))
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, mode: [@connect_mode], &method(:run))
91
+ child_process_execute(:exec_input, @command, immediate: true, **options, &method(:run))
80
92
  end
81
93
  end
82
94