fluentd 1.19.4 → 1.20.1
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/AGENTS.md +46 -0
- data/CHANGELOG.md +83 -0
- data/GithubWorkflow.md +1 -1
- data/MAINTAINERS.md +2 -2
- data/README.md +3 -2
- data/Rakefile +2 -1
- data/SECURITY.md +26 -1
- data/lib/fluent/command/cat.rb +2 -2
- data/lib/fluent/compat/exec_util.rb +20 -5
- data/lib/fluent/config/literal_parser.rb +4 -3
- data/lib/fluent/config/yaml_parser/loader.rb +12 -1
- data/lib/fluent/config/yaml_parser/parser.rb +14 -13
- data/lib/fluent/event.rb +37 -0
- data/lib/fluent/load.rb +0 -1
- data/lib/fluent/log.rb +2 -2
- data/lib/fluent/plugin/buf_file.rb +2 -2
- data/lib/fluent/plugin/buf_file_single.rb +6 -2
- data/lib/fluent/plugin/buffer/file_chunk.rb +23 -10
- data/lib/fluent/plugin/buffer/file_single_chunk.rb +23 -10
- data/lib/fluent/plugin/buffer.rb +102 -36
- data/lib/fluent/plugin/formatter_out_file.rb +3 -4
- data/lib/fluent/plugin/in_exec.rb +6 -4
- data/lib/fluent/plugin/in_forward.rb +39 -29
- data/lib/fluent/plugin/in_object_space.rb +2 -2
- data/lib/fluent/plugin/in_syslog.rb +2 -2
- data/lib/fluent/plugin/in_tail/compatibility.rb +111 -0
- data/lib/fluent/plugin/in_tail/dir_watcher.rb +713 -0
- data/lib/fluent/plugin/in_tail/group_watch.rb +13 -13
- data/lib/fluent/plugin/in_tail/io_handler.rb +391 -0
- data/lib/fluent/plugin/in_tail/line_feeder.rb +230 -0
- data/lib/fluent/plugin/in_tail/stat_watcher.rb +52 -0
- data/lib/fluent/plugin/in_tail/tail_watcher.rb +276 -0
- data/lib/fluent/plugin/in_tail/worker_pool.rb +298 -0
- data/lib/fluent/plugin/in_tail.rb +324 -815
- data/lib/fluent/plugin/in_unix.rb +5 -3
- data/lib/fluent/plugin/out_exec_filter.rb +2 -2
- data/lib/fluent/plugin/out_file.rb +10 -4
- data/lib/fluent/plugin/out_forward.rb +8 -0
- data/lib/fluent/plugin/out_http.rb +0 -10
- data/lib/fluent/plugin/output.rb +49 -19
- data/lib/fluent/plugin/parser_csv.rb +7 -2
- data/lib/fluent/plugin/parser_json.rb +20 -12
- data/lib/fluent/plugin/parser_ltsv.rb +2 -4
- data/lib/fluent/plugin/parser_msgpack.rb +7 -6
- data/lib/fluent/plugin/parser_syslog.rb +52 -5
- data/lib/fluent/plugin/parser_tsv.rb +6 -1
- data/lib/fluent/plugin_helper/http_server/server.rb +29 -13
- data/lib/fluent/plugin_helper/http_server.rb +2 -1
- data/lib/fluent/root_agent.rb +1 -1
- data/lib/fluent/supervisor.rb +24 -5
- data/lib/fluent/system_config.rb +5 -2
- data/lib/fluent/time.rb +8 -7
- data/lib/fluent/version.rb +1 -1
- data/templates/new_gem/.gitignore +8 -0
- metadata +25 -16
data/lib/fluent/system_config.rb
CHANGED
|
@@ -30,7 +30,7 @@ module Fluent
|
|
|
30
30
|
:file_permission, :dir_permission, :counter_server, :counter_client,
|
|
31
31
|
:strict_config_value, :enable_msgpack_time_support, :disable_shared_socket,
|
|
32
32
|
:metrics, :enable_input_metrics, :enable_size_metrics, :enable_jit, :source_only_buffer,
|
|
33
|
-
:config_include_dir
|
|
33
|
+
:config_include_dir, :umask
|
|
34
34
|
]
|
|
35
35
|
|
|
36
36
|
config_param :workers, :integer, default: 1
|
|
@@ -53,7 +53,7 @@ module Fluent
|
|
|
53
53
|
config_param :disable_shared_socket, :bool, default: nil
|
|
54
54
|
config_param :enable_input_metrics, :bool, default: true
|
|
55
55
|
config_param :enable_size_metrics, :bool, default: nil
|
|
56
|
-
config_param :enable_jit, :bool, default:
|
|
56
|
+
config_param :enable_jit, :bool, default: true
|
|
57
57
|
config_param :file_permission, default: nil do |v|
|
|
58
58
|
v.to_i(8)
|
|
59
59
|
end
|
|
@@ -61,6 +61,9 @@ module Fluent
|
|
|
61
61
|
v.to_i(8)
|
|
62
62
|
end
|
|
63
63
|
config_param :config_include_dir, default: Fluent::DEFAULT_CONFIG_INCLUDE_DIR
|
|
64
|
+
# Kept as a string (like the `--umask` command line option) so that it flows
|
|
65
|
+
# through the existing chumask handling, which applies `to_i(8)` later.
|
|
66
|
+
config_param :umask, :string, default: nil
|
|
64
67
|
config_section :log, required: false, init: true, multi: false do
|
|
65
68
|
config_param :path, :string, default: nil
|
|
66
69
|
config_param :format, :enum, list: [:text, :json], default: :text
|
data/lib/fluent/time.rb
CHANGED
|
@@ -112,9 +112,8 @@ module Fluent
|
|
|
112
112
|
end
|
|
113
113
|
|
|
114
114
|
def self.now
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
Fluent::EventTime.new(now / 1_000_000_000, now % 1_000_000_000)
|
|
115
|
+
time = Time.now
|
|
116
|
+
Fluent::EventTime.new(time.to_i, time.nsec)
|
|
118
117
|
end
|
|
119
118
|
|
|
120
119
|
def self.parse(*args)
|
|
@@ -362,6 +361,8 @@ module Fluent
|
|
|
362
361
|
|
|
363
362
|
class TimeFormatter
|
|
364
363
|
def initialize(format = nil, localtime = true, timezone = nil)
|
|
364
|
+
# An empty cache slot is marked by a nil string, not by its key: 0 is a
|
|
365
|
+
# valid timestamp, so a key can never say whether the slot is filled.
|
|
365
366
|
@tc1 = 0
|
|
366
367
|
@tc1_str = nil
|
|
367
368
|
@tc2 = 0
|
|
@@ -389,9 +390,9 @@ module Fluent
|
|
|
389
390
|
end
|
|
390
391
|
|
|
391
392
|
def format_without_subsec(time)
|
|
392
|
-
if @tc1 == time
|
|
393
|
+
if @tc1_str && @tc1 == time
|
|
393
394
|
return @tc1_str
|
|
394
|
-
elsif @tc2 == time
|
|
395
|
+
elsif @tc2_str && @tc2 == time
|
|
395
396
|
return @tc2_str
|
|
396
397
|
else
|
|
397
398
|
str = format_nocache(time)
|
|
@@ -407,9 +408,9 @@ module Fluent
|
|
|
407
408
|
end
|
|
408
409
|
|
|
409
410
|
def format_with_subsec(time)
|
|
410
|
-
if Fluent::EventTime.eq?(@tc1, time)
|
|
411
|
+
if @tc1_str && Fluent::EventTime.eq?(@tc1, time)
|
|
411
412
|
return @tc1_str
|
|
412
|
-
elsif Fluent::EventTime.eq?(@tc2, time)
|
|
413
|
+
elsif @tc2_str && Fluent::EventTime.eq?(@tc2, time)
|
|
413
414
|
return @tc2_str
|
|
414
415
|
else
|
|
415
416
|
str = format_nocache(time)
|
data/lib/fluent/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluentd
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.20.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sadayuki Furuhashi
|
|
@@ -43,20 +43,6 @@ dependencies:
|
|
|
43
43
|
- - "<"
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
45
|
version: 2.0.0
|
|
46
|
-
- !ruby/object:Gem::Dependency
|
|
47
|
-
name: yajl-ruby
|
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
|
49
|
-
requirements:
|
|
50
|
-
- - "~>"
|
|
51
|
-
- !ruby/object:Gem::Version
|
|
52
|
-
version: '1.0'
|
|
53
|
-
type: :runtime
|
|
54
|
-
prerelease: false
|
|
55
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
56
|
-
requirements:
|
|
57
|
-
- - "~>"
|
|
58
|
-
- !ruby/object:Gem::Version
|
|
59
|
-
version: '1.0'
|
|
60
46
|
- !ruby/object:Gem::Dependency
|
|
61
47
|
name: cool.io
|
|
62
48
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -255,6 +241,20 @@ dependencies:
|
|
|
255
241
|
- - "~>"
|
|
256
242
|
- !ruby/object:Gem::Version
|
|
257
243
|
version: '0.86'
|
|
244
|
+
- !ruby/object:Gem::Dependency
|
|
245
|
+
name: json
|
|
246
|
+
requirement: !ruby/object:Gem::Requirement
|
|
247
|
+
requirements:
|
|
248
|
+
- - ">="
|
|
249
|
+
- !ruby/object:Gem::Version
|
|
250
|
+
version: '2.21'
|
|
251
|
+
type: :runtime
|
|
252
|
+
prerelease: false
|
|
253
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
254
|
+
requirements:
|
|
255
|
+
- - ">="
|
|
256
|
+
- !ruby/object:Gem::Version
|
|
257
|
+
version: '2.21'
|
|
258
258
|
- !ruby/object:Gem::Dependency
|
|
259
259
|
name: base64
|
|
260
260
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -533,6 +533,7 @@ extra_rdoc_files: []
|
|
|
533
533
|
files:
|
|
534
534
|
- ".rubocop.yml"
|
|
535
535
|
- ADOPTERS.md
|
|
536
|
+
- AGENTS.md
|
|
536
537
|
- AUTHORS
|
|
537
538
|
- CHANGELOG.md
|
|
538
539
|
- CONTRIBUTING.md
|
|
@@ -718,8 +719,15 @@ files:
|
|
|
718
719
|
- lib/fluent/plugin/in_sample.rb
|
|
719
720
|
- lib/fluent/plugin/in_syslog.rb
|
|
720
721
|
- lib/fluent/plugin/in_tail.rb
|
|
722
|
+
- lib/fluent/plugin/in_tail/compatibility.rb
|
|
723
|
+
- lib/fluent/plugin/in_tail/dir_watcher.rb
|
|
721
724
|
- lib/fluent/plugin/in_tail/group_watch.rb
|
|
725
|
+
- lib/fluent/plugin/in_tail/io_handler.rb
|
|
726
|
+
- lib/fluent/plugin/in_tail/line_feeder.rb
|
|
722
727
|
- lib/fluent/plugin/in_tail/position_file.rb
|
|
728
|
+
- lib/fluent/plugin/in_tail/stat_watcher.rb
|
|
729
|
+
- lib/fluent/plugin/in_tail/tail_watcher.rb
|
|
730
|
+
- lib/fluent/plugin/in_tail/worker_pool.rb
|
|
723
731
|
- lib/fluent/plugin/in_tcp.rb
|
|
724
732
|
- lib/fluent/plugin/in_udp.rb
|
|
725
733
|
- lib/fluent/plugin/in_unix.rb
|
|
@@ -840,6 +848,7 @@ files:
|
|
|
840
848
|
- lib/fluent/version.rb
|
|
841
849
|
- lib/fluent/win32api.rb
|
|
842
850
|
- lib/fluent/winsvc.rb
|
|
851
|
+
- templates/new_gem/.gitignore
|
|
843
852
|
- templates/new_gem/Gemfile
|
|
844
853
|
- templates/new_gem/README.md.erb
|
|
845
854
|
- templates/new_gem/Rakefile
|
|
@@ -876,7 +885,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
876
885
|
requirements:
|
|
877
886
|
- - ">="
|
|
878
887
|
- !ruby/object:Gem::Version
|
|
879
|
-
version: '3.
|
|
888
|
+
version: '3.3'
|
|
880
889
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
881
890
|
requirements:
|
|
882
891
|
- - ">="
|