fluentd 1.11.3-x86-mingw32 → 1.12.2-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fluentd might be problematic. Click here for more details.

Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/.deepsource.toml +13 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +1 -1
  4. data/.github/ISSUE_TEMPLATE/config.yml +5 -0
  5. data/.github/workflows/linux-test.yaml +36 -0
  6. data/.github/workflows/macos-test.yaml +30 -0
  7. data/.github/workflows/stale-actions.yml +22 -0
  8. data/.github/workflows/windows-test.yaml +30 -0
  9. data/CHANGELOG.md +138 -0
  10. data/MAINTAINERS.md +5 -2
  11. data/README.md +2 -2
  12. data/bin/fluent-cap-ctl +7 -0
  13. data/bin/fluent-ctl +7 -0
  14. data/fluentd.gemspec +4 -3
  15. data/lib/fluent/capability.rb +87 -0
  16. data/lib/fluent/command/bundler_injection.rb +1 -1
  17. data/lib/fluent/command/ca_generate.rb +6 -3
  18. data/lib/fluent/command/cap_ctl.rb +174 -0
  19. data/lib/fluent/command/cat.rb +0 -1
  20. data/lib/fluent/command/ctl.rb +177 -0
  21. data/lib/fluent/command/fluentd.rb +4 -0
  22. data/lib/fluent/command/plugin_config_formatter.rb +18 -2
  23. data/lib/fluent/compat/parser.rb +2 -2
  24. data/lib/fluent/config/section.rb +2 -2
  25. data/lib/fluent/config/types.rb +2 -2
  26. data/lib/fluent/env.rb +4 -0
  27. data/lib/fluent/event.rb +3 -13
  28. data/lib/fluent/load.rb +0 -1
  29. data/lib/fluent/plugin.rb +5 -0
  30. data/lib/fluent/plugin/buffer.rb +2 -21
  31. data/lib/fluent/plugin/formatter.rb +24 -0
  32. data/lib/fluent/plugin/formatter_csv.rb +1 -1
  33. data/lib/fluent/plugin/formatter_hash.rb +3 -1
  34. data/lib/fluent/plugin/formatter_json.rb +3 -1
  35. data/lib/fluent/plugin/formatter_ltsv.rb +7 -5
  36. data/lib/fluent/plugin/formatter_out_file.rb +6 -4
  37. data/lib/fluent/plugin/formatter_single_value.rb +4 -2
  38. data/lib/fluent/plugin/formatter_tsv.rb +4 -2
  39. data/lib/fluent/plugin/in_http.rb +24 -3
  40. data/lib/fluent/plugin/in_monitor_agent.rb +1 -1
  41. data/lib/fluent/plugin/in_tail.rb +128 -41
  42. data/lib/fluent/plugin/in_tail/position_file.rb +39 -14
  43. data/lib/fluent/plugin/in_tcp.rb +1 -0
  44. data/lib/fluent/plugin/out_copy.rb +18 -5
  45. data/lib/fluent/plugin/out_exec_filter.rb +3 -3
  46. data/lib/fluent/plugin/out_forward.rb +61 -28
  47. data/lib/fluent/plugin/out_http.rb +29 -4
  48. data/lib/fluent/plugin/output.rb +14 -6
  49. data/lib/fluent/plugin/storage_local.rb +3 -3
  50. data/lib/fluent/plugin_helper/http_server/compat/server.rb +1 -1
  51. data/lib/fluent/plugin_helper/inject.rb +4 -1
  52. data/lib/fluent/plugin_helper/retry_state.rb +4 -0
  53. data/lib/fluent/supervisor.rb +153 -48
  54. data/lib/fluent/system_config.rb +2 -1
  55. data/lib/fluent/time.rb +58 -1
  56. data/lib/fluent/version.rb +1 -1
  57. data/lib/fluent/winsvc.rb +22 -4
  58. data/templates/plugin_config_formatter/param.md-table.erb +10 -0
  59. data/test/command/test_binlog_reader.rb +22 -6
  60. data/test/command/test_cap_ctl.rb +100 -0
  61. data/test/command/test_ctl.rb +57 -0
  62. data/test/command/test_fluentd.rb +38 -0
  63. data/test/command/test_plugin_config_formatter.rb +124 -2
  64. data/test/config/test_configurable.rb +1 -1
  65. data/test/plugin/in_tail/test_position_file.rb +46 -26
  66. data/test/plugin/out_forward/test_connection_manager.rb +6 -0
  67. data/test/plugin/test_filter_stdout.rb +6 -1
  68. data/test/plugin/test_formatter_hash.rb +6 -3
  69. data/test/plugin/test_formatter_json.rb +14 -4
  70. data/test/plugin/test_formatter_ltsv.rb +13 -5
  71. data/test/plugin/test_formatter_out_file.rb +35 -14
  72. data/test/plugin/test_formatter_single_value.rb +12 -6
  73. data/test/plugin/test_formatter_tsv.rb +12 -4
  74. data/test/plugin/test_in_exec.rb +1 -1
  75. data/test/plugin/test_in_http.rb +25 -0
  76. data/test/plugin/test_in_tail.rb +470 -32
  77. data/test/plugin/test_out_copy.rb +87 -0
  78. data/test/plugin/test_out_file.rb +23 -18
  79. data/test/plugin/test_out_forward.rb +74 -0
  80. data/test/plugin/test_out_http.rb +20 -1
  81. data/test/plugin/test_output.rb +12 -0
  82. data/test/plugin/test_parser_syslog.rb +2 -2
  83. data/test/plugin/test_sd_file.rb +1 -1
  84. data/test/plugin_helper/test_child_process.rb +5 -2
  85. data/test/plugin_helper/test_compat_parameters.rb +7 -2
  86. data/test/plugin_helper/test_http_server_helper.rb +3 -1
  87. data/test/plugin_helper/test_inject.rb +42 -0
  88. data/test/plugin_helper/test_server.rb +18 -5
  89. data/test/test_capability.rb +74 -0
  90. data/test/test_event.rb +16 -0
  91. data/test/test_formatter.rb +64 -10
  92. data/test/test_output.rb +6 -1
  93. data/test/test_supervisor.rb +150 -1
  94. data/test/test_time_parser.rb +109 -0
  95. metadata +61 -29
  96. data/.travis.yml +0 -57
  97. data/appveyor.yml +0 -28
