fluentd 0.10.9 → 0.10.10
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.
- data/ChangeLog +1 -1
- data/ChangeLog.cp +265 -0
- data/README.rdoc +16 -11
- data/VERSION +1 -1
- data/lib/fluent/engine.rb +1 -1
- data/lib/fluent/output.rb +26 -8
- data/lib/fluent/plugin/in_forward.rb +10 -0
- data/lib/fluent/plugin/in_http.rb +2 -0
- data/lib/fluent/plugin/in_tail.rb +2 -2
- data/lib/fluent/plugin/out_forward.rb +4 -0
- data/lib/fluent/test/base.rb +1 -1
- data/lib/fluent/version.rb +1 -1
- data/test/plugin/in_http.rb +19 -0
- metadata +16 -14
data/ChangeLog
CHANGED
@@ -16,7 +16,7 @@ Release 0.10.8 - 2011/12/03
|
|
16
16
|
* Added Supervisor: restart process on SIGHUP or unexpected end of process
|
17
17
|
* Added -i commandline option which allows inline config
|
18
18
|
* Added TimeSlicedOutputTestDriver
|
19
|
-
* BufferedOutput outputs 'retry
|
19
|
+
* BufferedOutput outputs 'retry succeeded' message
|
20
20
|
* Use Gem::Specification instead of Gem.searcher which is obsoleted
|
21
21
|
* Added BasicBuffer#chunk_limit -> buffer_chunk_limit alias for backward
|
22
22
|
compatibility
|
data/ChangeLog.cp
ADDED
@@ -0,0 +1,265 @@
|
|
1
|
+
|
2
|
+
Release 0.10.10 - 2012/01/19
|
3
|
+
|
4
|
+
* in_forward and on_forward don't raise exceptions in callback handlers of
|
5
|
+
cool.io not to stop Loop#run
|
6
|
+
* TimeSlicedOutput ignores time_slice_wait if flush_interval is specified
|
7
|
+
* in_tail follows symbolic links correctly
|
8
|
+
* in_http supports "Content-Type: application/json"
|
9
|
+
* TestDriver#run sleeps 0.5 seconds for the out_exec_filter plugin
|
10
|
+
|
11
|
+
|
12
|
+
Release 0.10.9 - 2012/01/19
|
13
|
+
|
14
|
+
* Fixed TimeSlicedOutputTestDriver
|
15
|
+
* Updated cool.io 1.0.0 -> 1.1.0
|
16
|
+
* TextParser: fixed regexp of syslog parser to work with rsyslog on CentOS
|
17
|
+
* out_exec_filter: improve performance by using buffering
|
18
|
+
* out_exec_filter: added num_children parameter
|
19
|
+
* out_exec_filter: added remove_prefix/add_prefix parameters
|
20
|
+
* out_tail: show warning if pos_file parameter is not set
|
21
|
+
* out_copy: fixed problems when event stream is not repeatable
|
22
|
+
|
23
|
+
|
24
|
+
Release 0.10.8 - 2011/12/03
|
25
|
+
|
26
|
+
* Added Supervisor: restart process on SIGHUP or unexpected end of process
|
27
|
+
* Added -i commandline option which allows inline config
|
28
|
+
* Added TimeSlicedOutputTestDriver
|
29
|
+
* BufferedOutput outputs 'retry succeeded' message
|
30
|
+
* Use Gem::Specification instead of Gem.searcher which is obsoleted
|
31
|
+
* Added BasicBuffer#chunk_limit -> buffer_chunk_limit alias for backward
|
32
|
+
compatibility
|
33
|
+
* buf_file: fixed to work with keys which contains '/'
|
34
|
+
|
35
|
+
|
36
|
+
Release 0.10.7 - 2011/11/16
|
37
|
+
|
38
|
+
* Supports multi-threaded on buffered output plugins ('num_threads')
|
39
|
+
* Supports multi-process on input plugins ('detach_process')
|
40
|
+
* Added ObjectBufferedOutput
|
41
|
+
* Ensure to call 'shutdown' method of started plugins
|
42
|
+
* in_tail supports 'pos_file' option that stores read position to a file
|
43
|
+
|
44
|
+
|
45
|
+
Release 0.10.6 - 2011/11/11
|
46
|
+
|
47
|
+
* Fixed --group NAME cmdline argument
|
48
|
+
* Run configure(conf) after changing user and group
|
49
|
+
* Fixed SIGHUP handling
|
50
|
+
* BasicBuffer plugin uses Configurable module
|
51
|
+
* buf_file uses microseconds + 12 bits random number for unique file name
|
52
|
+
|
53
|
+
|
54
|
+
Release 0.10.5 - 2011/11/08
|
55
|
+
|
56
|
+
* Added out_forward, in_forward
|
57
|
+
* Added out_exec, in_exec
|
58
|
+
* Added out_exec_filter
|
59
|
+
|
60
|
+
|
61
|
+
Release 0.10.4 - 2011/11/07
|
62
|
+
|
63
|
+
* TestDriver uses klass.dup.module_eval instead of inheriting class to
|
64
|
+
override methods
|
65
|
+
* fixed encoding problem of String#[] in FileBufferChunk#<<(data)
|
66
|
+
|
67
|
+
|
68
|
+
Release 0.10.3 - 2011/10/21
|
69
|
+
|
70
|
+
* Supports 'include' in config file
|
71
|
+
* Supports "http://" schema
|
72
|
+
* Supports wildcards
|
73
|
+
|
74
|
+
|
75
|
+
Release 0.10.2 - 2011/10/18
|
76
|
+
|
77
|
+
* Fixed EventStream#to_msgpack_stream (thanks CkReal)
|
78
|
+
* Added gemspec.required_ruby_version = '~> 1.9.2' (thanks sakuro)
|
79
|
+
|
80
|
+
|
81
|
+
Release 0.10.1 - 2011/10/16
|
82
|
+
|
83
|
+
* SetTimeKeyMixin accepts include_time_key parameter
|
84
|
+
* SetTagKeyMixin accepts include_tag_key parameter
|
85
|
+
* Fixed Makefile.am
|
86
|
+
* Fixed MemoryBufferChunk#msgpack_each
|
87
|
+
|
88
|
+
|
89
|
+
Release 0.10.0 - 2011/10/16
|
90
|
+
|
91
|
+
* Removed Event class
|
92
|
+
* def format(tag, event) -> format(time, tag, record)
|
93
|
+
* def emit(tag, event) -> emit(tag, time, record)
|
94
|
+
* Added plugin APIs
|
95
|
+
* Added Configurable
|
96
|
+
* Added TimeFormatter
|
97
|
+
* Added SetTimeKeyMixin
|
98
|
+
* Added SetTagKeyMixin
|
99
|
+
* Added InputTestDriver
|
100
|
+
* Added Gemfile, gemspec and .rvmrc files
|
101
|
+
|
102
|
+
|
103
|
+
Release 0.9.20 - 2011/10/07
|
104
|
+
|
105
|
+
* Config#has_key? sets used flag not to show warning
|
106
|
+
* in_tcp supports JSON
|
107
|
+
* Depends on Yajl
|
108
|
+
* Fixed fluentd -r option
|
109
|
+
* Fixed autogen.sh to create plugins directory
|
110
|
+
|
111
|
+
|
112
|
+
Release 0.9.19 - 2011/10/07
|
113
|
+
|
114
|
+
* Secondary outputs work only when error count exceededs retry_limit
|
115
|
+
* Secondary outputs retry upto secondary_limit
|
116
|
+
* Added Output#secondary_init
|
117
|
+
* Added unit test driver for output plugins
|
118
|
+
* Added Fluent::Test.test? method
|
119
|
+
* Added comparision methods (<=>, ==, eql? and hash) to Event class
|
120
|
+
* Added test cases for out_copy, out_roundrobin and out_file
|
121
|
+
|
122
|
+
|
123
|
+
Release 0.9.18 - 2011/10/04
|
124
|
+
|
125
|
+
* Performance improvements
|
126
|
+
* in_tcp uses lazy deserialization
|
127
|
+
* Engine caches results of Match#match
|
128
|
+
* out_file caches results of strftime
|
129
|
+
* Fixed TextParser.register_template
|
130
|
+
|
131
|
+
|
132
|
+
Release 0.9.17 - 2011/10/03
|
133
|
+
|
134
|
+
* TimeSlicedOutput caches results of strftime() for performance
|
135
|
+
* Fixed TextParser.register_template (thanks eiichiroi)
|
136
|
+
* Fixed fluent-cat --port argument to work
|
137
|
+
|
138
|
+
|
139
|
+
Release 0.9.16 - 2011/10/01
|
140
|
+
|
141
|
+
* Fixed it can't use relative path for --plugin command line argument
|
142
|
+
* Fixed out_copy to work with non-repeatable event streams
|
143
|
+
|
144
|
+
|
145
|
+
Release 0.9.15 - 2011/09/21
|
146
|
+
|
147
|
+
* Set default encoding to ASCII-8BIT
|
148
|
+
* Fixed thread issues in BasicBuffer
|
149
|
+
* Performance improvements
|
150
|
+
|
151
|
+
|
152
|
+
Release 0.9.14 - 2011/09/21
|
153
|
+
|
154
|
+
* Fixed to write unexpected error to log files
|
155
|
+
* Plugin loader uses GemSpec if it is available to load newer plugin
|
156
|
+
* Added Config.bool_value method for plugins
|
157
|
+
|
158
|
+
|
159
|
+
Release 0.9.13 - 2011/09/21
|
160
|
+
|
161
|
+
* Updated out_file plugin
|
162
|
+
* Uses localtime by default
|
163
|
+
* Uses \t to separate time, tag and JSON.
|
164
|
+
* Uses ISO-8601 for the time format
|
165
|
+
|
166
|
+
|
167
|
+
Release 0.9.12 - 2011/09/20
|
168
|
+
|
169
|
+
* Updated out_file plugin
|
170
|
+
* Supports log compression
|
171
|
+
* Slices log files every day by default
|
172
|
+
|
173
|
+
|
174
|
+
Release 0.9.11 - 2011/09/19
|
175
|
+
|
176
|
+
* Added out_null plugin
|
177
|
+
* Added out_roundrobin plugin
|
178
|
+
* in_http supports keep-alive
|
179
|
+
* in_tcp and in_unix detect network failure
|
180
|
+
|
181
|
+
|
182
|
+
Release 0.9.10 - 2011/09/07
|
183
|
+
|
184
|
+
* Periodic timer enqueues buffer chunks only when queue is empty
|
185
|
+
|
186
|
+
|
187
|
+
Release 0.9.9 - 2011/09/06
|
188
|
+
|
189
|
+
* in_tail strips \n at the end of log line
|
190
|
+
* Uses newer one if multiple plugins are found
|
191
|
+
|
192
|
+
|
193
|
+
Release 0.9.8 - 2011/08/16
|
194
|
+
|
195
|
+
* in_http plugin supports 'Expect: 100-continue' header
|
196
|
+
* Added --user and --group command line arguments to change privilege
|
197
|
+
* Changed default retry_limit parameter from 8 to 17
|
198
|
+
* Changed default buffer_chunk_limit parameter from 1m to 16m
|
199
|
+
* Changed default buffer_queue_limit parameter from 100 to 64
|
200
|
+
|
201
|
+
|
202
|
+
Release 0.9.7 - 2011/08/06
|
203
|
+
|
204
|
+
* Load plugins named fluent_plugin.rb installed by RubyGems
|
205
|
+
* Load plugins located on fluent/plugin/{buf,in,out}_{type} installed by RubyGems
|
206
|
+
* Removed out_tdlog plugin to fluent-plugin-td gem
|
207
|
+
|
208
|
+
|
209
|
+
Release 0.9.6 - 2011/08/06
|
210
|
+
|
211
|
+
* Force flush buffered events on SIGUSR1
|
212
|
+
* out_tdlog uses event tag for the database and table name
|
213
|
+
* Fluent can log Fluent logs
|
214
|
+
* Colorize Fluent logs on console
|
215
|
+
* Changed default unix domain socket path to /var/run/fluent/fluent.sock
|
216
|
+
* Makefile.am and configure.in aware fakeroot
|
217
|
+
|
218
|
+
|
219
|
+
Release 0.9.5 - 2011/07/23
|
220
|
+
|
221
|
+
* Added <secondary> tag that fallbacks to secondary output when it can't
|
222
|
+
write to primary output.
|
223
|
+
* <match> pattern supports **; matches any fragments recursively.
|
224
|
+
* <match> pattern supports {x,y,...}; matches any of the inner patterns.
|
225
|
+
|
226
|
+
|
227
|
+
Release 0.9.4 - 2011/07/22
|
228
|
+
|
229
|
+
* Switched EventMachine to Cool.io
|
230
|
+
* in_tail continues to follow file if it is deleted on Linux
|
231
|
+
* Added fluentd --setup option that installs sample configuration file
|
232
|
+
* Added out_tdlog plugin
|
233
|
+
|
234
|
+
|
235
|
+
Release 0.9.3 - 2011/07/05
|
236
|
+
|
237
|
+
* Disable EventMachine.epoll because it doesn't work correctly on
|
238
|
+
Ruby 1.9 with threads
|
239
|
+
* in_tcp and in_unix uses EventMachine instead of threads
|
240
|
+
* Set BasicSocket.do_not_reverse_lookup = true
|
241
|
+
|
242
|
+
|
243
|
+
Release 0.9.2 - 2011/07/03
|
244
|
+
|
245
|
+
* Added TimeSlicedOutput that splits buffer chunk exactly based on the time
|
246
|
+
* Changed structure of buffers from queue to map + queue
|
247
|
+
* Show waring if configuration parameters are not used
|
248
|
+
* Added out_time_file plugin
|
249
|
+
|
250
|
+
|
251
|
+
Release 0.9.1 - 2011/06/26
|
252
|
+
|
253
|
+
* Added in_tail plugin
|
254
|
+
* Added in_syslog plugin
|
255
|
+
* Added out_stdout plugin
|
256
|
+
* Added out_tcp plugin
|
257
|
+
* Added out_unix plugin
|
258
|
+
* Improved performance of in_http plugin by replacing WEBrick + thread
|
259
|
+
with EventMachine
|
260
|
+
|
261
|
+
|
262
|
+
Release 0.9.0 - 2011/06/20
|
263
|
+
|
264
|
+
* First release
|
265
|
+
|
data/README.rdoc
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
=
|
1
|
+
= Fluentd
|
2
2
|
|
3
|
-
|
3
|
+
Fluentd is an event collector system. It is a generalized version of syslogd, which handles JSON objects for its log messages.
|
4
4
|
|
5
|
-
==
|
5
|
+
== Architecture
|
6
6
|
|
7
|
-
|
7
|
+
Fluentd collects events from various data sources and writes them to files, database or other types of storages:
|
8
8
|
|
9
9
|
|
10
10
|
Web apps ---+ +--> file
|
11
11
|
| |
|
12
12
|
+--> ---+
|
13
|
-
/var/log ------>
|
13
|
+
/var/log ------> Fluentd ------> mail
|
14
14
|
+--> ---+
|
15
15
|
| |
|
16
|
-
|
16
|
+
Apache ---- +--> Fluentd
|
17
17
|
|
18
18
|
|
19
19
|
Fluent also supports log transfer:
|
@@ -21,24 +21,24 @@ Fluent also supports log transfer:
|
|
21
21
|
|
22
22
|
Web server
|
23
23
|
+---------+
|
24
|
-
|
|
24
|
+
| Fluentd -------
|
25
25
|
+---------+| |
|
26
26
|
+---------+ |
|
27
27
|
|
|
28
28
|
Proxy server | Log server, Amazon S3, HDFS, ...
|
29
29
|
+---------+ +--> +---------+
|
30
|
-
|
|
30
|
+
| Fluentd ----------> | Fluentd ||
|
31
31
|
+---------+| +--> +---------+|
|
32
32
|
+---------+ | +---------+
|
33
33
|
|
|
34
34
|
Database server |
|
35
35
|
+---------+ |
|
36
|
-
|
|
36
|
+
| Fluentd ---------> mail
|
37
37
|
+---------+|
|
38
38
|
+---------+
|
39
39
|
|
40
40
|
|
41
|
-
An event consists of *tag*, *time* and *record*. Tag is a string separated with '.' (e.g. myapp.access). It is used to categorize events. Time is a UNIX time
|
41
|
+
An event consists of *tag*, *time* and *record*. Tag is a string separated with '.' (e.g. myapp.access). It is used to categorize events. Time is a UNIX time recorded at occurrence of an event. Record is a JSON object.
|
42
42
|
|
43
43
|
|
44
44
|
== Quick Start
|
@@ -54,6 +54,7 @@ An event consists of *tag*, *time* and *record*. Tag is a string separated with
|
|
54
54
|
Web site:: http://fluentd.org/
|
55
55
|
Documents:: http://fluentd.org/doc/
|
56
56
|
Source repository:: http://github.com/fluent
|
57
|
+
Discussion:: http://groups.google.com/group/fluentd
|
57
58
|
Author:: Sadayuki Furuhashi
|
58
59
|
Copyright:: (c) 2011 FURUHASHI Sadayuki
|
59
60
|
License:: Apache License, Version 2.0
|
@@ -67,9 +68,13 @@ Patches contributed by:
|
|
67
68
|
* {Eiichiro Iwata}[http://github.com/eiichiroi]
|
68
69
|
* {Francesc Esplugas}[https://github.com/fesplugas]
|
69
70
|
* {hirochachacha}[https://github.com/hirochachacha]
|
71
|
+
* {Hiro Yoshikawa}[https://github.com/hiroyoshikawa]
|
70
72
|
* {Masahiro Nakagawa}[https://github.com/repeatedly]
|
73
|
+
* {Nathan Parry}[https://github.com/nparry]
|
71
74
|
* {Sakuro Ozawa}[https://github.com/sakuro]
|
72
|
-
*
|
75
|
+
* {Satoshi Tagomori}[https://github.com/tagomoris]
|
76
|
+
* {Takashi Nagayasu}[https://github.com/sumipan]
|
73
77
|
* {Tsuyoshi Ozawa}[https://github.com/oza]
|
74
78
|
* {uu59}[https://github.com/uu59]
|
79
|
+
* {Waldemar Quevedo Salinas}[https://github.com/wallyqs]
|
75
80
|
* {Yuichi Tateno}[https://github.com/hotchpotch]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.10.
|
1
|
+
0.10.10
|
data/lib/fluent/engine.rb
CHANGED
data/lib/fluent/output.rb
CHANGED
@@ -285,7 +285,7 @@ class BufferedOutput < Output
|
|
285
285
|
return time + 1 # TODO 1
|
286
286
|
end
|
287
287
|
# assume next retry failes and
|
288
|
-
# clear them if when it
|
288
|
+
# clear them if when it succeeds
|
289
289
|
@last_retry_time = time
|
290
290
|
@error_history << time
|
291
291
|
@next_retry_time += calc_retry_wait
|
@@ -304,7 +304,7 @@ class BufferedOutput < Output
|
|
304
304
|
@error_history.clear
|
305
305
|
# Note: don't notify to other threads to prevent
|
306
306
|
# burst to recovered server
|
307
|
-
$log.warn "retry
|
307
|
+
$log.warn "retry succeeded.", :instance=>object_id
|
308
308
|
end
|
309
309
|
|
310
310
|
if has_next
|
@@ -442,6 +442,7 @@ class TimeSlicedOutput < BufferedOutput
|
|
442
442
|
config_param :time_slice_format, :string, :default => '%Y%m%d'
|
443
443
|
config_param :time_slice_wait, :time, :default => 10*60
|
444
444
|
config_set_default :buffer_type, 'file' # overwrite default buffer_type
|
445
|
+
config_set_default :flush_interval, nil
|
445
446
|
|
446
447
|
attr_accessor :localtime
|
447
448
|
|
@@ -468,6 +469,28 @@ class TimeSlicedOutput < BufferedOutput
|
|
468
469
|
@time_slice_cache_interval = time_slice_cache_interval
|
469
470
|
@before_tc = nil
|
470
471
|
@before_key = nil
|
472
|
+
|
473
|
+
if @flush_interval
|
474
|
+
if conf['time_slice_wait']
|
475
|
+
$log.warn "time_slice_wait is ignored if flush_interval is specified: #{conf}"
|
476
|
+
end
|
477
|
+
@enqueue_buffer_proc = Proc.new do
|
478
|
+
@buffer.keys.each {|key|
|
479
|
+
@buffer.push(key)
|
480
|
+
}
|
481
|
+
end
|
482
|
+
|
483
|
+
else
|
484
|
+
@flush_interval = [60, @time_slice_cache_interval].min
|
485
|
+
@enqueue_buffer_proc = Proc.new do
|
486
|
+
nowslice = @time_slicer.call(Engine.now.to_i - @time_slice_wait)
|
487
|
+
@buffer.keys.each {|key|
|
488
|
+
if key < nowslice
|
489
|
+
@buffer.push(key)
|
490
|
+
end
|
491
|
+
}
|
492
|
+
end
|
493
|
+
end
|
471
494
|
end
|
472
495
|
|
473
496
|
def emit(tag, es, chain)
|
@@ -488,12 +511,7 @@ class TimeSlicedOutput < BufferedOutput
|
|
488
511
|
end
|
489
512
|
|
490
513
|
def enqueue_buffer
|
491
|
-
|
492
|
-
@buffer.keys.each {|key|
|
493
|
-
if key < nowslice
|
494
|
-
@buffer.push(key)
|
495
|
-
end
|
496
|
-
}
|
514
|
+
@enqueue_buffer_proc.call
|
497
515
|
end
|
498
516
|
|
499
517
|
#def format(tag, event)
|
@@ -164,10 +164,18 @@ class ForwardInput < Input
|
|
164
164
|
|
165
165
|
def on_read_json(data)
|
166
166
|
@y << data
|
167
|
+
rescue
|
168
|
+
$log.error "forward error: #{$!.to_s}"
|
169
|
+
$log.error_backtrace
|
170
|
+
close
|
167
171
|
end
|
168
172
|
|
169
173
|
def on_read_msgpack(data)
|
170
174
|
@u.feed_each(data, &@on_message)
|
175
|
+
rescue
|
176
|
+
$log.error "forward error: #{$!.to_s}"
|
177
|
+
$log.error_backtrace
|
178
|
+
close
|
171
179
|
end
|
172
180
|
|
173
181
|
def on_close
|
@@ -187,6 +195,8 @@ class ForwardInput < Input
|
|
187
195
|
host = addr[3]
|
188
196
|
port = addr[1]
|
189
197
|
@callback.call(host, port, msg)
|
198
|
+
rescue
|
199
|
+
# TODO log?
|
190
200
|
end
|
191
201
|
end
|
192
202
|
|
@@ -232,6 +232,8 @@ class HttpInput < Input
|
|
232
232
|
elsif @content_type =~ /^multipart\/form-data; boundary=(.+)/
|
233
233
|
boundary = WEBrick::HTTPUtils.dequote($1)
|
234
234
|
params.update WEBrick::HTTPUtils.parse_form_data(@body, boundary)
|
235
|
+
elsif @content_type =~ /^application\/json/
|
236
|
+
params['json'] = @body
|
235
237
|
end
|
236
238
|
path_info = @parser.request_path
|
237
239
|
|
@@ -109,7 +109,7 @@ class TailInput < Input
|
|
109
109
|
|
110
110
|
class Handler < Coolio::StatWatcher
|
111
111
|
def initialize(path, pe, callback)
|
112
|
-
stat = File.
|
112
|
+
stat = File.stat(path)
|
113
113
|
@pe = pe
|
114
114
|
@inode = stat.ino
|
115
115
|
if @inode == @pe.read_inode
|
@@ -131,7 +131,7 @@ class TailInput < Input
|
|
131
131
|
inode = nil
|
132
132
|
|
133
133
|
File.open(path) {|f|
|
134
|
-
stat = f.
|
134
|
+
stat = f.stat
|
135
135
|
inode = stat.ino
|
136
136
|
|
137
137
|
if @inode != inode || stat.size < @pos
|
@@ -196,6 +196,8 @@ class ForwardOutput < ObjectBufferedOutput
|
|
196
196
|
|
197
197
|
def on_timer
|
198
198
|
@callback.call
|
199
|
+
rescue
|
200
|
+
# TODO log?
|
199
201
|
end
|
200
202
|
end
|
201
203
|
|
@@ -225,6 +227,8 @@ class ForwardOutput < ObjectBufferedOutput
|
|
225
227
|
port = addr[1]
|
226
228
|
sockaddr = Socket.pack_sockaddr_in(port, host)
|
227
229
|
@callback.call(sockaddr, msg)
|
230
|
+
rescue
|
231
|
+
# TODO log?
|
228
232
|
end
|
229
233
|
end
|
230
234
|
|
data/lib/fluent/test/base.rb
CHANGED
data/lib/fluent/version.rb
CHANGED
data/test/plugin/in_http.rb
CHANGED
@@ -58,6 +58,25 @@ class HttpInputTest < Test::Unit::TestCase
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
+
def test_application_json
|
62
|
+
d = create_driver
|
63
|
+
|
64
|
+
time = Time.parse("2011-01-02 13:14:15 UTC").to_i
|
65
|
+
|
66
|
+
d.expect_emit "tag1", time, {"a"=>1}
|
67
|
+
d.expect_emit "tag2", time, {"a"=>2}
|
68
|
+
|
69
|
+
d.run do
|
70
|
+
d.expected_emits.each {|tag,time,record|
|
71
|
+
http = Net::HTTP.new("127.0.0.1", 9911)
|
72
|
+
req = Net::HTTP::Post.new("/#{tag}?time=#{time.to_s}", {"content-type"=>"application/json; charset=utf-8"})
|
73
|
+
req.body = record.to_json
|
74
|
+
res = http.request(req)
|
75
|
+
assert_equal "200", res.code
|
76
|
+
}
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
61
80
|
def test_msgpack
|
62
81
|
d = create_driver
|
63
82
|
|
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: 0.10.
|
4
|
+
version: 0.10.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-02-09 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: msgpack
|
16
|
-
requirement: &
|
16
|
+
requirement: &70325962479480 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.4.4
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70325962479480
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: json
|
27
|
-
requirement: &
|
27
|
+
requirement: &70325962478220 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.4.3
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70325962478220
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: yajl-ruby
|
38
|
-
requirement: &
|
38
|
+
requirement: &70325962474920 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.0.0
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70325962474920
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: cool.io
|
49
|
-
requirement: &
|
49
|
+
requirement: &70325962473640 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.1.0
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70325962473640
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: http_parser.rb
|
60
|
-
requirement: &
|
60
|
+
requirement: &70325962469580 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.5.1
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70325962469580
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
|
-
requirement: &
|
71
|
+
requirement: &70325962465420 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: 0.9.2
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70325962465420
|
80
80
|
description:
|
81
81
|
email: frsyuki@gmail.com
|
82
82
|
executables:
|
@@ -86,6 +86,7 @@ executables:
|
|
86
86
|
extensions: []
|
87
87
|
extra_rdoc_files:
|
88
88
|
- ChangeLog
|
89
|
+
- ChangeLog.cp
|
89
90
|
- README
|
90
91
|
- README.rdoc
|
91
92
|
files:
|
@@ -154,6 +155,7 @@ files:
|
|
154
155
|
- test/plugin/out_roundrobin.rb
|
155
156
|
- test/plugin/out_stream.rb
|
156
157
|
- ChangeLog
|
158
|
+
- ChangeLog.cp
|
157
159
|
- README
|
158
160
|
- README.rdoc
|
159
161
|
homepage: http://fluentd.org/
|