fluentd 1.17.1-x64-mingw-ucrt → 1.18.0-x64-mingw-ucrt
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 +58 -4
- data/lib/fluent/command/fluentd.rb +7 -1
- data/lib/fluent/config/literal_parser.rb +9 -2
- 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/plugin/filter_parser.rb +27 -51
- data/lib/fluent/plugin/in_http.rb +5 -0
- data/lib/fluent/plugin/in_syslog.rb +4 -0
- 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/output.rb +2 -0
- 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 +23 -7
- 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
- metadata +7 -19
data/lib/fluent/supervisor.rb
CHANGED
@@ -43,11 +43,16 @@ module Fluent
|
|
43
43
|
@rpc_endpoint = nil
|
44
44
|
@rpc_server = nil
|
45
45
|
@counter = nil
|
46
|
+
@socket_manager_server = nil
|
47
|
+
@starting_new_supervisor_with_zero_downtime = false
|
48
|
+
@new_supervisor_pid = nil
|
49
|
+
start_in_parallel = ENV.key?("FLUENT_RUNNING_IN_PARALLEL_WITH_OLD")
|
50
|
+
@zero_downtime_restart_mutex = Mutex.new
|
46
51
|
|
47
52
|
@fluentd_lock_dir = Dir.mktmpdir("fluentd-lock-")
|
48
53
|
ENV['FLUENTD_LOCK_DIR'] = @fluentd_lock_dir
|
49
54
|
|
50
|
-
if config[:rpc_endpoint]
|
55
|
+
if config[:rpc_endpoint] and not start_in_parallel
|
51
56
|
@rpc_endpoint = config[:rpc_endpoint]
|
52
57
|
@enable_get_dump = config[:enable_get_dump]
|
53
58
|
run_rpc_server
|
@@ -59,16 +64,27 @@ module Fluent
|
|
59
64
|
install_supervisor_signal_handlers
|
60
65
|
end
|
61
66
|
|
62
|
-
if counter = config[:counter_server]
|
67
|
+
if counter = config[:counter_server] and not start_in_parallel
|
63
68
|
run_counter_server(counter)
|
64
69
|
end
|
65
70
|
|
66
71
|
if config[:disable_shared_socket]
|
67
72
|
$log.info "shared socket for multiple workers is disabled"
|
73
|
+
elsif start_in_parallel
|
74
|
+
begin
|
75
|
+
raise "[BUG] SERVERENGINE_SOCKETMANAGER_PATH env var must exist when starting in parallel" unless ENV.key?('SERVERENGINE_SOCKETMANAGER_PATH')
|
76
|
+
@socket_manager_server = ServerEngine::SocketManager::Server.share_sockets_with_another_server(ENV['SERVERENGINE_SOCKETMANAGER_PATH'])
|
77
|
+
$log.info "zero-downtime-restart: took over the shared sockets", path: ENV['SERVERENGINE_SOCKETMANAGER_PATH']
|
78
|
+
rescue => e
|
79
|
+
$log.error "zero-downtime-restart: cancel sequence because failed to take over the shared sockets", error: e
|
80
|
+
raise
|
81
|
+
end
|
68
82
|
else
|
69
|
-
|
70
|
-
ENV['SERVERENGINE_SOCKETMANAGER_PATH'] =
|
83
|
+
@socket_manager_server = ServerEngine::SocketManager::Server.open
|
84
|
+
ENV['SERVERENGINE_SOCKETMANAGER_PATH'] = @socket_manager_server.path.to_s
|
71
85
|
end
|
86
|
+
|
87
|
+
stop_parallel_old_supervisor_after_delay if start_in_parallel
|
72
88
|
end
|
73
89
|
|
74
90
|
def after_run
|
@@ -76,7 +92,9 @@ module Fluent
|
|
76
92
|
stop_rpc_server if @rpc_endpoint
|
77
93
|
stop_counter_server if @counter
|
78
94
|
cleanup_lock_dir
|
79
|
-
Fluent::Supervisor.
|
95
|
+
Fluent::Supervisor.cleanup_socketmanager_path unless @starting_new_supervisor_with_zero_downtime
|
96
|
+
ensure
|
97
|
+
notify_new_supervisor_that_old_one_has_stopped if @starting_new_supervisor_with_zero_downtime
|
80
98
|
end
|
81
99
|
|
82
100
|
def cleanup_lock_dir
|
@@ -109,6 +127,13 @@ module Fluent
|
|
109
127
|
end
|
110
128
|
nil
|
111
129
|
}
|
130
|
+
unless Fluent.windows?
|
131
|
+
@rpc_server.mount_proc('/api/processes.zeroDowntimeRestart') { |req, res|
|
132
|
+
$log.debug "fluentd RPC got /api/processes.zeroDowntimeRestart request"
|
133
|
+
Process.kill :USR2, Process.pid
|
134
|
+
nil
|
135
|
+
}
|
136
|
+
end
|
112
137
|
@rpc_server.mount_proc('/api/plugins.flushBuffers') { |req, res|
|
113
138
|
$log.debug "fluentd RPC got /api/plugins.flushBuffers request"
|
114
139
|
if Fluent.windows?
|
@@ -137,27 +162,24 @@ module Fluent
|
|
137
162
|
|
138
163
|
@rpc_server.mount_proc('/api/config.gracefulReload') { |req, res|
|
139
164
|
$log.debug "fluentd RPC got /api/config.gracefulReload request"
|
140
|
-
|
141
|
-
supervisor_sigusr2_handler
|
142
|
-
else
|
143
|
-
Process.kill :USR2, Process.pid
|
144
|
-
end
|
145
|
-
|
165
|
+
graceful_reload
|
146
166
|
nil
|
147
167
|
}
|
148
168
|
|
149
|
-
@
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
169
|
+
if @enable_get_dump
|
170
|
+
@rpc_server.mount_proc('/api/config.getDump') { |req, res|
|
171
|
+
$log.debug "fluentd RPC got /api/config.getDump request"
|
172
|
+
$log.info "get dump in-memory config via HTTP"
|
173
|
+
res.body = supervisor_get_dump_config_handler
|
174
|
+
[nil, nil, res]
|
175
|
+
}
|
176
|
+
end
|
155
177
|
|
156
178
|
@rpc_server.start
|
157
179
|
end
|
158
180
|
|
159
181
|
def stop_rpc_server
|
160
|
-
@rpc_server
|
182
|
+
@rpc_server&.shutdown
|
161
183
|
end
|
162
184
|
|
163
185
|
def run_counter_server(counter_conf)
|
@@ -172,6 +194,44 @@ module Fluent
|
|
172
194
|
@counter.stop
|
173
195
|
end
|
174
196
|
|
197
|
+
def stop_parallel_old_supervisor_after_delay
|
198
|
+
Thread.new do
|
199
|
+
# Delay to wait the new workers to start up.
|
200
|
+
# Even if it takes a long time to start the new workers and stop the old Fluentd first,
|
201
|
+
# it is no problem because the socket buffer works, as long as the capacity is not exceeded.
|
202
|
+
sleep 10
|
203
|
+
old_pid = ENV["FLUENT_RUNNING_IN_PARALLEL_WITH_OLD"]&.to_i
|
204
|
+
if old_pid
|
205
|
+
$log.info "zero-downtime-restart: stop the old supervisor"
|
206
|
+
Process.kill :TERM, old_pid
|
207
|
+
end
|
208
|
+
rescue => e
|
209
|
+
$log.warn "zero-downtime-restart: failed to stop the old supervisor." +
|
210
|
+
" If the old one does not exist, please send SIGWINCH to this new process to start to work fully." +
|
211
|
+
" If it exists, something went wrong. Please kill the old one manually.",
|
212
|
+
error: e
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
def notify_new_supervisor_that_old_one_has_stopped
|
217
|
+
if config[:pid_path]
|
218
|
+
new_pid = File.read(config[:pid_path]).to_i
|
219
|
+
else
|
220
|
+
raise "[BUG] new_supervisor_pid is not saved" unless @new_supervisor_pid
|
221
|
+
new_pid = @new_supervisor_pid
|
222
|
+
end
|
223
|
+
|
224
|
+
$log.info "zero-downtime-restart: notify the new supervisor (pid: #{new_pid}) that old one has stopped"
|
225
|
+
Process.kill :WINCH, new_pid
|
226
|
+
rescue => e
|
227
|
+
$log.error(
|
228
|
+
"zero-downtime-restart: failed to notify the new supervisor." +
|
229
|
+
" Please send SIGWINCH to the new supervisor process manually" +
|
230
|
+
" if it does not start to work fully.",
|
231
|
+
error: e
|
232
|
+
)
|
233
|
+
end
|
234
|
+
|
175
235
|
def install_supervisor_signal_handlers
|
176
236
|
return if Fluent.windows?
|
177
237
|
|
@@ -187,7 +247,16 @@ module Fluent
|
|
187
247
|
|
188
248
|
trap :USR2 do
|
189
249
|
$log.debug 'fluentd supervisor process got SIGUSR2'
|
190
|
-
|
250
|
+
if Fluent.windows?
|
251
|
+
graceful_reload
|
252
|
+
else
|
253
|
+
zero_downtime_restart
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
trap :WINCH do
|
258
|
+
$log.debug 'fluentd supervisor process got SIGWINCH'
|
259
|
+
cancel_source_only
|
191
260
|
end
|
192
261
|
end
|
193
262
|
|
@@ -254,7 +323,7 @@ module Fluent
|
|
254
323
|
when :usr1
|
255
324
|
supervisor_sigusr1_handler
|
256
325
|
when :usr2
|
257
|
-
|
326
|
+
graceful_reload
|
258
327
|
when :cont
|
259
328
|
supervisor_dump_handler_for_windows
|
260
329
|
when :stop_event_thread
|
@@ -284,7 +353,7 @@ module Fluent
|
|
284
353
|
send_signal_to_workers(:USR1)
|
285
354
|
end
|
286
355
|
|
287
|
-
def
|
356
|
+
def graceful_reload
|
288
357
|
conf = nil
|
289
358
|
t = Thread.new do
|
290
359
|
$log.info 'Reloading new config'
|
@@ -312,6 +381,79 @@ module Fluent
|
|
312
381
|
$log.error "Failed to reload config file: #{e}"
|
313
382
|
end
|
314
383
|
|
384
|
+
def zero_downtime_restart
|
385
|
+
Thread.new do
|
386
|
+
@zero_downtime_restart_mutex.synchronize do
|
387
|
+
$log.info "start zero-downtime-restart sequence"
|
388
|
+
|
389
|
+
if @starting_new_supervisor_with_zero_downtime
|
390
|
+
$log.warn "zero-downtime-restart: canceled because it is already starting"
|
391
|
+
Thread.exit
|
392
|
+
end
|
393
|
+
if ENV.key?("FLUENT_RUNNING_IN_PARALLEL_WITH_OLD")
|
394
|
+
$log.warn "zero-downtime-restart: canceled because the previous sequence is still running"
|
395
|
+
Thread.exit
|
396
|
+
end
|
397
|
+
|
398
|
+
@starting_new_supervisor_with_zero_downtime = true
|
399
|
+
commands = [ServerEngine.ruby_bin_path, $0] + ARGV
|
400
|
+
env_to_add = {
|
401
|
+
"SERVERENGINE_SOCKETMANAGER_INTERNAL_TOKEN" => ServerEngine::SocketManager::INTERNAL_TOKEN,
|
402
|
+
"FLUENT_RUNNING_IN_PARALLEL_WITH_OLD" => "#{Process.pid}",
|
403
|
+
}
|
404
|
+
pid = Process.spawn(env_to_add, commands.join(" "))
|
405
|
+
@new_supervisor_pid = pid unless config[:daemonize]
|
406
|
+
|
407
|
+
if config[:daemonize]
|
408
|
+
Thread.new(pid) do |pid|
|
409
|
+
_, status = Process.wait2(pid)
|
410
|
+
# check if `ServerEngine::Daemon#daemonize_with_double_fork` succeeded or not
|
411
|
+
unless status.success?
|
412
|
+
@starting_new_supervisor_with_zero_downtime = false
|
413
|
+
$log.error "zero-downtime-restart: failed because new supervisor exits unexpectedly"
|
414
|
+
end
|
415
|
+
end
|
416
|
+
else
|
417
|
+
Thread.new(pid) do |pid|
|
418
|
+
_, status = Process.wait2(pid)
|
419
|
+
@starting_new_supervisor_with_zero_downtime = false
|
420
|
+
$log.error "zero-downtime-restart: failed because new supervisor exits unexpectedly", status: status
|
421
|
+
end
|
422
|
+
end
|
423
|
+
end
|
424
|
+
rescue => e
|
425
|
+
$log.error "zero-downtime-restart: failed", error: e
|
426
|
+
@starting_new_supervisor_with_zero_downtime = false
|
427
|
+
end
|
428
|
+
end
|
429
|
+
|
430
|
+
def cancel_source_only
|
431
|
+
if ENV.key?("FLUENT_RUNNING_IN_PARALLEL_WITH_OLD")
|
432
|
+
if config[:rpc_endpoint]
|
433
|
+
begin
|
434
|
+
@rpc_endpoint = config[:rpc_endpoint]
|
435
|
+
@enable_get_dump = config[:enable_get_dump]
|
436
|
+
run_rpc_server
|
437
|
+
rescue => e
|
438
|
+
$log.error "failed to start RPC server", error: e
|
439
|
+
end
|
440
|
+
end
|
441
|
+
|
442
|
+
if counter = config[:counter_server]
|
443
|
+
begin
|
444
|
+
run_counter_server(counter)
|
445
|
+
rescue => e
|
446
|
+
$log.error "failed to start counter server", error: e
|
447
|
+
end
|
448
|
+
end
|
449
|
+
|
450
|
+
$log.info "zero-downtime-restart: done all sequences, now new processes start to work fully"
|
451
|
+
ENV.delete("FLUENT_RUNNING_IN_PARALLEL_WITH_OLD")
|
452
|
+
end
|
453
|
+
|
454
|
+
send_signal_to_workers(:WINCH)
|
455
|
+
end
|
456
|
+
|
315
457
|
def supervisor_dump_handler_for_windows
|
316
458
|
# As for UNIX-like, SIGCONT signal to each process makes the process output its dump-file,
|
317
459
|
# and it is implemented before the implementation of the function for Windows.
|
@@ -409,6 +551,7 @@ module Fluent
|
|
409
551
|
main_cmd = config[:main_cmd]
|
410
552
|
env = {
|
411
553
|
'SERVERENGINE_WORKER_ID' => @worker_id.to_i.to_s,
|
554
|
+
'FLUENT_INSTANCE_ID' => Fluent::INSTANCE_ID,
|
412
555
|
}
|
413
556
|
@pm = process_manager.spawn(env, *main_cmd)
|
414
557
|
end
|
@@ -440,7 +583,7 @@ module Fluent
|
|
440
583
|
stop_immediately_at_unrecoverable_exit: true,
|
441
584
|
root_dir: params['root_dir'],
|
442
585
|
logger: $log,
|
443
|
-
log: $log
|
586
|
+
log: $log&.out,
|
444
587
|
log_level: params['log_level'],
|
445
588
|
chuser: params['chuser'],
|
446
589
|
chgroup: params['chgroup'],
|
@@ -486,6 +629,7 @@ module Fluent
|
|
486
629
|
suppress_repeated_stacktrace: true,
|
487
630
|
ignore_repeated_log_interval: nil,
|
488
631
|
without_source: nil,
|
632
|
+
with_source_only: nil,
|
489
633
|
enable_input_metrics: nil,
|
490
634
|
enable_size_metrics: nil,
|
491
635
|
use_v1_config: true,
|
@@ -499,12 +643,11 @@ module Fluent
|
|
499
643
|
}
|
500
644
|
end
|
501
645
|
|
502
|
-
def self.
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
end
|
646
|
+
def self.cleanup_socketmanager_path
|
647
|
+
return if Fluent.windows?
|
648
|
+
return unless ENV.key?('SERVERENGINE_SOCKETMANAGER_PATH')
|
649
|
+
|
650
|
+
FileUtils.rm_f(ENV['SERVERENGINE_SOCKETMANAGER_PATH'])
|
508
651
|
end
|
509
652
|
|
510
653
|
def initialize(cl_opt)
|
@@ -518,7 +661,6 @@ module Fluent
|
|
518
661
|
@inline_config = opt[:inline_config]
|
519
662
|
@use_v1_config = opt[:use_v1_config]
|
520
663
|
@conf_encoding = opt[:conf_encoding]
|
521
|
-
@log_path = opt[:log_path]
|
522
664
|
@show_plugin_config = opt[:show_plugin_config]
|
523
665
|
@libs = opt[:libs]
|
524
666
|
@plugin_dirs = opt[:plugin_dirs]
|
@@ -527,13 +669,15 @@ module Fluent
|
|
527
669
|
@chumask = opt[:chumask]
|
528
670
|
@signame = opt[:signame]
|
529
671
|
|
530
|
-
# TODO: `@log_rotate_age` and `@log_rotate_size` should be removed
|
672
|
+
# TODO: `@log_path`, `@log_rotate_age` and `@log_rotate_size` should be removed
|
531
673
|
# since it should be merged with SystemConfig in `build_system_config()`.
|
532
|
-
# We should always use `system_config.log.
|
674
|
+
# We should always use `system_config.log.path`, `system_config.log.rotate_age`
|
675
|
+
# and `system_config.log.rotate_size`.
|
533
676
|
# However, currently, there is a bug that `system_config.log` parameters
|
534
677
|
# are not in `Fluent::SystemConfig::SYSTEM_CONFIG_PARAMETERS`, and these
|
535
678
|
# parameters are not merged in `build_system_config()`.
|
536
679
|
# Until we fix the bug of `Fluent::SystemConfig`, we need to use these instance variables.
|
680
|
+
@log_path = opt[:log_path]
|
537
681
|
@log_rotate_age = opt[:log_rotate_age]
|
538
682
|
@log_rotate_size = opt[:log_rotate_size]
|
539
683
|
|
@@ -549,6 +693,10 @@ module Fluent
|
|
549
693
|
raise Fluent::ConfigError, "invalid number of workers (must be > 0):#{@system_config.workers}"
|
550
694
|
end
|
551
695
|
|
696
|
+
if Fluent.windows? && @system_config.with_source_only
|
697
|
+
raise Fluent::ConfigError, "with-source-only is not supported on Windows"
|
698
|
+
end
|
699
|
+
|
552
700
|
root_dir = @system_config.root_dir
|
553
701
|
if root_dir
|
554
702
|
if File.exist?(root_dir)
|
@@ -567,7 +715,7 @@ module Fluent
|
|
567
715
|
begin
|
568
716
|
ServerEngine::Privilege.change(@chuser, @chgroup)
|
569
717
|
MessagePackFactory.init(enable_time_support: @system_config.enable_msgpack_time_support)
|
570
|
-
Fluent::Engine.init(@system_config, supervisor_mode: true)
|
718
|
+
Fluent::Engine.init(@system_config, supervisor_mode: true, start_in_parallel: ENV.key?("FLUENT_RUNNING_IN_PARALLEL_WITH_OLD"))
|
571
719
|
Fluent::Engine.run_configure(@conf, dry_run: dry_run)
|
572
720
|
rescue Fluent::ConfigError => e
|
573
721
|
$log.error 'config error', file: @config_path, error: e
|
@@ -600,6 +748,10 @@ module Fluent
|
|
600
748
|
raise Fluent::ConfigError, "invalid number of workers (must be 1 or unspecified) with --no-supervisor: #{@system_config.workers}"
|
601
749
|
end
|
602
750
|
|
751
|
+
if Fluent.windows? && @system_config.with_source_only
|
752
|
+
raise Fluent::ConfigError, "with-source-only is not supported on Windows"
|
753
|
+
end
|
754
|
+
|
603
755
|
install_main_process_signal_handlers
|
604
756
|
|
605
757
|
# This is the only log messsage for @standalone_worker
|
@@ -612,10 +764,10 @@ module Fluent
|
|
612
764
|
File.umask(@chumask.to_i(8))
|
613
765
|
end
|
614
766
|
MessagePackFactory.init(enable_time_support: @system_config.enable_msgpack_time_support)
|
615
|
-
Fluent::Engine.init(@system_config)
|
767
|
+
Fluent::Engine.init(@system_config, start_in_parallel: ENV.key?("FLUENT_RUNNING_IN_PARALLEL_WITH_OLD"))
|
616
768
|
Fluent::Engine.run_configure(@conf)
|
617
769
|
Fluent::Engine.run
|
618
|
-
self.class.
|
770
|
+
self.class.cleanup_socketmanager_path if @standalone_worker
|
619
771
|
exit 0
|
620
772
|
end
|
621
773
|
end
|
@@ -690,6 +842,7 @@ module Fluent
|
|
690
842
|
|
691
843
|
# TODO: we should remove this logic. This merging process should be done
|
692
844
|
# in `build_system_config()`.
|
845
|
+
@log_path ||= system_config.log.path
|
693
846
|
@log_rotate_age ||= system_config.log.rotate_age
|
694
847
|
@log_rotate_size ||= system_config.log.rotate_size
|
695
848
|
|
@@ -832,12 +985,20 @@ module Fluent
|
|
832
985
|
end
|
833
986
|
|
834
987
|
trap :USR2 do
|
988
|
+
# Leave the old GracefulReload feature, just in case.
|
989
|
+
# We can send SIGUSR2 to the worker process to use this old GracefulReload feature.
|
990
|
+
# (Note: Normally, we can send SIGUSR2 to the supervisor process to use
|
991
|
+
# zero-downtime-restart feature as GracefulReload on non-Windows.)
|
835
992
|
reload_config
|
836
993
|
end
|
837
994
|
|
838
995
|
trap :CONT do
|
839
996
|
dump_non_windows
|
840
997
|
end
|
998
|
+
|
999
|
+
trap :WINCH do
|
1000
|
+
cancel_source_only
|
1001
|
+
end
|
841
1002
|
end
|
842
1003
|
end
|
843
1004
|
|
@@ -891,6 +1052,18 @@ module Fluent
|
|
891
1052
|
end
|
892
1053
|
end
|
893
1054
|
|
1055
|
+
def cancel_source_only
|
1056
|
+
Thread.new do
|
1057
|
+
begin
|
1058
|
+
$log.debug "fluentd main process get SIGWINCH"
|
1059
|
+
$log.info "try to cancel with-source-only mode"
|
1060
|
+
Fluent::Engine.cancel_source_only!
|
1061
|
+
rescue Exception => e
|
1062
|
+
$log.warn "failed to cancel source only", error: e
|
1063
|
+
end
|
1064
|
+
end
|
1065
|
+
end
|
1066
|
+
|
894
1067
|
def reload_config
|
895
1068
|
Thread.new do
|
896
1069
|
$log.debug('worker got SIGUSR2')
|
data/lib/fluent/system_config.rb
CHANGED
@@ -25,10 +25,10 @@ module Fluent
|
|
25
25
|
:workers, :restart_worker_interval, :root_dir, :log_level,
|
26
26
|
:suppress_repeated_stacktrace, :emit_error_log_interval, :suppress_config_dump,
|
27
27
|
:log_event_verbose, :ignore_repeated_log_interval, :ignore_same_log_interval,
|
28
|
-
:without_source, :rpc_endpoint, :enable_get_dump, :process_name,
|
28
|
+
:without_source, :with_source_only, :rpc_endpoint, :enable_get_dump, :process_name,
|
29
29
|
:file_permission, :dir_permission, :counter_server, :counter_client,
|
30
30
|
:strict_config_value, :enable_msgpack_time_support, :disable_shared_socket,
|
31
|
-
:metrics, :enable_input_metrics, :enable_size_metrics, :enable_jit
|
31
|
+
:metrics, :enable_input_metrics, :enable_size_metrics, :enable_jit, :source_only_buffer
|
32
32
|
]
|
33
33
|
|
34
34
|
config_param :workers, :integer, default: 1
|
@@ -41,7 +41,8 @@ module Fluent
|
|
41
41
|
config_param :emit_error_log_interval, :time, default: nil
|
42
42
|
config_param :suppress_config_dump, :bool, default: nil
|
43
43
|
config_param :log_event_verbose, :bool, default: nil
|
44
|
-
config_param :without_source,
|
44
|
+
config_param :without_source, :bool, default: nil
|
45
|
+
config_param :with_source_only, :bool, default: nil
|
45
46
|
config_param :rpc_endpoint, :string, default: nil
|
46
47
|
config_param :enable_get_dump, :bool, default: nil
|
47
48
|
config_param :process_name, :string, default: nil
|
@@ -58,6 +59,7 @@ module Fluent
|
|
58
59
|
v.to_i(8)
|
59
60
|
end
|
60
61
|
config_section :log, required: false, init: true, multi: false do
|
62
|
+
config_param :path, :string, default: nil
|
61
63
|
config_param :format, :enum, list: [:text, :json], default: :text
|
62
64
|
config_param :time_format, :string, default: '%Y-%m-%d %H:%M:%S %z'
|
63
65
|
config_param :rotate_age, default: nil do |v|
|
@@ -103,6 +105,16 @@ module Fluent
|
|
103
105
|
config_param :labels, :hash, default: {}
|
104
106
|
end
|
105
107
|
|
108
|
+
config_section :source_only_buffer, init: true, multi: false do
|
109
|
+
config_param :flush_thread_count, :integer, default: 1
|
110
|
+
config_param :overflow_action, :enum, list: [:throw_exception, :block, :drop_oldest_chunk], default: :drop_oldest_chunk
|
111
|
+
config_param :path, :string, default: nil
|
112
|
+
config_param :flush_interval, :time, default: nil
|
113
|
+
config_param :chunk_limit_size, :size, default: nil
|
114
|
+
config_param :total_limit_size, :size, default: nil
|
115
|
+
config_param :compress, :enum, list: [:text, :gzip], default: nil
|
116
|
+
end
|
117
|
+
|
106
118
|
def self.create(conf, strict_config_value=false)
|
107
119
|
systems = conf.elements(name: 'system')
|
108
120
|
return SystemConfig.new if systems.empty?
|
data/lib/fluent/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluentd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.18.0
|
5
5
|
platform: x64-mingw-ucrt
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -444,20 +444,6 @@ dependencies:
|
|
444
444
|
- - "<"
|
445
445
|
- !ruby/object:Gem::Version
|
446
446
|
version: '4'
|
447
|
-
- !ruby/object:Gem::Dependency
|
448
|
-
name: async
|
449
|
-
requirement: !ruby/object:Gem::Requirement
|
450
|
-
requirements:
|
451
|
-
- - "~>"
|
452
|
-
- !ruby/object:Gem::Version
|
453
|
-
version: '1.23'
|
454
|
-
type: :development
|
455
|
-
prerelease: false
|
456
|
-
version_requirements: !ruby/object:Gem::Requirement
|
457
|
-
requirements:
|
458
|
-
- - "~>"
|
459
|
-
- !ruby/object:Gem::Version
|
460
|
-
version: '1.23'
|
461
447
|
- !ruby/object:Gem::Dependency
|
462
448
|
name: async-http
|
463
449
|
requirement: !ruby/object:Gem::Requirement
|
@@ -727,6 +713,7 @@ files:
|
|
727
713
|
- lib/fluent/plugin/metrics.rb
|
728
714
|
- lib/fluent/plugin/metrics_local.rb
|
729
715
|
- lib/fluent/plugin/multi_output.rb
|
716
|
+
- lib/fluent/plugin/out_buffer.rb
|
730
717
|
- lib/fluent/plugin/out_copy.rb
|
731
718
|
- lib/fluent/plugin/out_exec.rb
|
732
719
|
- lib/fluent/plugin/out_exec_filter.rb
|
@@ -808,6 +795,7 @@ files:
|
|
808
795
|
- lib/fluent/registry.rb
|
809
796
|
- lib/fluent/root_agent.rb
|
810
797
|
- lib/fluent/rpc.rb
|
798
|
+
- lib/fluent/source_only_buffer_agent.rb
|
811
799
|
- lib/fluent/static_config_analysis.rb
|
812
800
|
- lib/fluent/supervisor.rb
|
813
801
|
- lib/fluent/system_config.rb
|
@@ -866,7 +854,7 @@ homepage: https://www.fluentd.org/
|
|
866
854
|
licenses:
|
867
855
|
- Apache-2.0
|
868
856
|
metadata: {}
|
869
|
-
post_install_message:
|
857
|
+
post_install_message:
|
870
858
|
rdoc_options: []
|
871
859
|
require_paths:
|
872
860
|
- lib
|
@@ -882,7 +870,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
882
870
|
version: '0'
|
883
871
|
requirements: []
|
884
872
|
rubygems_version: 3.4.19
|
885
|
-
signing_key:
|
873
|
+
signing_key:
|
886
874
|
specification_version: 4
|
887
875
|
summary: Fluentd event collector
|
888
876
|
test_files: []
|