@@ -228,4 +228,113 @@ class TimeParserTest < ::Test::Unit::TestCase
228
228
  assert_equal_event_time(time, parser.parse("#{time.sec}.#{time.nsec}"))
229
229
  end
230
230
  end
231
+
232
+ sub_test_case 'MixedTimeParser fallback' do
233
+ class DummyForTimeParser
234
+ include Fluent::Configurable
235
+ include Fluent::TimeMixin::Parser
236
+ end
237
+
238
+ test 'no time_format_fallbacks failure' do
239
+ i = DummyForTimeParser.new
240
+ assert_raise(Fluent::ConfigError.new("time_type is :mixed but time_format and time_format_fallbacks is empty.")) do
241
+ i.configure(config_element('parse', '', {'time_type' => 'mixed'}))
242
+ end
243
+ end
244
+
245
+ test 'fallback time format failure' do
246
+ i = DummyForTimeParser.new
247
+ i.configure(config_element('parse', '',
248
+ {'time_type' => 'mixed',
249
+ 'time_format_fallbacks' => ['%iso8601']}))
250
+ parser = i.time_parser_create
251
+ assert_raise(Fluent::TimeParser::TimeParseError.new("invalid time format: value = INVALID, even though fallbacks: Fluent::TimeParser")) do
252
+ parser.parse("INVALID")
253
+ end
254
+ end
255
+
256
+ test 'primary format is unixtime, secondary %iso8601 is used' do
257
+ i = DummyForTimeParser.new
258
+ i.configure(config_element('parse', '',
259
+ {'time_type' => 'mixed',
260
+ 'time_format' => 'unixtime',
261
+ 'time_format_fallbacks' => ['%iso8601']}))
262
+ parser = i.time_parser_create
263
+ time = event_time('2021-01-01T12:00:00+0900')
264
+ assert_equal_event_time(time, parser.parse('2021-01-01T12:00:00+0900'))
265
+ end
266
+
267
+ test 'primary format is %iso8601, secondary unixtime is used' do
268
+ i = DummyForTimeParser.new
269
+ i.configure(config_element('parse', '',
270
+ {'time_type' => 'mixed',
271
+ 'time_format' => '%iso8601',
272
+ 'time_format_fallbacks' => ['unixtime']}))
273
+ parser = i.time_parser_create
274
+ time = event_time('2021-01-01T12:00:00+0900')
275
+ assert_equal_event_time(time, parser.parse("#{time.sec}"))
276
+ end
277
+
278
+ test 'primary format is %iso8601, no secondary is used' do
279
+ i = DummyForTimeParser.new
280
+ i.configure(config_element('parse', '',
281
+ {'time_type' => 'mixed',
282
+ 'time_format' => '%iso8601'}))
283
+ parser = i.time_parser_create
284
+ time = event_time('2021-01-01T12:00:00+0900')
285
+ assert_equal_event_time(time, parser.parse("2021-01-01T12:00:00+0900"))
286
+ end
287
+
288
+ test 'primary format is unixtime, no secondary is used' do
289
+ i = DummyForTimeParser.new
290
+ i.configure(config_element('parse', '',
291
+ {'time_type' => 'mixed',
292
+ 'time_format' => 'unixtime'}))
293
+ parser = i.time_parser_create
294
+ time = event_time('2021-01-01T12:00:00+0900')
295
+ assert_equal_event_time(time, parser.parse("#{time.sec}"))
296
+ end
297
+
298
+ test 'primary format is %iso8601, raise error because of no appropriate secondary' do
299
+ i = DummyForTimeParser.new
300
+ i.configure(config_element('parse', '',
301
+ {'time_type' => 'mixed',
302
+ 'time_format' => '%iso8601'}))
303
+ parser = i.time_parser_create
304
+ time = event_time('2021-01-01T12:00:00+0900')
305
+ assert_raise("Fluent::TimeParser::TimeParseError: invalid time format: value = #{time.sec}, even though fallbacks: Fluent::TimeParser") do
306
+ parser.parse("#{time.sec}")
307
+ end
308
+ end
309
+
310
+ test 'primary format is unixtime, raise error because of no appropriate secondary' do
311
+ i = DummyForTimeParser.new
312
+ i.configure(config_element('parse', '',
313
+ {'time_type' => 'mixed',
314
+ 'time_format' => 'unixtime'}))
315
+ parser = i.time_parser_create
316
+ time = event_time('2021-01-01T12:00:00+0900')
317
+ assert_raise("Fluent::TimeParser::TimeParseError: invalid time format: value = #{time}, even though fallbacks: Fluent::NumericTimeParser") do
318
+ parser.parse("2021-01-01T12:00:00+0900")
319
+ end
320
+ end
321
+
322
+ test 'fallback to unixtime' do
323
+ i = DummyForTimeParser.new
324
+ i.configure(config_element('parse', '', {'time_type' => 'mixed',
325
+ 'time_format_fallbacks' => ['%iso8601', 'unixtime']}))
326
+ parser = i.time_parser_create
327
+ time = event_time('2021-01-01T12:00:00+0900')
328
+ assert_equal_event_time(Fluent::EventTime.new(time.to_i), parser.parse("#{time.sec}"))
329
+ end
330
+
331
+ test 'fallback to %iso8601' do
332
+ i = DummyForTimeParser.new
333
+ i.configure(config_element('parse', '', {'time_type' => 'mixed',
334
+ 'time_format_fallbacks' => ['unixtime', '%iso8601']}))
335
+ parser = i.time_parser_create
336
+ time = event_time('2021-01-01T12:00:00+0900')
337
+ assert_equal_event_time(time, parser.parse('2021-01-01T12:00:00+0900'))
338
+ end
339
+ end
231
340
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluentd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.3
4
+ version: 1.12.2
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-30 00:00:00.000000000 Z
11
+ date: 2021-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: msgpack
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -70,7 +84,7 @@ dependencies:
70
84
  requirements:
