fluent-plugin-elb-access-log 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 693ada58a24f0ede7332179cb60e7575d93e3992
4
- data.tar.gz: 07019ae76655f222c04d246ada18b9518e33bb22
3
+ metadata.gz: aa61c99c73fe15d923591e28868b58ac63537fbe
4
+ data.tar.gz: 8fd24f9385d67df78c65b1396f7007e835544d50
5
5
  SHA512:
6
- metadata.gz: 1b7175db9151c5f2b9095ee08cfb264e68b204a7ce28ecdf115f72ab130d069a10b0bb1e42ebc5b2855fb84d1d2c38a2483792f8fe0929bf089729a7990a1f4f
7
- data.tar.gz: f7e1468f9af573261eb3ec8e2254a6d3d07828941874b1d750f6cc5c7edf35b2c32a50e773fe3e5e7a380382556c7fec2228c5fc7a7d7b8b6c317fe7623623b2
6
+ metadata.gz: bfdb323b0785cc474b96f6019f6932a80658d3ba4c33713fea5d294e7582f607018ee04cc1640d9eb8eac306cc907bdf612b7498f030a2725eaa6d7f1ebd8ee3
7
+ data.tar.gz: 5d755876a4d9c871751e66fa0a51d9ec2d2ed97000ed658cbb4fbd16ffb38ad7ac012aee0cda94692116e95cdf5ec9e37981b4cb73d309b824f432ae2eecdfd6
data/README.md CHANGED
@@ -50,8 +50,10 @@ Or install it yourself as:
50
50
  {
51
51
  "timestamp":"2015-05-24T08:25:36.229576Z",
52
52
  "elb":"hoge",
53
- "client_port":"14.14.124.20:52232",
54
- "backend_port":"10.0.199.184:80",
53
+ "client":"14.14.124.20",
54
+ "client_port":52232,
55
+ "backend":"10.0.199.184",
56
+ "backend_port":80,
55
57
  "request_processing_time":5.5e-05,
56
58
  "backend_processing_time":0.000893,
57
59
  "response_processing_time":5.7e-05,
@@ -144,6 +144,9 @@ class Fluent::ElbAccessLogInput < Fluent::Input
144
144
  record[name] = record[name].send(conv) if conv
145
145
  end
146
146
 
147
+ split_address_port!(record, 'client')
148
+ split_address_port!(record, 'backend')
149
+
147
150
  parse_request!(record)
148
151
 
149
152
  time = Time.parse(record['timestamp'])
@@ -151,6 +154,12 @@ class Fluent::ElbAccessLogInput < Fluent::Input
151
154
  end
152
155
  end
153
156
 
157
+ def split_address_port!(record, prefix)
158
+ address, port = record["#{prefix}_port"].split(':', 2)
159
+ record[prefix] = address
160
+ record["#{prefix}_port"] = port.to_i
161
+ end
162
+
154
163
  def parse_request!(record)
155
164
  request = record['request']
156
165
  method, uri, http_version = request.split(' ', 3)
@@ -1,3 +1,3 @@
1
1
  module FluentPluginElbAccessLog
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
@@ -97,8 +97,10 @@ describe Fluent::ElbAccessLogInput do
97
97
  Time.parse('2015-05-24 19:55:36 UTC').to_i,
98
98
  {"timestamp"=>"2015-05-24T19:55:36.000000Z",
99
99
  "elb"=>"hoge",
100
- "client_port"=>"14.14.124.20:57673",
101
- "backend_port"=>"10.0.199.184:80",
100
+ "client"=>"14.14.124.20",
101
+ "client_port"=>57673,
102
+ "backend"=>"10.0.199.184",
103
+ "backend_port"=>80,
102
104
  "request_processing_time"=>5.3e-05,
103
105
  "backend_processing_time"=>0.000913,
104
106
  "response_processing_time"=>3.6e-05,
@@ -125,8 +127,10 @@ describe Fluent::ElbAccessLogInput do
125
127
  Time.parse('2015-05-24 19:55:36 UTC').to_i,
126
128
  {"timestamp"=>"2015-05-24T19:55:36.000000Z",
127
129
  "elb"=>"hoge",
128
- "client_port"=>"14.14.124.20:57673",
129
- "backend_port"=>"10.0.199.184:80",
130
+ "client"=>"14.14.124.20",
131
+ "client_port"=>57673,
132
+ "backend"=>"10.0.199.184",
133
+ "backend_port"=>80,
130
134
  "request_processing_time"=>5.3e-05,
131
135
  "backend_processing_time"=>0.000913,
132
136
  "response_processing_time"=>3.6e-05,
@@ -153,8 +157,10 @@ describe Fluent::ElbAccessLogInput do
153
157
  Time.parse('2015-05-25 19:55:36 UTC').to_i,
154
158
  {"timestamp"=>"2015-05-25T19:55:36.000000Z",
155
159
  "elb"=>"hoge",
156
- "client_port"=>"14.14.124.20:57673",
157
- "backend_port"=>"10.0.199.184:80",
160
+ "client"=>"14.14.124.20",
161
+ "client_port"=>57673,
162
+ "backend"=>"10.0.199.184",
163
+ "backend_port"=>80,
158
164
  "request_processing_time"=>5.3e-05,
159
165
  "backend_processing_time"=>0.000913,
160
166
  "response_processing_time"=>3.6e-05,
@@ -181,8 +187,10 @@ describe Fluent::ElbAccessLogInput do
181
187
  Time.parse('2015-05-25 19:55:36 UTC').to_i,
182
188
  {"timestamp"=>"2015-05-25T19:55:36.000000Z",
183
189
  "elb"=>"hoge",
184
- "client_port"=>"14.14.124.20:57673",
185
- "backend_port"=>"10.0.199.184:80",
190
+ "client"=>"14.14.124.20",
191
+ "client_port"=>57673,
192
+ "backend"=>"10.0.199.184",
193
+ "backend_port"=>80,
186
194
  "request_processing_time"=>5.3e-05,
187
195
  "backend_processing_time"=>0.000913,
188
196
  "response_processing_time"=>3.6e-05,
@@ -249,8 +257,10 @@ describe Fluent::ElbAccessLogInput do
249
257
  Time.parse('2015-05-24 19:55:36 UTC').to_i,
250
258
  {"timestamp"=>"2015-05-24T19:55:36.000000Z",
251
259
  "elb"=>"hoge",
252
- "client_port"=>"14.14.124.20:57673",
253
- "backend_port"=>"10.0.199.184:80",
260
+ "client"=>"14.14.124.20",
261
+ "client_port"=>57673,
262
+ "backend"=>"10.0.199.184",
263
+ "backend_port"=>80,
254
264
  "request_processing_time"=>5.3e-05,
255
265
  "backend_processing_time"=>0.000913,
256
266
  "response_processing_time"=>3.6e-05,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-elb-access-log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara