fluentd 1.10.4-x64-mingw32 → 1.11.4-x64-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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +100 -0
  3. data/example/copy_roundrobin.conf +3 -3
  4. data/example/counter.conf +1 -1
  5. data/example/filter_stdout.conf +2 -2
  6. data/example/{in_dummy_blocks.conf → in_sample_blocks.conf} +4 -4
  7. data/example/{in_dummy_with_compression.conf → in_sample_with_compression.conf} +3 -3
  8. data/example/logevents.conf +5 -5
  9. data/example/multi_filters.conf +1 -1
  10. data/example/out_exec_filter.conf +2 -2
  11. data/example/out_forward.conf +1 -1
  12. data/example/out_forward_buf_file.conf +1 -1
  13. data/example/out_forward_client.conf +5 -5
  14. data/example/out_forward_heartbeat_none.conf +1 -1
  15. data/example/out_forward_sd.conf +1 -1
  16. data/example/out_forward_shared_key.conf +2 -2
  17. data/example/out_forward_tls.conf +1 -1
  18. data/example/out_forward_users.conf +3 -3
  19. data/example/out_null.conf +4 -4
  20. data/example/secondary_file.conf +1 -1
  21. data/fluentd.gemspec +5 -5
  22. data/lib/fluent/command/fluentd.rb +11 -0
  23. data/lib/fluent/log.rb +33 -3
  24. data/lib/fluent/match.rb +9 -0
  25. data/lib/fluent/plugin/buffer.rb +49 -40
  26. data/lib/fluent/plugin/buffer/chunk.rb +2 -1
  27. data/lib/fluent/plugin/in_dummy.rb +2 -123
  28. data/lib/fluent/plugin/in_exec.rb +4 -2
  29. data/lib/fluent/plugin/in_gc_stat.rb +16 -0
  30. data/lib/fluent/plugin/in_http.rb +148 -77
  31. data/lib/fluent/plugin/in_sample.rb +141 -0
  32. data/lib/fluent/plugin/in_tail.rb +2 -2
  33. data/lib/fluent/plugin/in_unix.rb +77 -77
  34. data/lib/fluent/plugin/out_http.rb +1 -1
  35. data/lib/fluent/plugin/output.rb +8 -5
  36. data/lib/fluent/plugin/parser_json.rb +5 -2
  37. data/lib/fluent/plugin/parser_syslog.rb +215 -54
  38. data/lib/fluent/plugin_helper/cert_option.rb +5 -8
  39. data/lib/fluent/plugin_helper/child_process.rb +3 -2
  40. data/lib/fluent/plugin_helper/inject.rb +2 -1
  41. data/lib/fluent/plugin_helper/socket.rb +1 -1
  42. data/lib/fluent/supervisor.rb +11 -5
  43. data/lib/fluent/system_config.rb +2 -1
  44. data/lib/fluent/version.rb +1 -1
  45. data/test/plugin/test_buffer.rb +4 -0
  46. data/test/plugin/test_in_exec.rb +18 -0
  47. data/test/plugin/test_in_gc_stat.rb +24 -1
  48. data/test/plugin/test_in_http.rb +57 -0
  49. data/test/plugin/{test_in_dummy.rb → test_in_sample.rb} +25 -25
  50. data/test/plugin/test_in_tail.rb +3 -0
  51. data/test/plugin/test_in_unix.rb +128 -72
  52. data/test/plugin/test_output.rb +12 -0
  53. data/test/plugin/test_parser_syslog.rb +66 -29
  54. data/test/plugin_helper/data/cert/empty.pem +0 -0
  55. data/test/plugin_helper/test_cert_option.rb +7 -0
  56. data/test/plugin_helper/test_child_process.rb +15 -0
  57. data/test/plugin_helper/test_http_server_helper.rb +5 -0
  58. data/test/plugin_helper/test_inject.rb +13 -0
  59. data/test/plugin_helper/test_server.rb +34 -0
  60. data/test/plugin_helper/test_socket.rb +8 -0
  61. data/test/test_log.rb +44 -0
  62. data/test/test_match.rb +11 -0
  63. data/test/test_static_config_analysis.rb +2 -2
  64. metadata +19 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d40c8ccff567f76d8cbe120f798196e2f489777405c84241255dfcedb67aca0e
4
- data.tar.gz: ab6c60fa55b22b2a770ebeed508c93c800ecb72d4273bc8eba889b96442dc927
3
+ metadata.gz: 199643a709aff608a2717466013d7a9c462f070fc817f1a802d3e623e28a6cc1
4
+ data.tar.gz: eaf551474e4ddfd6f0693ad1fd82ca7877a4b2060521b3943d4d97beb6f5c5a7
5
5
  SHA512:
