fluentd 1.7.2-x86-mingw32 → 1.7.3-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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -4
- data/lib/fluent/plugin/in_syslog.rb +10 -6
- data/lib/fluent/plugin/out_forward/socket_cache.rb +3 -1
- data/lib/fluent/version.rb +1 -1
- data/test/plugin/out_forward/test_socket_cache.rb +11 -1
- data/test/plugin/test_buffer_file_chunk.rb +1 -1
- data/test/plugin/test_in_syslog.rb +9 -5
- data/test/plugin/test_output_as_buffered.rb +1 -1
- data/test/test_root_agent.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cca1b46a26c09dbfb07afe3e729dae288efcfd5a4faca6b72b03ee1e5ed29dbc
|
4
|
+
data.tar.gz: 9c820ddda8f2639a658f03b63aaeaac7ab61c95376fa10f7cea7aed2cc7414db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6002bd15c100997ae8ea88b0c38fc04c0878eb2e02f26ab883765a07b09dc306ffdb9394a38e04507ea8729a70d8c3624be91ce6f0b480b75d1f06f7459235f
|
7
|
+
data.tar.gz: 2bee4278a29cee543dfd0cdb285d790231d90fff13ac42fdf8e8af499eb7ab8ae972ffc16af5e9cac89423469e203568df570875b08945018f3bd635d53fa70d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# v1.7
|
2
2
|
|
3
|
+
## Release v1.7.3 - 2019/10/01
|
4
|
+
|
5
|
+
### Enhancement
|
6
|
+
|
7
|
+
* in_syslog: Replace priority_key with severity_key
|
8
|
+
https://github.com/fluent/fluentd/pull/2636
|
9
|
+
|
10
|
+
### Bug fixes
|
11
|
+
|
12
|
+
* out_forward: Fix nil error after purge obsoleted sockets in socket cache
|
13
|
+
https://github.com/fluent/fluentd/pull/2635
|
14
|
+
* fix typo in ChangeLog
|
15
|
+
https://github.com/fluent/fluentd/pull/2633
|
16
|
+
|
3
17
|
## Release v1.7.2 - 2019/09/19
|
4
18
|
|
5
19
|
### Enhancement
|
@@ -36,7 +50,7 @@
|
|
36
50
|
https://github.com/fluent/fluentd/pull/2598
|
37
51
|
* buf_file_single: fix duplicated path setting check
|
38
52
|
https://github.com/fluent/fluentd/pull/2600
|
39
|
-
* fix msgpack-ruby
|
53
|
+
* fix msgpack-ruby dependency to use recent feature
|
40
54
|
https://github.com/fluent/fluentd/pull/2606
|
41
55
|
|
42
56
|
|
@@ -640,7 +654,7 @@
|
|
640
654
|
|
641
655
|
## Release v1.0.0 - 2017/12/6
|
642
656
|
|
643
|
-
See [CNCF
|
657
|
+
See [CNCF announcement](https://www.cncf.io/blog/2017/12/06/fluentd-v1-0/) :)
|
644
658
|
|
645
659
|
### New features / Enhancements
|
646
660
|
|
@@ -910,7 +924,7 @@ See [CNCF announcment](https://www.cncf.io/blog/2017/12/06/fluentd-v1-0/) :)
|
|
910
924
|
https://github.com/fluent/fluentd/pull/1492
|
911
925
|
* parser: Allow escape sequence in Apache access log
|
912
926
|
https://github.com/fluent/fluentd/pull/1479
|
913
|
-
* config: Add actual value in the
|
927
|
+
* config: Add actual value in the placeholder error message
|
914
928
|
https://github.com/fluent/fluentd/pull/1497
|
915
929
|
* log: Add Fluent::Log#<< to support some SDKs
|
916
930
|
https://github.com/fluent/fluentd/pull/1478
|
@@ -1227,7 +1241,7 @@ See [CNCF announcment](https://www.cncf.io/blog/2017/12/06/fluentd-v1-0/) :)
|
|
1227
1241
|
https://github.com/fluent/fluentd/pull/1067
|
1228
1242
|
* filter_record_transformer: Fix to prevent overwriting reserved placeholder keys
|
1229
1243
|
https://github.com/fluent/fluentd/pull/1176
|
1230
|
-
* Migrate some
|
1244
|
+
* Migrate some built-in plugins into v0.14 API
|
1231
1245
|
https://github.com/fluent/fluentd/pull/1149
|
1232
1246
|
https://github.com/fluent/fluentd/pull/1151
|
1233
1247
|
* Update dependencies
|
@@ -56,7 +56,7 @@ module Fluent::Plugin
|
|
56
56
|
23 => 'local7'
|
57
57
|
}
|
58
58
|
|
59
|
-
|
59
|
+
SEVERITY_MAP = {
|
60
60
|
0 => 'emerg',
|
61
61
|
1 => 'alert',
|
62
62
|
2 => 'crit',
|
@@ -91,8 +91,8 @@ module Fluent::Plugin
|
|
91
91
|
config_param :resolve_hostname, :bool, default: nil
|
92
92
|
desc 'The field name of source address of sender.'
|
93
93
|
config_param :source_address_key, :string, default: nil
|
94
|
-
desc 'The field name of the
|
95
|
-
config_param :
|
94
|
+
desc 'The field name of the severity.'
|
95
|
+
config_param :severity_key, :string, default: nil, alias: :priority_key
|
96
96
|
desc 'The field name of the facility.'
|
97
97
|
config_param :facility_key, :string, default: nil
|
98
98
|
|
@@ -119,6 +119,10 @@ module Fluent::Plugin
|
|
119
119
|
|
120
120
|
super
|
121
121
|
|
122
|
+
if conf.has_key?('priority_key')
|
123
|
+
log.warn "priority_key is deprecated. Use severity_key instead"
|
124
|
+
end
|
125
|
+
|
122
126
|
@use_default = false
|
123
127
|
|
124
128
|
@parser = parser_create
|
@@ -233,14 +237,14 @@ module Fluent::Plugin
|
|
233
237
|
|
234
238
|
pri ||= record.delete('pri')
|
235
239
|
facility = FACILITY_MAP[pri >> 3]
|
236
|
-
|
240
|
+
severity = SEVERITY_MAP[pri & 0b111]
|
237
241
|
|
238
|
-
record[@
|
242
|
+
record[@severity_key] = severity if @severity_key
|
239
243
|
record[@facility_key] = facility if @facility_key
|
240
244
|
record[@source_address_key] = sock.remote_addr if @source_address_key
|
241
245
|
record[@source_hostname_key] = sock.remote_host if @source_hostname_key
|
242
246
|
|
243
|
-
tag = "#{@tag}.#{facility}.#{
|
247
|
+
tag = "#{@tag}.#{facility}.#{severity}"
|
244
248
|
emit(tag, time, record)
|
245
249
|
end
|
246
250
|
rescue => e
|
@@ -81,7 +81,9 @@ module Fluent::Plugin
|
|
81
81
|
end
|
82
82
|
end
|
83
83
|
end
|
84
|
-
|
84
|
+
|
85
|
+
# reuse same object (@available_sockets)
|
86
|
+
@available_sockets.reject! { |_, v| v.empty? }
|
85
87
|
|
86
88
|
sockets += @inactive_sockets
|
87
89
|
@inactive_sockets.clear
|
data/lib/fluent/version.rb
CHANGED
@@ -5,7 +5,7 @@ require 'timecop'
|
|
5
5
|
|
6
6
|
class SocketCacheTest < Test::Unit::TestCase
|
7
7
|
sub_test_case 'checkout_or' do
|
8
|
-
test 'when
|
8
|
+
test 'when given key does not exist' do
|
9
9
|
c = Fluent::Plugin::ForwardOutput::SocketCache.new(10, $log)
|
10
10
|
sock = mock!.open { 'socket' }.subject
|
11
11
|
assert_equal('socket', c.checkout_or('key') { sock.open })
|
@@ -38,6 +38,16 @@ class SocketCacheTest < Test::Unit::TestCase
|
|
38
38
|
sock = mock!.open { new_sock }.subject
|
39
39
|
assert_equal(new_sock, c.checkout_or('key') { sock.open })
|
40
40
|
end
|
41
|
+
|
42
|
+
test 'reuse same hash object after calling purge_obsolete_socks' do
|
43
|
+
c = Fluent::Plugin::ForwardOutput::SocketCache.new(10, $log)
|
44
|
+
c.checkout_or('key') { 'socket' }
|
45
|
+
c.purge_obsolete_socks
|
46
|
+
|
47
|
+
assert_nothing_raised(NoMethodError) do
|
48
|
+
c.checkout_or('key') { 'new socket' }
|
49
|
+
end
|
50
|
+
end
|
41
51
|
end
|
42
52
|
|
43
53
|
sub_test_case 'checkin' do
|
@@ -495,7 +495,7 @@ class BufferFileChunkTest < Test::Unit::TestCase
|
|
495
495
|
end
|
496
496
|
end
|
497
497
|
|
498
|
-
test 'ensure to remove metadata file if #write_metadata raise an error
|
498
|
+
test 'ensure to remove metadata file if #write_metadata raise an error because of disk full' do
|
499
499
|
chunk_path = File.join(@chunkdir, 'test.*.log')
|
500
500
|
stub(Fluent::UniqueId).hex(anything) { 'id' } # to fix chunk id
|
501
501
|
|
@@ -217,11 +217,15 @@ EOS
|
|
217
217
|
compare_test_result(d.events, tests, {host: host})
|
218
218
|
end
|
219
219
|
|
220
|
-
|
221
|
-
|
220
|
+
data(
|
221
|
+
severity_key: 'severity_key',
|
222
|
+
priority_key: 'priority_key',
|
223
|
+
)
|
224
|
+
def test_msg_size_with_severity_key(param_name)
|
225
|
+
d = create_driver([CONFIG, "#{param_name} severity"].join("\n"))
|
222
226
|
tests = create_test_case
|
223
227
|
|
224
|
-
|
228
|
+
severity = 'info'
|
225
229
|
d.run(expect_emits: 2) do
|
226
230
|
u = UDPSocket.new
|
227
231
|
u.connect('127.0.0.1', PORT)
|
@@ -231,7 +235,7 @@ EOS
|
|
231
235
|
end
|
232
236
|
|
233
237
|
assert(d.events.size > 0)
|
234
|
-
compare_test_result(d.events, tests, {
|
238
|
+
compare_test_result(d.events, tests, {severity: severity})
|
235
239
|
end
|
236
240
|
|
237
241
|
def test_msg_size_with_facility_key
|
@@ -311,7 +315,7 @@ EOS
|
|
311
315
|
assert_equal(options[:host], events[i][2]['source_host']) if options[:host]
|
312
316
|
assert_equal(options[:address], events[i][2]['source_address']) if options[:address]
|
313
317
|
assert_equal(options[:hostname], events[i][2]['source_hostname']) if options[:hostname]
|
314
|
-
assert_equal(options[:
|
318
|
+
assert_equal(options[:severity], events[i][2]['severity']) if options[:severity]
|
315
319
|
assert_equal(options[:facility], events[i][2]['facility']) if options[:facility]
|
316
320
|
}
|
317
321
|
end
|
@@ -1112,7 +1112,7 @@ class BufferedOutputTest < Test::Unit::TestCase
|
|
1112
1112
|
assert_equal(0, @i.write_count)
|
1113
1113
|
|
1114
1114
|
Timecop.freeze(Time.parse('2019-02-09 00:00:12 +0900'))
|
1115
|
-
#
|
1115
|
+
# write should be called in few seconds since
|
1116
1116
|
# running interval of enque thread is timekey_wait / 11.0.
|
1117
1117
|
waiting(5){ sleep 0.1 until @i.write_count == 1 }
|
1118
1118
|
end
|
data/test/test_root_agent.rb
CHANGED
@@ -710,7 +710,7 @@ EOC
|
|
710
710
|
end
|
711
711
|
end
|
712
712
|
|
713
|
-
test 'raises configuration error for worker id collisions on multi workers syntax when multi
|
713
|
+
test 'raises configuration error for worker id collisions on multi workers syntax when multi available worker_ids are left' do
|
714
714
|
errmsg = "specified worker_id<1> collisions is detected on <worker> directive. Available worker id(s): [2, 3]"
|
715
715
|
assert_raise Fluent::ConfigError.new(errmsg) do
|
716
716
|
conf = <<-EOC
|
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.7.
|
4
|
+
version: 1.7.3
|
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: 2019-
|
11
|
+
date: 2019-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|