71
85
  - - ">="
72
86
  - !ruby/object:Gem::Version
73
- version: 2.0.4
87
+ version: 2.2.2
74
88
  - - "<"
75
89
  - !ruby/object:Gem::Version
76
90
  version: 3.0.0
@@ -80,7 +94,7 @@ dependencies:
80
94
  requirements:
81
95
  - - ">="
82
96
  - !ruby/object:Gem::Version
83
- version: 2.0.4
97
+ version: 2.2.2
84
98
  - - "<"
85
99
  - !ruby/object:Gem::Version
86
100
  version: 3.0.0
@@ -172,6 +186,26 @@ dependencies:
172
186
  - - "<"
173
187
  - !ruby/object:Gem::Version
174
188
  version: 1.0.0
189
+ - !ruby/object:Gem::Dependency
190
+ name: webrick
191
+ requirement: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ version: 1.4.2
196
+ - - "<"
197
+ - !ruby/object:Gem::Version
198
+ version: 1.8.0
199
+ type: :runtime
200
+ prerelease: false
201
+ version_requirements: !ruby/object:Gem::Requirement
202
+ requirements:
203
+ - - ">="
204
+ - !ruby/object:Gem::Version
205
+ version: 1.4.2
206
+ - - "<"
207
+ - !ruby/object:Gem::Version
208
+ version: 1.8.0
175
209
  - !ruby/object:Gem::Dependency