6
- metadata.gz: 5f1b2431e2a58e6c1f21c45bbd6fbff4b2b34f7701329a06b800c6a8bfd5e0c37a2b6a532377e822ae67ac6dedb2a238be9de722cb0ac436562b66d6b05236bb
7
- data.tar.gz: e53c3c58aa836bf0cd1e49041273c5b2ad9cb088979f86c86468886ca879310e29e918ec201ae11c309a920ee54b4d6bc5e66583d65188d50fb8091a10876675
6
+ metadata.gz: c82dd4eae7bb3a2ddb519d08a69f0bd8687453ebe8078339dd6de3fd4f2fb0bfe8276fe0c8f1b1b0f7c5c49d626bf81e3a23f51fd48d1ed1064b1bbbb0a812af
7
+ data.tar.gz: ca2039bfcebf63cb88392180870879af253222ec3c5a7f8d5d324737a167acf4bf07f95b149dd60e9877bcf194afebf02896b84b52d6d282c3831b97a79e91d1
@@ -1,3 +1,103 @@
1
+ # v1.11
2
+
3
+ ## Release v1.11.4 - 2020/10/13
4
+
5
+ ### Enhancement
6
+
7
+ * inject: Support `unixtime_millis` in `time_type` parameter
8
+ https://github.com/fluent/fluentd/pull/3145
9
+
10
+ ### Bug fix
11
+
12
+ * out_http: Fix broken data with `json_array true`
13
+ https://github.com/fluent/fluentd/pull/3144
14
+ * output: Fix wrong logging issue for `${chunk_id}`
15
+ https://github.com/fluent/fluentd/pull/3134
16
+
17
+ ## Release v1.11.3 - 2020/09/30
18
+
19
+ ### Enhancement
20
+
21
+ * in_exec: Add `connect_mode` parameter to read stderr
22
+ https://github.com/fluent/fluentd/pull/3108
23
+ * parser_json: Improve the performance
24
+ https://github.com/fluent/fluentd/pull/3109
25
+ * log: Add `ignore_same_log_interval` parameter
26
+ https://github.com/fluent/fluentd/pull/3119
27
+ * Upgrade win32 gems
28
+ https://github.com/fluent/fluentd/pull/3100
29
+ * Refactoring code
30
+ https://github.com/fluent/fluentd/pull/3094
31
+ https://github.com/fluent/fluentd/pull/3118
32
+
33
+ ### Bug fix
34
+
35
+ * buffer: Fix calculation of timekey stats
36
+ https://github.com/fluent/fluentd/pull/3018
37
+ * buffer: fix binmode usage for prevent gc
38
+ https://github.com/fluent/fluentd/pull/3138
39
+
40
+ ## Release v1.11.2 - 2020/08/04
41
+
42
+ ### Enhancement
43
+
44
+ * `in_dummy` renamed to `in_sample`
45
+ https://github.com/fluent/fluentd/pull/3065
46
+ * Allow regular expression in filter/match directive
47
+ https://github.com/fluent/fluentd/pull/3071
48
+ * Refactoring code
49
+ https://github.com/fluent/fluentd/pull/3051
50
+
51
+ ### Bug fix
52
+
53
+ * buffer: Fix log message for `chunk_limit_records` case
54
+ https://github.com/fluent/fluentd/pull/3079
55
+ * buffer: Fix timekey optimization for non-windows platform
56
+ https://github.com/fluent/fluentd/pull/3092
57
+ * cert: Raise an error for broken certificate file
58
+ https://github.com/fluent/fluentd/pull/3086
59
+ * cert: Set TLS ciphers list correcty on older OpenSSL
60
+ https://github.com/fluent/fluentd/pull/3093
61
+
62
+ ## Release v1.11.1 - 2020/06/22
63
+
64
+ ### Enhancement
65
+
66
+ * in_http: Add `dump_error_log` parameter
67
+ https://github.com/fluent/fluentd/pull/3035
68
+ * in_http: Improve time field handling
69
+ https://github.com/fluent/fluentd/pull/3046
70
+ * Refactoring code
71
+ https://github.com/fluent/fluentd/pull/3047
72
+
73
+ ### Bug fix
74
+
75
+ * in_tail: Use actual path instead of based pattern for ignore list
76
+ https://github.com/fluent/fluentd/pull/3042
77
+ * child_process helper: Fix child process failure due to SIGPIPE if the command uses stdout
78
+ https://github.com/fluent/fluentd/pull/3044
79
+
80
+ ## Release v1.11.0 - 2020/06/04
81
+
82
+ ### New feature
83
+
84
+ * in_unix: Use v1 API
85
+ https://github.com/fluent/fluentd/pull/2992
86
+
87
+ ### Enhancement
88
+
89
+ * parser_syslog: Support any `time_format` for RFC3164 string parser
90
+ https://github.com/fluent/fluentd/pull/3014
91
+ * parser_syslog: Add new parser for RFC5424
92
+ https://github.com/fluent/fluentd/pull/3015
93
+ * Refactoring code
94
+ https://github.com/fluent/fluentd/pull/3019
95
+
96
+ ### Bug fix
97
+
98
+ * in_gc_stat: Add `use_symbol_keys` parameter to emit string key record
99
+ https://github.com/fluent/fluentd/pull/3008
100
+
1
101
  # v1.10
