fluentd 0.10.44 → 0.10.45
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 +7 -0
- data/ChangeLog +9 -0
- data/fluent.conf +9 -3
- data/fluentd.gemspec +1 -0
- data/lib/fluent/engine.rb +14 -5
- data/lib/fluent/load.rb +5 -1
- data/lib/fluent/log.rb +4 -4
- data/lib/fluent/parser.rb +80 -0
- data/lib/fluent/plugin/exec_util.rb +38 -2
- data/lib/fluent/plugin/in_forward.rb +5 -3
- data/lib/fluent/plugin/in_tail.rb +661 -1
- data/lib/fluent/plugin/out_exec.rb +29 -15
- data/lib/fluent/plugin/out_exec_filter.rb +8 -44
- data/lib/fluent/version.rb +1 -1
- data/test/parser.rb +81 -0
- data/test/plugin/data/2010/01/20100102-030405.log +0 -0
- data/test/plugin/data/2010/01/20100102-030406.log +0 -0
- data/test/plugin/data/2010/01/20100102.log +0 -0
- data/test/plugin/data/log/bar +0 -0
- data/test/plugin/data/log/foo/bar.log +0 -0
- data/test/plugin/data/log/test.log +0 -0
- data/test/plugin/in_tail.rb +236 -3
- data/test/plugin/out_exec.rb +44 -9
- metadata +70 -69
data/test/plugin/out_exec.rb
CHANGED
@@ -13,15 +13,24 @@ class ExecOutputTest < Test::Unit::TestCase
|
|
13
13
|
CONFIG = %[
|
14
14
|
buffer_path #{TMP_DIR}/buffer
|
15
15
|
command cat >#{TMP_DIR}/out
|
16
|
+
localtime
|
17
|
+
]
|
18
|
+
TSV_CONFIG = %[
|
16
19
|
keys time,tag,k1
|
17
20
|
tag_key tag
|
18
21
|
time_key time
|
19
22
|
time_format %Y-%m-%d %H:%M:%S
|
20
|
-
localtime
|
21
23
|
]
|
22
24
|
|
23
|
-
def create_driver(conf =
|
24
|
-
|
25
|
+
def create_driver(conf = TSV_CONFIG)
|
26
|
+
config = CONFIG + conf
|
27
|
+
Fluent::Test::TimeSlicedOutputTestDriver.new(Fluent::ExecOutput).configure(config)
|
28
|
+
end
|
29
|
+
|
30
|
+
def create_test_case
|
31
|
+
time = Time.parse("2011-01-02 13:14:15").to_i
|
32
|
+
tests = [{"k1"=>"v1","kx"=>"vx"}, {"k1"=>"v2","kx"=>"vx"}]
|
33
|
+
return time, tests
|
25
34
|
end
|
26
35
|
|
27
36
|
def test_configure
|
@@ -36,10 +45,11 @@ class ExecOutputTest < Test::Unit::TestCase
|
|
36
45
|
|
37
46
|
def test_format
|
38
47
|
d = create_driver
|
48
|
+
time, tests = create_test_case
|
39
49
|
|
40
|
-
|
41
|
-
|
42
|
-
|
50
|
+
tests.each { |test|
|
51
|
+
d.emit(test, time)
|
52
|
+
}
|
43
53
|
|
44
54
|
d.expect_format %[2011-01-02 13:14:15\ttest\tv1\n]
|
45
55
|
d.expect_format %[2011-01-02 13:14:15\ttest\tv2\n]
|
@@ -47,12 +57,37 @@ class ExecOutputTest < Test::Unit::TestCase
|
|
47
57
|
d.run
|
48
58
|
end
|
49
59
|
|
60
|
+
def test_format_json
|
61
|
+
d = create_driver("format json")
|
62
|
+
time, tests = create_test_case
|
63
|
+
|
64
|
+
tests.each { |test|
|
65
|
+
d.emit(test, time)
|
66
|
+
d.expect_format Yajl.dump(test) + "\n"
|
67
|
+
}
|
68
|
+
|
69
|
+
d.run
|
70
|
+
end
|
71
|
+
|
72
|
+
def test_format_msgpack
|
73
|
+
d = create_driver("format msgpack")
|
74
|
+
time, tests = create_test_case
|
75
|
+
|
76
|
+
tests.each { |test|
|
77
|
+
d.emit(test, time)
|
78
|
+
d.expect_format test.to_msgpack
|
79
|
+
}
|
80
|
+
|
81
|
+
d.run
|
82
|
+
end
|
83
|
+
|
50
84
|
def test_write
|
51
85
|
d = create_driver
|
86
|
+
time, tests = create_test_case
|
52
87
|
|
53
|
-
|
54
|
-
|
55
|
-
|
88
|
+
tests.each { |test|
|
89
|
+
d.emit(test, time)
|
90
|
+
}
|
56
91
|
|
57
92
|
d.run
|
58
93
|
|
metadata
CHANGED
@@ -1,216 +1,209 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluentd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
5
|
-
prerelease:
|
4
|
+
version: 0.10.45
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Sadayuki Furuhashi
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-03-28 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: msgpack
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 0.4.4
|
22
|
-
- -
|
20
|
+
- - "!="
|
23
21
|
- !ruby/object:Gem::Version
|
24
22
|
version: 0.5.0
|
25
|
-
- -
|
23
|
+
- - "!="
|
26
24
|
- !ruby/object:Gem::Version
|
27
25
|
version: 0.5.1
|
28
|
-
- -
|
26
|
+
- - "!="
|
29
27
|
- !ruby/object:Gem::Version
|
30
28
|
version: 0.5.2
|
31
|
-
- -
|
29
|
+
- - "!="
|
32
30
|
- !ruby/object:Gem::Version
|
33
31
|
version: 0.5.3
|
34
|
-
- - <
|
32
|
+
- - "<"
|
35
33
|
- !ruby/object:Gem::Version
|
36
34
|
version: 0.6.0
|
37
35
|
type: :runtime
|
38
36
|
prerelease: false
|
39
37
|
version_requirements: !ruby/object:Gem::Requirement
|
40
|
-
none: false
|
41
38
|
requirements:
|
42
|
-
- -
|
39
|
+
- - ">="
|
43
40
|
- !ruby/object:Gem::Version
|
44
41
|
version: 0.4.4
|
45
|
-
- -
|
42
|
+
- - "!="
|
46
43
|
- !ruby/object:Gem::Version
|
47
44
|
version: 0.5.0
|
48
|
-
- -
|
45
|
+
- - "!="
|
49
46
|
- !ruby/object:Gem::Version
|
50
47
|
version: 0.5.1
|
51
|
-
- -
|
48
|
+
- - "!="
|
52
49
|
- !ruby/object:Gem::Version
|
53
50
|
version: 0.5.2
|
54
|
-
- -
|
51
|
+
- - "!="
|
55
52
|
- !ruby/object:Gem::Version
|
56
53
|
version: 0.5.3
|
57
|
-
- - <
|
54
|
+
- - "<"
|
58
55
|
- !ruby/object:Gem::Version
|
59
56
|
version: 0.6.0
|
60
57
|
- !ruby/object:Gem::Dependency
|
61
58
|
name: json
|
62
59
|
requirement: !ruby/object:Gem::Requirement
|
63
|
-
none: false
|
64
60
|
requirements:
|
65
|
-
- -
|
61
|
+
- - ">="
|
66
62
|
- !ruby/object:Gem::Version
|
67
63
|
version: 1.4.3
|
68
64
|
type: :runtime
|
69
65
|
prerelease: false
|
70
66
|
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
none: false
|
72
67
|
requirements:
|
73
|
-
- -
|
68
|
+
- - ">="
|
74
69
|
- !ruby/object:Gem::Version
|
75
70
|
version: 1.4.3
|
76
71
|
- !ruby/object:Gem::Dependency
|
77
72
|
name: yajl-ruby
|
78
73
|
requirement: !ruby/object:Gem::Requirement
|
79
|
-
none: false
|
80
74
|
requirements:
|
81
|
-
- - ~>
|
75
|
+
- - "~>"
|
82
76
|
- !ruby/object:Gem::Version
|
83
77
|
version: '1.0'
|
84
78
|
type: :runtime
|
85
79
|
prerelease: false
|
86
80
|
version_requirements: !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
81
|
requirements:
|
89
|
-
- - ~>
|
82
|
+
- - "~>"
|
90
83
|
- !ruby/object:Gem::Version
|
91
84
|
version: '1.0'
|
92
85
|
- !ruby/object:Gem::Dependency
|
93
86
|
name: cool.io
|
94
87
|
requirement: !ruby/object:Gem::Requirement
|
95
|
-
none: false
|
96
88
|
requirements:
|
97
|
-
- -
|
89
|
+
- - ">="
|
98
90
|
- !ruby/object:Gem::Version
|
99
91
|
version: 1.1.1
|
100
|
-
- -
|
92
|
+
- - "!="
|
101
93
|
- !ruby/object:Gem::Version
|
102
94
|
version: 1.2.0
|
103
|
-
- - <
|
95
|
+
- - "<"
|
104
96
|
- !ruby/object:Gem::Version
|
105
97
|
version: 2.0.0
|
106
98
|
type: :runtime
|
107
99
|
prerelease: false
|
108
100
|
version_requirements: !ruby/object:Gem::Requirement
|
109
|
-
none: false
|
110
101
|
requirements:
|
111
|
-
- -
|
102
|
+
- - ">="
|
112
103
|
- !ruby/object:Gem::Version
|
113
104
|
version: 1.1.1
|
114
|
-
- -
|
105
|
+
- - "!="
|
115
106
|
- !ruby/object:Gem::Version
|
116
107
|
version: 1.2.0
|
117
|
-
- - <
|
108
|
+
- - "<"
|
118
109
|
- !ruby/object:Gem::Version
|
119
110
|
version: 2.0.0
|
120
111
|
- !ruby/object:Gem::Dependency
|
121
112
|
name: http_parser.rb
|
122
113
|
requirement: !ruby/object:Gem::Requirement
|
123
|
-
none: false
|
124
114
|
requirements:
|
125
|
-
- - ~>
|
115
|
+
- - "~>"
|
126
116
|
- !ruby/object:Gem::Version
|
127
117
|
version: 0.5.1
|
128
118
|
type: :runtime
|
129
119
|
prerelease: false
|
130
120
|
version_requirements: !ruby/object:Gem::Requirement
|
131
|
-
none: false
|
132
121
|
requirements:
|
133
|
-
- - ~>
|
122
|
+
- - "~>"
|
134
123
|
- !ruby/object:Gem::Version
|
135
124
|
version: 0.5.1
|
136
125
|
- !ruby/object:Gem::Dependency
|
137
126
|
name: sigdump
|
138
127
|
requirement: !ruby/object:Gem::Requirement
|
139
|
-
none: false
|
140
128
|
requirements:
|
141
|
-
- - ~>
|
129
|
+
- - "~>"
|
142
130
|
- !ruby/object:Gem::Version
|
143
131
|
version: 0.2.2
|
144
132
|
type: :runtime
|
145
133
|
prerelease: false
|
146
134
|
version_requirements: !ruby/object:Gem::Requirement
|
147
|
-
none: false
|
148
135
|
requirements:
|
149
|
-
- - ~>
|
136
|
+
- - "~>"
|
150
137
|
- !ruby/object:Gem::Version
|
151
138
|
version: 0.2.2
|
152
139
|
- !ruby/object:Gem::Dependency
|
153
140
|
name: rake
|
154
141
|
requirement: !ruby/object:Gem::Requirement
|
155
|
-
none: false
|
156
142
|
requirements:
|
157
|
-
- -
|
143
|
+
- - ">="
|
158
144
|
- !ruby/object:Gem::Version
|
159
145
|
version: 0.9.2
|
160
146
|
type: :development
|
161
147
|
prerelease: false
|
162
148
|
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
none: false
|
164
149
|
requirements:
|
165
|
-
- -
|
150
|
+
- - ">="
|
166
151
|
- !ruby/object:Gem::Version
|
167
152
|
version: 0.9.2
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: flexmock
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
168
167
|
- !ruby/object:Gem::Dependency
|
169
168
|
name: parallel_tests
|
170
169
|
requirement: !ruby/object:Gem::Requirement
|
171
|
-
none: false
|
172
170
|
requirements:
|
173
|
-
- -
|
171
|
+
- - ">="
|
174
172
|
- !ruby/object:Gem::Version
|
175
173
|
version: 0.15.3
|
176
174
|
type: :development
|
177
175
|
prerelease: false
|
178
176
|
version_requirements: !ruby/object:Gem::Requirement
|
179
|
-
none: false
|
180
177
|
requirements:
|
181
|
-
- -
|
178
|
+
- - ">="
|
182
179
|
- !ruby/object:Gem::Version
|
183
180
|
version: 0.15.3
|
184
181
|
- !ruby/object:Gem::Dependency
|
185
182
|
name: rr
|
186
183
|
requirement: !ruby/object:Gem::Requirement
|
187
|
-
none: false
|
188
184
|
requirements:
|
189
|
-
- -
|
185
|
+
- - ">="
|
190
186
|
- !ruby/object:Gem::Version
|
191
187
|
version: 1.0.0
|
192
188
|
type: :development
|
193
189
|
prerelease: false
|
194
190
|
version_requirements: !ruby/object:Gem::Requirement
|
195
|
-
none: false
|
196
191
|
requirements:
|
197
|
-
- -
|
192
|
+
- - ">="
|
198
193
|
- !ruby/object:Gem::Version
|
199
194
|
version: 1.0.0
|
200
195
|
- !ruby/object:Gem::Dependency
|
201
196
|
name: timecop
|
202
197
|
requirement: !ruby/object:Gem::Requirement
|
203
|
-
none: false
|
204
198
|
requirements:
|
205
|
-
- -
|
199
|
+
- - ">="
|
206
200
|
- !ruby/object:Gem::Version
|
207
201
|
version: 0.3.0
|
208
202
|
type: :development
|
209
203
|
prerelease: false
|
210
204
|
version_requirements: !ruby/object:Gem::Requirement
|
211
|
-
none: false
|
212
205
|
requirements:
|
213
|
-
- -
|
206
|
+
- - ">="
|
214
207
|
- !ruby/object:Gem::Version
|
215
208
|
version: 0.3.0
|
216
209
|
description: Fluentd is an event collector system. It is a generalized version of
|
@@ -225,9 +218,9 @@ executables:
|
|
225
218
|
extensions: []
|
226
219
|
extra_rdoc_files: []
|
227
220
|
files:
|
228
|
-
- .gitignore
|
229
|
-
- .rvmrc
|
230
|
-
- .travis.yml
|
221
|
+
- ".gitignore"
|
222
|
+
- ".rvmrc"
|
223
|
+
- ".travis.yml"
|
231
224
|
- AUTHORS
|
232
225
|
- COPYING
|
233
226
|
- ChangeLog
|
@@ -300,6 +293,12 @@ files:
|
|
300
293
|
- test/mixin.rb
|
301
294
|
- test/output.rb
|
302
295
|
- test/parser.rb
|
296
|
+
- test/plugin/data/2010/01/20100102-030405.log
|
297
|
+
- test/plugin/data/2010/01/20100102-030406.log
|
298
|
+
- test/plugin/data/2010/01/20100102.log
|
299
|
+
- test/plugin/data/log/bar
|
300
|
+
- test/plugin/data/log/foo/bar.log
|
301
|
+
- test/plugin/data/log/test.log
|
303
302
|
- test/plugin/in_exec.rb
|
304
303
|
- test/plugin/in_forward.rb
|
305
304
|
- test/plugin/in_gc_stat.rb
|
@@ -320,30 +319,26 @@ files:
|
|
320
319
|
- test/scripts/exec_script.rb
|
321
320
|
homepage: http://fluentd.org/
|
322
321
|
licenses: []
|
322
|
+
metadata: {}
|
323
323
|
post_install_message:
|
324
324
|
rdoc_options: []
|
325
325
|
require_paths:
|
326
326
|
- lib
|
327
327
|
required_ruby_version: !ruby/object:Gem::Requirement
|
328
|
-
none: false
|
329
328
|
requirements:
|
330
|
-
- -
|
329
|
+
- - ">="
|
331
330
|
- !ruby/object:Gem::Version
|
332
331
|
version: 1.9.2
|
333
332
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
334
|
-
none: false
|
335
333
|
requirements:
|
336
|
-
- -
|
334
|
+
- - ">="
|
337
335
|
- !ruby/object:Gem::Version
|
338
336
|
version: '0'
|
339
|
-
segments:
|
340
|
-
- 0
|
341
|
-
hash: -3906480416745103078
|
342
337
|
requirements: []
|
343
338
|
rubyforge_project:
|
344
|
-
rubygems_version:
|
339
|
+
rubygems_version: 2.2.2
|
345
340
|
signing_key:
|
346
|
-
specification_version:
|
341
|
+
specification_version: 4
|
347
342
|
summary: Fluentd event collector
|
348
343
|
test_files:
|
349
344
|
- test/config.rb
|
@@ -353,6 +348,12 @@ test_files:
|
|
353
348
|
- test/mixin.rb
|
354
349
|
- test/output.rb
|
355
350
|
- test/parser.rb
|
351
|
+
- test/plugin/data/2010/01/20100102-030405.log
|
352
|
+
- test/plugin/data/2010/01/20100102-030406.log
|
353
|
+
- test/plugin/data/2010/01/20100102.log
|
354
|
+
- test/plugin/data/log/bar
|
355
|
+
- test/plugin/data/log/foo/bar.log
|
356
|
+
- test/plugin/data/log/test.log
|
356
357
|
- test/plugin/in_exec.rb
|
357
358
|
- test/plugin/in_forward.rb
|
358
359
|
- test/plugin/in_gc_stat.rb
|