fluentd 0.10.27 → 0.10.28

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 CHANGED
@@ -1,4 +1,10 @@
1
1
 
2
+ Release 0.10.28 - 2012/10/30
3
+
4
+ * in_http: on_request method can get headers as HTTP_* key and remote address
5
+ as REMOTE_ADDR key of the params argument
6
+
7
+
2
8
  Release 0.10.27 - 2012/10/11
3
9
 
4
10
  * added BufferChunk#unique_id which is an unique identifier of a buffered chunk
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.27
1
+ 0.10.28
@@ -148,6 +148,8 @@ class HttpInput < Input
148
148
 
149
149
  @idle = 0
150
150
  @km.add(self)
151
+
152
+ @remote_port, @remote_addr = *Socket.unpack_sockaddr_in(io.getpeername)
151
153
  end
152
154
 
153
155
  def step_idle
@@ -183,7 +185,9 @@ class HttpInput < Input
183
185
  else
184
186
  @keep_alive = false
185
187
  end
188
+ @env = {}
186
189
  headers.each_pair {|k,v|
190
+ @env["HTTP_#{k.gsub('-','_').upcase}"] = v
187
191
  case k
188
192
  when /Expect/i
189
193
  expect = v
@@ -225,6 +229,8 @@ class HttpInput < Input
225
229
  def on_message_complete
226
230
  return if closing?
227
231
 
232
+ @env['REMOTE_ADDR'] = @remote_addr
233
+
228
234
  params = WEBrick::HTTPUtils.parse_query(@parser.query_string)
229
235
 
230
236
  if @content_type =~ /^application\/x-www-form-urlencoded/
@@ -237,6 +243,9 @@ class HttpInput < Input
237
243
  end
238
244
  path_info = @parser.request_path
239
245
 
246
+ params.merge!(@env)
247
+ @env.clear
248
+
240
249
  code, header, body = *@callback.call(path_info, params)
241
250
  body = body.to_s
242
251
 
@@ -1,5 +1,5 @@
1
1
  module Fluent
2
2
 
3
- VERSION = '0.10.27'
3
+ VERSION = '0.10.28'
4
4
 
5
5
  end
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.27
4
+ version: 0.10.28
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-11 00:00:00.000000000 Z
12
+ date: 2012-10-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: msgpack
@@ -165,7 +165,6 @@ executables:
165
165
  extensions: []
166
166
  extra_rdoc_files:
167
167
  - ChangeLog
168
- - README
169
168
  - README.rdoc
170
169
  files:
171
170
  - AUTHORS
@@ -245,7 +244,6 @@ files:
245
244
  - test/plugin/out_stdout.rb
246
245
  - test/plugin/out_stream.rb
247
246
  - ChangeLog
248
- - README
249
247
  - README.rdoc
250
248
  homepage: http://fluentd.org/
251
249
  licenses: []
data/README DELETED
@@ -1,65 +0,0 @@
1
- = Fluent
2
-
3
- Fluent is an event collector system. It's said that Fluent is generalized version of syslogd, which can deal with JSON object for the log message.
4
-
5
- == Archtecture
6
-
7
- Fluent collects events from various data sources and write them to files, database or other storages:
8
-
9
-
10
- Web apps ---+ +--> file
11
- | |
12
- +--> ---+
13
- /var/log ------> fluentd ------> mail
14
- +--> ---+
15
- | |
16
- apache ---- +--> fluentd
17
-
18
-
19
- Fluent also supports log transfer:
20
-
21
-
22
- Web server
23
- +---------+
24
- | fluentd -------
25
- +---------+| |
26
- +---------+ |
27
- |
28
- Proxy server | Log server, Amazon S3, HDFS, ...
29
- +---------+ +--> +---------+
30
- | fluentd ----------> | fluentd ||
31
- +---------+| +--> +---------+|
32
- +---------+ | +---------+
33
- |
34
- Database server |
35
- +---------+ |
36
- | fluentd ---------> mail
37
- +---------+|
38
- +---------+
39
-
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 when the event occurs. Record is a JSON object.
42
-
43
-
44
- == Quick Start
45
-
46
- $ gem install fluentd
47
- $ fluentd &
48
- $ echo '{"json":"message"}' | fluent-cat debug.test
49
-
50
- == Meta
51
-
52
- Web site:: http://fluentd.org/
53
- Documents:: http://fluentd.org/doc/
54
- Source repository:: http://github.com/fluent
55
- Author:: Sadayuki Furuhashi
56
- Copyright:: (c) 2011 FURUHASHI Sadayuki
57
- License:: Apache License, Version 2.0
58
-
59
- Contributed by:
60
-
61
- * Eiichiro Iwata
62
- * Masahiro Nakagawa
63
- * Takashi Nagayasu
64
- * Yuichi Tateno
65
-