2
102
 
3
103
  ## Release v1.10.4 - 2020/05/12
@@ -1,12 +1,12 @@
1
1
  <source>
2
- @type dummy
2
+ @type sample
3
3
  @label @test
4
4
  tag test.copy
5
5
  auto_increment_key id
6
6
  </source>
7
7
 
8
8
  <source>
9
- @type dummy
9
+ @type sample
10
10
  @label @test
11
11
  tag test.rr
12
12
  auto_increment_key id
@@ -36,4 +36,4 @@
36
36
  output_type ltsv
37
37
  </store>
38
38
  </match>
39
- </label>
39
+ </label>
@@ -8,7 +8,7 @@
8
8
  </system>
9
9
 
10
10
  <source>
11
- @type dummy
11
+ @type sample
12
12
  tag "test.data"
13
13
  auto_increment_key number
14
14
  </source>
@@ -1,6 +1,6 @@
1
1
  <source>
2
- @type dummy
3
- tag dummy
2
+ @type sample
3
+ tag sample
4
4
  </source>
5
5
 
6
6
  <filter **>
@@ -1,11 +1,11 @@
1
1
  <source>
2
- @type dummy
3
- tag dummy
2
+ @type sample
3
+ tag sample
4
4
  rate 100
5
- dummy {"message":"yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay"}
5
+ sample {"message":"yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay"}
6
6
  </source>
7
7
 
8
- <match dummy>
8
+ <match sample>
9
9
  @type null
10
10
  never_flush true
11
11
  <buffer>
@@ -1,16 +1,16 @@
1
1
  <source>
2
- @type dummy
2
+ @type sample
3
3
  @label @main
4
4
  tag "test.data"
5
5
  size 2
6
6
  rate 10
7
- dummy {"message":"yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay"}
7
+ sample {"message":"yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay"}
8
8
  auto_increment_key number
9
9
  </source>
10
10
 
11
11
  <label @main>
12
12
  <match test.data>
13
- @type buffered_stdout
13
+ @type stdout
14
14
  <buffer>
15
15
  @type file
16
16
  path "#{Dir.pwd}/compressed_buffers"
@@ -1,10 +1,10 @@
1
1
  <source>
2
- @type dummy
3
- @label @dummylog
2
+ @type sample
3
+ @label @samplelog
4
4
  tag "data"
5
- dummy {"message":"yay"}
5
+ sample {"message":"yay"}
6
6
  </source>
7
- <label @dummylog>
7
+ <label @samplelog>
8
8
  <match **>
9
9
  @type stdout
10
10
  </match>
@@ -22,4 +22,4 @@
22
22
  # hostname_key "host"
23
23
  # </inject>
24
24
  # </match>
25
- </label>
25
+ </label>
@@ -1,7 +1,7 @@
1
1
  # This example is to measure optimized filter pipeline performance.
2
2
 
3
3
  <source>
4
- @type dummy
4
+ @type sample
5
5
  tag test
6
6
  size 1000
7
7
  </source>
@@ -1,10 +1,10 @@
1
1
  <source>
2
- @type dummy
2
+ @type sample
3
3
  @label @exec
4
4
  tag exec_input
5
5
  rate 10
6
6
  auto_increment_key num
7
- dummy {"data":"mydata"}
7
+ sample {"data":"mydata"}
8
8
  </source>
9
9
 
10
10
  <label @exec>
@@ -1,5 +1,5 @@
1
1
  <source>
2
- @type dummy
2
+ @type sample
3
3
  tag test
4
4
  </source>
5
5
 
@@ -1,5 +1,5 @@
1
1
  <source>
2
- @type dummy
2
+ @type sample
3
3
  tag test