176
210
  name: win32-service
177
211
  requirement: !ruby/object:Gem::Requirement
@@ -374,40 +408,20 @@ dependencies:
374
408
  - - "<"
375
409
  - !ruby/object:Gem::Version
376
410
  version: '4'
377
- - !ruby/object:Gem::Dependency
378
- name: ext_monitor
379
- requirement: !ruby/object:Gem::Requirement
380
- requirements:
381
- - - ">="
382
- - !ruby/object:Gem::Version
383
- version: 0.1.2
384
- - - "<"
385
- - !ruby/object:Gem::Version
386
- version: '0.2'
387
- type: :development
388
- prerelease: false
389
- version_requirements: !ruby/object:Gem::Requirement
390
- requirements:
391
- - - ">="
392
- - !ruby/object:Gem::Version
393
- version: 0.1.2
394
- - - "<"
395
- - !ruby/object:Gem::Version
396
- version: '0.2'
397
411
  - !ruby/object:Gem::Dependency
398
412
  name: async-http
399
413
  requirement: !ruby/object:Gem::Requirement
400
414
  requirements:
401
415
  - - ">="
402
416
  - !ruby/object:Gem::Version
403
- version: '0'
417
+ version: 0.50.0
404
418
  type: :development
405
419
  prerelease: false
406
420
  version_requirements: !ruby/object:Gem::Requirement
407
421
  requirements:
408
422
  - - ">="
409
423
  - !ruby/object:Gem::Version
410
- version: '0'
424
+ version: 0.50.0
411
425
  description: Fluentd is an open source data collector designed to scale and simplify
412
426
  log management. It can collect, process and ship many kinds of data in near real-time.
413
427
  email:
@@ -415,7 +429,9 @@ email:
415
429
  executables:
416
430
  - fluent-binlog-reader
417
431
  - fluent-ca-generate
432
+ - fluent-cap-ctl
418
433
  - fluent-cat
434
+ - fluent-ctl
419
435
  - fluent-debug
420
436
  - fluent-gem
421
437
  - fluent-plugin-config-format
@@ -424,15 +440,20 @@ executables:
424
440
  extensions: []
425
441
  extra_rdoc_files: []
426
442
  files:
443
+ - ".deepsource.toml"
427
444
  - ".drone.yml"
428
445
  - ".github/ISSUE_TEMPLATE.md"
429
446
  - ".github/ISSUE_TEMPLATE/bug_report.md"
447
+ - ".github/ISSUE_TEMPLATE/config.yml"
430
448
  - ".github/ISSUE_TEMPLATE/feature_request.md"
431
449
  - ".github/PULL_REQUEST_TEMPLATE.md"
432
450
  - ".github/workflows/issue-auto-closer.yml"
451
+ - ".github/workflows/linux-test.yaml"
452
+ - ".github/workflows/macos-test.yaml"
453
+ - ".github/workflows/stale-actions.yml"
454
+ - ".github/workflows/windows-test.yaml"
433
455
  - ".gitignore"
434
456
  - ".gitlab-ci.yml"
435
- - ".travis.yml"
436
457
  - ADOPTERS.md
437
458
  - AUTHORS
438
459
  - CHANGELOG.md
@@ -444,10 +465,11 @@ files:
444
465
  - MAINTAINERS.md
445
466
  - README.md
446
467
  - Rakefile
447
- - appveyor.yml
448
468
  - bin/fluent-binlog-reader
449
469
  - bin/fluent-ca-generate
470
+ - bin/fluent-cap-ctl
450
471
  - bin/fluent-cat
472
+ - bin/fluent-ctl
451
473
  - bin/fluent-debug
452
474
  - bin/fluent-gem
453
475
  - bin/fluent-plugin-config-format
@@ -495,11 +517,14 @@ files:
495
517
  - fluent.conf
496
518
  - fluentd.gemspec
497
519
  - lib/fluent/agent.rb
520
+ - lib/fluent/capability.rb
498
521
  - lib/fluent/clock.rb
499
522
  - lib/fluent/command/binlog_reader.rb
500
523
  - lib/fluent/command/bundler_injection.rb
501
524
  - lib/fluent/command/ca_generate.rb
525
+ - lib/fluent/command/cap_ctl.rb
502
526
  - lib/fluent/command/cat.rb
527
+ - lib/fluent/command/ctl.rb
503
528
  - lib/fluent/command/debug.rb
504
529
  - lib/fluent/command/fluentd.rb
505
530
  - lib/fluent/command/plugin_config_formatter.rb
@@ -741,10 +766,13 @@ files:
741
766
  - templates/new_gem/test/plugin/test_output.rb.erb
742
767
  - templates/new_gem/test/plugin/test_parser.rb.erb
743
768
  - templates/plugin_config_formatter/param.md-compact.erb
769
+ - templates/plugin_config_formatter/param.md-table.erb
744
770
  - templates/plugin_config_formatter/param.md.erb
745
771
  - templates/plugin_config_formatter/section.md.erb
746
772
  - test/command/test_binlog_reader.rb
747
773
  - test/command/test_ca_generate.rb
774
+ - test/command/test_cap_ctl.rb
775
+ - test/command/test_ctl.rb
748
776
  - test/command/test_fluentd.rb
749
777
  - test/command/test_plugin_config_formatter.rb
750
778
  - test/command/test_plugin_generator.rb
@@ -921,6 +949,7 @@ files:
921
949
  - test/scripts/fluent/plugin/out_test.rb
922
950
  - test/scripts/fluent/plugin/out_test2.rb
923
951
  - test/scripts/fluent/plugin/parser_known.rb
