fluent-plugin-elb-access-log 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -2
- data/lib/fluent/plugin/in_elb_access_log.rb +9 -0
- data/lib/fluent_plugin_elb_access_log/version.rb +1 -1
- data/spec/in_elb_access_log_spec.rb +20 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa61c99c73fe15d923591e28868b58ac63537fbe
|
4
|
+
data.tar.gz: 8fd24f9385d67df78c65b1396f7007e835544d50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
"
|
54
|
-
"
|
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)
|
@@ -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
|
-
"
|
101
|
-
"
|
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
|
-
"
|
129
|
-
"
|
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
|
-
"
|
157
|
-
"
|
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
|
-
"
|
185
|
-
"
|
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
|
-
"
|
253
|
-
"
|
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,
|