4
4
  </source>
5
5
 
@@ -1,21 +1,21 @@
1
1
  <source>
2
- @type dummy
2
+ @type sample
3
3
  tag test
4
4
  </source>
5
5
  <source>
6
- @type dummy
6
+ @type sample
7
7
  tag test2
8
8
  </source>
9
9
  <source>
10
- @type dummy
10
+ @type sample
11
11
  tag test3
12
12
  </source>
13
13
  <source>
14
- @type dummy
14
+ @type sample
15
15
  tag test4
16
16
  </source>
17
17
  <source>
18
- @type dummy
18
+ @type sample
19
19
  tag test5
20
20
  </source>
21
21
 
@@ -1,5 +1,5 @@
1
1
  <source>
2
- @type dummy
2
+ @type sample
3
3
  tag test
4
4
  </source>
5
5
 
@@ -1,5 +1,5 @@
1
1
  <source>
2
- @type dummy
2
+ @type sample
3
3
  tag test
4
4
  </source>
5
5
 
@@ -1,9 +1,9 @@
1
1
  <source>
2
- @type dummy
2
+ @type sample
3
3
  tag test
4
4
  </source>
5
5
  <source>
6
- @type dummy
6
+ @type sample
7
7
  tag test2
8
8
  </source>
9
9
 
@@ -1,5 +1,5 @@
1
1
  <source>
2
- @type dummy
2
+ @type sample
3
3
  tag test
4
4
  </source>
5
5
 
@@ -1,13 +1,13 @@
1
1
  <source>
2
- @type dummy
2
+ @type sample
3
3
  tag test
4
4
  </source>
5
5
  <source>
6
- @type dummy
6
+ @type sample
7
7
  tag test2
8
8
  </source>
9
9
  <source>
10
- @type dummy
10
+ @type sample
11
11
  tag test3
12
12
  </source>
13
13
 
@@ -2,17 +2,17 @@
2
2
  # bundle exec bin/fluentd -c example/out_buffered_null.conf
3
3
  # (+ --emit-error-log-interval 10)
4
4
  <source>
5
- @type dummy
6
- tag dummy
5
+ @type sample
6
+ tag sample
7
7
  rate 500000000
8
- dummy [
8
+ sample [
9
9
  {"message": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},
10
10
  {"message": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"},
11
11
  {"message": "ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"}
12
12
  ]
13
13
  </source>
14
14
 
15
- <match dummy.**>
15
+ <match sample.**>
16
16
  @type null
17
17
  <buffer>
18
18
  flush_interval 60s
@@ -3,7 +3,7 @@
3
3
  </system>
4
4
 
5
5
  <source>
6
- @type dummy
6
+ @type sample
7
7
  tag test
8
8
  </source>
9
9
 
@@ -32,11 +32,11 @@ Gem::Specification.new do |gem|
32
32
  fake_platform = ENV['GEM_BUILD_FAKE_PLATFORM'].to_s
33
33
  gem.platform = fake_platform unless fake_platform.empty?
34
34
  if /mswin|mingw/ =~ fake_platform || (/mswin|mingw/ =~ RUBY_PLATFORM && fake_platform.empty?)
35
- gem.add_runtime_dependency("win32-service", ["~> 0.8.3"])
36
- gem.add_runtime_dependency("win32-ipc", ["~> 0.6.1"])
37
- gem.add_runtime_dependency("win32-event", ["~> 0.6.1"])
38
- gem.add_runtime_dependency("windows-pr", ["~> 1.2.5"])
39
- gem.add_runtime_dependency("certstore_c", ["~> 0.1.2"])
35
+ gem.add_runtime_dependency("win32-service", ["~> 2.1.5"])
36
+ gem.add_runtime_dependency("win32-ipc", ["~> 0.7.0"])
37
+ gem.add_runtime_dependency("win32-event", ["~> 0.6.3"])
38
+ gem.add_runtime_dependency("windows-pr", ["~> 1.2.6"])
39
+ gem.add_runtime_dependency("certstore_c", ["~> 0.1.7"])
40
40
  end
41
41
 
42
42
  gem.add_development_dependency("rake", ["~> 13.0"])
@@ -185,6 +185,10 @@ if Fluent.windows?
185
185
  opts[:regwinsvcautostart] = s
186
186
  }
187
187
 
188
+ op.on('--[no-]reg-winsvc-delay-start', "Automatically start the Windows Service at boot with delay. (only effective with '--reg-winsvc i' and '--reg-winsvc-auto-start') (Windows only)") {|s|
189
+ opts[:regwinsvcdelaystart] = s
190
+ }
191
+
188
192
  op.on('--reg-winsvc-fluentdopt OPTION', "specify fluentd option parameters for Windows Service. (Windows only)") {|s|
189
193
  opts[:fluentdopt] = s
190
194
  }
@@ -285,6 +289,13 @@ if winsvcinstmode = opts[:regwinsvc]
285
289
  dependencies: [""],
286
290
  display_name: opts[:winsvc_display_name]
287
291
  )