952
+ - test/test_capability.rb
924
953
  - test/test_clock.rb
925
954
  - test/test_config.rb
926
955
  - test/test_configdsl.rb
@@ -972,13 +1001,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
972
1001
  - !ruby/object:Gem::Version
973
1002
  version: '0'
974
1003
  requirements: []
975
- rubygems_version: 3.0.3
1004
+ rubygems_version: 3.2.3
976
1005
  signing_key:
977
1006
  specification_version: 4
978
1007
  summary: Fluentd event collector
979
1008
  test_files:
980
1009
  - test/command/test_binlog_reader.rb
981
1010
  - test/command/test_ca_generate.rb
1011
+ - test/command/test_cap_ctl.rb
1012
+ - test/command/test_ctl.rb
982
1013
  - test/command/test_fluentd.rb
983
1014
  - test/command/test_plugin_config_formatter.rb
984
1015
  - test/command/test_plugin_generator.rb
@@ -1155,6 +1186,7 @@ test_files:
1155
1186
  - test/scripts/fluent/plugin/out_test.rb
1156
1187
  - test/scripts/fluent/plugin/out_test2.rb
1157
1188
  - test/scripts/fluent/plugin/parser_known.rb
1189
+ - test/test_capability.rb
1158
1190
  - test/test_clock.rb
1159
1191
  - test/test_config.rb
1160
1192
  - test/test_configdsl.rb
data/.travis.yml DELETED
@@ -1,57 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
-
4
- # script: bundle exec rake test TESTOPTS=-v
5
-
6
- # http://rubies.travis-ci.org/
7
- # See here for osx_image -> OSX versions: https://docs.travis-ci.com/user/languages/objective-c
8
- matrix:
9
- include:
10
- - rvm: 2.4.9
11
- os: linux
12
- - rvm: 2.4.9
13
- os: linux-ppc64le
14
- - rvm: 2.5.7
15
- os: linux
16
- - rvm: 2.5.7
17
- os: linux
18
- arch: s390x
19
- dist: xenial
20
- - rvm: 2.6.5
21
- os: linux
22
- - rvm: 2.7.0
23
- os: linux
24
- - rvm: ruby-head
25
- os: linux
26
- - rvm: ruby-head
27
- os: linux-ppc64le
28
- - rvm: 2.4.6
29
- os: osx
30
- osx_image: xcode8.3 # OSX 10.12
31
- - rvm: ruby-head
32
- os: osx
33
- osx_image: xcode8.3 # OSX 10.12
34
- allow_failures:
35
- - rvm: 2.4.6
36
- os: osx
37
- osx_image: xcode8.3
38
- - rvm: 2.5.7
39
- os: linux
40
- arch: s390x
41
- dist: xenial
42
- - rvm: ruby-head
43
-
44
- branches:
45
- only:
46
- - master
47
-
48
- before_install:
49
- - gem update --system=3.1.2
50
-
51
- sudo: false
52
- dist: trusty # for TLSv1.2 support
53
-
54
- addons:
55
- apt:
56
- packages:
57
- - libgmp3-dev
data/appveyor.yml DELETED
@@ -1,28 +0,0 @@
1
- version: '{build}'
2
-
3
- # init:
4
- # - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
5
-
6
- install:
7
- - SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
8
- - ruby --version
9
- - gem --version
10
- - ridk.cmd exec bundle install
11
- build: off
12
- test_script:
13
- - bundle exec rake test
14
- # - bundle exec rake test TESTOPTS=-v
15
-
16
- branches:
17
- only:
18
- - master
19
-
20
- # https://www.appveyor.com/docs/installed-software/#ruby
21
- environment:
22
- matrix:
23
- - ruby_version: "26-x64"
24
- - ruby_version: "26"
25
- - ruby_version: "25-x64"
26
- - ruby_version: "25"
27
- - ruby_version: "24-x64"
28
- - ruby_version: "24"