292
+
293
+ if opts[:regwinsvcdelaystart]
294
+ Service.configure(
295
+ service_name: opts[:winsvc_name],
296
+ delayed_start: true
297
+ )
298
+ end
288
299
  when 'u'
289
300
  if Service.status(opts[:winsvc_name]).current_state != 'stopped'
290
301
  begin
@@ -113,6 +113,7 @@ module Fluent
113
113
 
114
114
  @suppress_repeated_stacktrace = opts[:suppress_repeated_stacktrace]
115
115
  @ignore_repeated_log_interval = opts[:ignore_repeated_log_interval]
116
+ @ignore_same_log_interval = opts[:ignore_same_log_interval]
116
117
 
117
118
  @process_type = opts[:process_type] # :supervisor, :worker0, :workers Or :standalone
118
119
  @process_type ||= :standalone # to keep behavior of existing code
@@ -141,7 +142,8 @@ module Fluent
141
142
  dl_opts[:log_level] = @level - 1
142
143
  logger = ServerEngine::DaemonLogger.new(@out, dl_opts)
143
144
  clone = self.class.new(logger, suppress_repeated_stacktrace: @suppress_repeated_stacktrace, process_type: @process_type,
144
- worker_id: @worker_id, ignore_repeated_log_interval: @ignore_repeated_log_interval)
145
+ worker_id: @worker_id, ignore_repeated_log_interval: @ignore_repeated_log_interval,
146
+ ignore_same_log_interval: @ignore_same_log_interval)
145
147
  clone.format = @format
146
148
  clone.time_format = @time_format
147
149
  clone.log_event_enabled = @log_event_enabled
@@ -151,7 +153,7 @@ module Fluent
151
153
 
152
154
  attr_reader :format
153
155
  attr_reader :time_format
154
- attr_accessor :log_event_enabled, :ignore_repeated_log_interval
156
+ attr_accessor :log_event_enabled, :ignore_repeated_log_interval, :ignore_same_log_interval
155
157
  attr_accessor :out
156
158
  attr_accessor :level
157
159
  attr_accessor :optional_header, :optional_attrs
@@ -428,6 +430,27 @@ module Fluent
428
430
  (cached_log.msg == message) && (time - cached_log.time <= @ignore_repeated_log_interval)
429
431
  end
430
432
 
433
+ def ignore_same_log?(time, message)
434
+ cached_log = Thread.current[:last_same_log]
435
+ if cached_log.nil?
436
+ Thread.current[:last_same_log] = {message => time}
437
+ return false
438
+ end
439
+
440
+ prev_time = cached_log[message]
441
+ if prev_time
442
+ if (time - prev_time) <= @ignore_same_log_interval
443
+ true
444
+ else
445
+ cached_log[message] = time
446
+ false
447
+ end
448
+ else
449
+ cached_log[message] = time
450
+ false
451
+ end
452
+ end
453
+
431
454
  def suppress_stacktrace?(backtrace)
432
455
  cached_log = Thread.current[:last_repeated_stacktrace]
433
456
  return false if cached_log.nil?
@@ -507,7 +530,11 @@ module Fluent
507
530
  end
508
531
  }
509
532
 
510
- if @ignore_repeated_log_interval
533
+ if @ignore_same_log_interval
534
+ if ignore_same_log?(time, message)
535
+ return nil, nil
536
+ end
537
+ elsif @ignore_repeated_log_interval
511
538
  if ignore_repeated_log?(:last_repeated_log, time, message)
512
539
  return nil, nil
513
540
  else
@@ -569,6 +596,9 @@ module Fluent
569
596
  if logger.instance_variable_defined?(:@ignore_repeated_log_interval)
570
597
  @ignore_repeated_log_interval = logger.instance_variable_get(:@ignore_repeated_log_interval)
571
598
  end
599
+ if logger.instance_variable_defined?(:@ignore_same_log_interval)
600
+ @ignore_same_log_interval = logger.instance_variable_get(:@ignore_same_log_interval)
601
+ end
572
602
 
573
603
  self.format = @logger.format
574
604
  self.time_format = @logger.time_format