fluent-plugin-cwm-http 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/ci.yml +90 -0
- data/.gitignore +58 -0
- data/.rubocop.yml +17 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +63 -0
- data/LICENSE +202 -0
- data/README.md +185 -0
- data/Rakefile +15 -0
- data/bin/update_version.sh +9 -0
- data/fluent-plugin-cwm-http.gemspec +30 -0
- data/lib/fluent/plugin/in_http_cwm.rb +299 -0
- data/test/helper.rb +13 -0
- data/test/logs.txt +29 -0
- data/test/plugin/test_in_http_cwm.rb +125 -0
- metadata +196 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen-string-literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'fluent-plugin-cwm-http'
|
8
|
+
spec.version = '0.3.1'
|
9
|
+
spec.authors = ['Azeem Sajid']
|
10
|
+
spec.email = ['azeem.sajid@gmail.com']
|
11
|
+
|
12
|
+
spec.summary = 'fluentd HTTP Input Plugin for CloudWebManage Logging Component'
|
13
|
+
spec.description = 'fluentd HTTP Input Plugin for CloudWebManage Logging Component with Log Metrics Support'
|
14
|
+
spec.homepage = 'https://github.com/CloudWebManage/fluent-plugin-http-cwm'
|
15
|
+
spec.license = 'Apache-2.0'
|
16
|
+
|
17
|
+
test_files, files = `git ls-files -z`.split("\x0").partition { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.files = files
|
19
|
+
spec.executables = files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
|
+
spec.test_files = test_files
|
21
|
+
spec.require_paths = ['lib']
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '>= 1.14', '< 3'
|
24
|
+
spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
|
25
|
+
spec.add_development_dependency 'simplecov', '~> 0.12', '<= 0.12.2'
|
26
|
+
spec.add_development_dependency 'test-unit', '~> 3.0'
|
27
|
+
spec.add_runtime_dependency 'fluentd', '>= 0.14.10', '< 2'
|
28
|
+
spec.add_runtime_dependency 'json', '~> 2.3', '>= 2.3.0'
|
29
|
+
spec.add_runtime_dependency 'redis', '~> 4.2', '>= 4.2.5'
|
30
|
+
end
|
@@ -0,0 +1,299 @@
|
|
1
|
+
# frozen-string-literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# Copyright 2020 Azeem Sajid
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
|
18
|
+
require 'fluent/plugin/input'
|
19
|
+
require 'fluent/config/error'
|
20
|
+
require 'fluent/plugin_helper/http_server'
|
21
|
+
require 'fluent/plugin_helper/timer'
|
22
|
+
require 'webrick/httputils'
|
23
|
+
require 'json'
|
24
|
+
require 'redis'
|
25
|
+
|
26
|
+
FMT_DATETIME = '%Y-%m-%dT%H:%M:%S.%8NZ'
|
27
|
+
|
28
|
+
module Fluent
|
29
|
+
module Plugin
|
30
|
+
# Custom HTTP Input Plugin class for CWM
|
31
|
+
class CwmHttpInput < Fluent::Plugin::Input
|
32
|
+
Fluent::Plugin.register_input('http_cwm', self)
|
33
|
+
|
34
|
+
helpers :http_server, :event_emitter, :timer
|
35
|
+
|
36
|
+
desc 'The address to bind to.'
|
37
|
+
config_param :host, :string, default: 'localhost'
|
38
|
+
|
39
|
+
desc 'The port to listen to.'
|
40
|
+
config_param :port, :integer, default: 8080
|
41
|
+
|
42
|
+
desc 'The tag for the event.'
|
43
|
+
config_param :tag, :string
|
44
|
+
|
45
|
+
desc 'The Redis configuration section for flushing metrics.'
|
46
|
+
config_section :redis, required: false, multi: false, init: true, param_name: :redis_config do
|
47
|
+
desc 'The address of Redis server.'
|
48
|
+
config_param :host, :string, default: 'localhost'
|
49
|
+
|
50
|
+
desc 'The port of Redis server.'
|
51
|
+
config_param :port, :integer, default: 6379
|
52
|
+
|
53
|
+
desc 'The db to use.'
|
54
|
+
config_param :db, :integer, default: 0
|
55
|
+
|
56
|
+
desc 'The grace period for last action update.'
|
57
|
+
config_param :grace_period, :time, default: '300s'
|
58
|
+
|
59
|
+
desc 'The flush interval to send metrics.'
|
60
|
+
config_param :flush_interval, :time, default: '300s'
|
61
|
+
|
62
|
+
desc 'The prefix for last update key.'
|
63
|
+
config_param :last_update_prefix, :string, default: 'deploymentid:last_action'
|
64
|
+
|
65
|
+
desc 'The prefix for metrics key.'
|
66
|
+
config_param :metrics_prefix, :string, default: 'deploymentid:minio-metrics'
|
67
|
+
end
|
68
|
+
|
69
|
+
def initialize
|
70
|
+
super
|
71
|
+
|
72
|
+
@redis = nil
|
73
|
+
@deployment_api_metrics = default_api_metrics_hash
|
74
|
+
|
75
|
+
@last_action_queue = Queue.new
|
76
|
+
@last_action_entry = []
|
77
|
+
end
|
78
|
+
|
79
|
+
def configure(conf)
|
80
|
+
super
|
81
|
+
|
82
|
+
set_up_redis
|
83
|
+
end
|
84
|
+
|
85
|
+
def start
|
86
|
+
super
|
87
|
+
|
88
|
+
# start interval timer to flush api metrics
|
89
|
+
timer_execute(:api_metrics_flush_timer, @redis_config.flush_interval) do
|
90
|
+
flush_api_metrics
|
91
|
+
end
|
92
|
+
|
93
|
+
# start interval timer to flush last action entry
|
94
|
+
timer_execute(:last_action_flush_timer, '1s') do
|
95
|
+
flush_last_action
|
96
|
+
end
|
97
|
+
|
98
|
+
log.info("Starting HTTP server [#{@host}:#{@port}]...")
|
99
|
+
http_server_create_http_server(:http_server, addr: @host, port: @port, logger: log) do |server|
|
100
|
+
server.post("/#{tag}") do |req|
|
101
|
+
data = parse_data(req.body)
|
102
|
+
route(data) if update_deployment_metrics(data)
|
103
|
+
|
104
|
+
# return HTTP 200 OK response with emtpy body
|
105
|
+
[200, { 'Content-Type' => 'text/plain' }, nil]
|
106
|
+
end
|
107
|
+
server.get("/health") do |req|
|
108
|
+
[200, { 'Content-Type' => 'application/json' }, {}.to_json]
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
private
|
114
|
+
|
115
|
+
def default_api_metrics_hash
|
116
|
+
Hash.new do |h, k|
|
117
|
+
h[k] = {
|
118
|
+
'bytes_in' => 0, 'bytes_out' => 0,
|
119
|
+
'num_requests_in' => 0, 'num_requests_out' => 0, 'num_requests_misc' => 0
|
120
|
+
}
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
def set_up_redis
|
125
|
+
host = @redis_config.host
|
126
|
+
port = @redis_config.port
|
127
|
+
db = @redis_config.db
|
128
|
+
log.info("Connecting with Redis [address: #{host}:#{port}, db: #{db}]")
|
129
|
+
@redis = Redis.new(host: host, port: port, db: db)
|
130
|
+
ready = false
|
131
|
+
until ready
|
132
|
+
sleep(1)
|
133
|
+
begin
|
134
|
+
@redis.ping
|
135
|
+
ready = true
|
136
|
+
rescue StandardError => e
|
137
|
+
log.error("Unable to connect to Redis server! ERROR: '#{e}'. Retrying...")
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
def parse_data(data)
|
143
|
+
JSON.parse(data)
|
144
|
+
rescue StandardError => e
|
145
|
+
log.debug("ERROR: #{e}")
|
146
|
+
nil
|
147
|
+
end
|
148
|
+
|
149
|
+
def route(data)
|
150
|
+
time = Fluent::Engine.now
|
151
|
+
record = { 'message' => data }
|
152
|
+
router.emit(@tag, time, record)
|
153
|
+
end
|
154
|
+
|
155
|
+
def flush_last_action
|
156
|
+
if @last_action_entry.empty?
|
157
|
+
@last_action_entry = @last_action_queue.deq.split('|')
|
158
|
+
log.debug("Dequed last action entry. #{@last_action_entry}")
|
159
|
+
else
|
160
|
+
deploymentid, last_action = @last_action_entry
|
161
|
+
@last_action_entry = [] if update_deployment_last_action(deploymentid, last_action)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
def datetime_diff_in_secs(dt_begin, dt_end)
|
166
|
+
seconds = ((dt_end - dt_begin) * 24 * 60 * 60)
|
167
|
+
seconds.to_i
|
168
|
+
end
|
169
|
+
|
170
|
+
def update_deployment_last_action(deploymentid, last_action)
|
171
|
+
key = "#{@redis_config.last_update_prefix}:#{deploymentid}"
|
172
|
+
log.debug("Checking existing last action entry [key: #{key}]")
|
173
|
+
lastval = @redis.get(key)
|
174
|
+
|
175
|
+
is_grace_period_expired = false
|
176
|
+
if lastval
|
177
|
+
curdt = DateTime.now
|
178
|
+
lastdt = DateTime.parse(lastval, FMT_DATETIME)
|
179
|
+
dt_diff_secs = datetime_diff_in_secs(lastdt, curdt)
|
180
|
+
log.debug("Current Data/Time: #{curdt}")
|
181
|
+
log.debug("Previous Date/Time: #{lastdt}")
|
182
|
+
log.debug("Date/Time diff (s): #{dt_diff_secs}")
|
183
|
+
|
184
|
+
if dt_diff_secs >= @redis_config.grace_period
|
185
|
+
is_grace_period_expired = true
|
186
|
+
log.debug("Grace period expired for last action update. [#{@redis_config.grace_period}]")
|
187
|
+
end
|
188
|
+
else
|
189
|
+
log.debug('Last action entry does not exist. It will be set for the first time.')
|
190
|
+
end
|
191
|
+
|
192
|
+
if lastdt.nil? || is_grace_period_expired
|
193
|
+
log.debug('Updating deployment last action')
|
194
|
+
last_action = DateTime.parse(last_action, FMT_DATETIME)
|
195
|
+
@redis.set(key, last_action)
|
196
|
+
log.debug("Updated last action entry [#{key} => #{last_action}]")
|
197
|
+
true
|
198
|
+
else
|
199
|
+
false
|
200
|
+
end
|
201
|
+
rescue StandardError => e
|
202
|
+
log.error("Unable to update last action! ERROR: '#{e}'.")
|
203
|
+
false
|
204
|
+
end
|
205
|
+
|
206
|
+
def enque_last_action_entry(deploymentid)
|
207
|
+
last_action = DateTime.now
|
208
|
+
entry = "#{deploymentid}|#{last_action}"
|
209
|
+
@last_action_queue.enq(entry)
|
210
|
+
log.debug("Enqued last action entry. [#{entry}]")
|
211
|
+
end
|
212
|
+
|
213
|
+
def validate_and_get_value(data_hash, key)
|
214
|
+
value = data_hash[key]
|
215
|
+
log.debug("missing '#{key}': #{data_hash.to_json}") unless value
|
216
|
+
value
|
217
|
+
end
|
218
|
+
|
219
|
+
def update_deployment_metrics(data)
|
220
|
+
return false unless data
|
221
|
+
|
222
|
+
log.debug('Updating deployment metrics')
|
223
|
+
|
224
|
+
deploymentid = validate_and_get_value(data, 'deploymentid')
|
225
|
+
return false unless deploymentid
|
226
|
+
|
227
|
+
enque_last_action_entry(deploymentid)
|
228
|
+
|
229
|
+
api_data = validate_and_get_value(data, 'api')
|
230
|
+
return false unless api_data
|
231
|
+
|
232
|
+
api_name = validate_and_get_value(api_data, 'name')
|
233
|
+
return false unless api_name
|
234
|
+
|
235
|
+
response_header_data = validate_and_get_value(data, 'responseHeader')
|
236
|
+
return false unless response_header_data
|
237
|
+
|
238
|
+
request_header_data = validate_and_get_value(data, 'requestHeader')
|
239
|
+
return false unless request_header_data
|
240
|
+
|
241
|
+
response_content_length = response_header_data['Content-Length'].to_i
|
242
|
+
response_content_length += response_header_data.to_s.length
|
243
|
+
|
244
|
+
response_is_cached = (response_header_data['X-Cache'] == 'HIT')
|
245
|
+
|
246
|
+
request_content_length = request_header_data['Content-Length'].to_i
|
247
|
+
request_content_length += request_header_data.to_s.length
|
248
|
+
|
249
|
+
update_deployment_api_metrics(deploymentid, api_name, request_content_length, response_content_length, response_is_cached)
|
250
|
+
|
251
|
+
true
|
252
|
+
end
|
253
|
+
|
254
|
+
def get_request_type(api_name)
|
255
|
+
in_apis = %w[WebUpload PutObject DeleteObject].freeze
|
256
|
+
out_apis = %w[WebDownload GetObject].freeze
|
257
|
+
return 'in' if in_apis.include?(api_name)
|
258
|
+
return 'out' if out_apis.include?(api_name)
|
259
|
+
|
260
|
+
'misc'
|
261
|
+
end
|
262
|
+
|
263
|
+
def update_deployment_api_metrics(deploymentid, api_name, request_content_length, response_content_length, response_is_cached)
|
264
|
+
log.debug('Updating deployment API metrics')
|
265
|
+
|
266
|
+
request_type = get_request_type(api_name)
|
267
|
+
log.debug("#{deploymentid}.#{api_name}: (type=#{request_type}, req_size=#{request_content_length}, res_size=#{response_content_length}, res_cache=#{response_is_cached})")
|
268
|
+
|
269
|
+
metrics = @deployment_api_metrics[deploymentid]
|
270
|
+
metrics['bytes_in'] += request_content_length
|
271
|
+
metrics['bytes_out'] += response_content_length
|
272
|
+
metrics["num_requests_#{request_type}"] += 1
|
273
|
+
@deployment_api_metrics[deploymentid] = metrics
|
274
|
+
end
|
275
|
+
|
276
|
+
def flush_api_metrics
|
277
|
+
return if @deployment_api_metrics.empty?
|
278
|
+
|
279
|
+
log.debug("Flushing metrics: #{@deployment_api_metrics}")
|
280
|
+
|
281
|
+
begin
|
282
|
+
@redis.pipelined do
|
283
|
+
@deployment_api_metrics.each do |deploymentid, metrics|
|
284
|
+
metrics.each do |metric, value|
|
285
|
+
@redis.incrby("#{@redis_config.metrics_prefix}:#{deploymentid}:#{metric}", value) if value.positive?
|
286
|
+
end
|
287
|
+
end
|
288
|
+
end
|
289
|
+
|
290
|
+
@deployment_api_metrics = default_api_metrics_hash
|
291
|
+
|
292
|
+
log.debug('Flushing complete!')
|
293
|
+
rescue StandardError => e
|
294
|
+
log.error("Unable to flush metrics! ERROR: '#{e}'.")
|
295
|
+
end
|
296
|
+
end
|
297
|
+
end
|
298
|
+
end
|
299
|
+
end
|
data/test/helper.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen-string-literal: true
|
2
|
+
|
3
|
+
require 'simplecov'
|
4
|
+
SimpleCov.start
|
5
|
+
|
6
|
+
$LOAD_PATH.unshift(File.expand_path('..', __dir__))
|
7
|
+
require 'test-unit'
|
8
|
+
require 'fluent/test'
|
9
|
+
require 'fluent/test/driver/input'
|
10
|
+
require 'fluent/test/helpers'
|
11
|
+
|
12
|
+
Test::Unit::TestCase.include(Fluent::Test::Helpers)
|
13
|
+
Test::Unit::TestCase.extend(Fluent::Test::Helpers)
|
data/test/logs.txt
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
|
2
|
+
{}
|
3
|
+
{"version":"1","deploymentid":"docker-compose-https","time":"2020-12-13T09:59:53.452955009Z","api":{"name":"WebUpload","bucket":"test","object":"test2/pray.svg","status":"OK","statusCode":200,"timeToResponse":"2245254ns"},"remotehost":"172.20.0.1","requestID":"16503E531076BE1D","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","requestClaims":{"accessKey":"12345678","exp":1607939949,"sub":"12345678"},"requestHeader":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Accept-Language":"en-US,en;q=0.9,he;q=0.8,lb;q=0.7,de;q=0.6","Authorization":"Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiIxMjM0NTY3OCIsImV4cCI6MTYwNzkzOTk0OSwic3ViIjoiMTIzNDU2NzgifQ.zXmWWBSu6PCh1UP-aPALSo4BrVFaHtuH6Gk33927fdc-VvDxIa6TYc6gKVdB6UOlmPMYAOenapyJ_36W5iXIsw","Content-Length":"5982","Content-Type":"image/svg+xml","Origin":"https://local.cwm-worker-minio:8443","Referer":"https://local.cwm-worker-minio:8443/minio/test/test2/","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","X-Amz-Date":"20201213T095953Z"},"responseHeader":{"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Origin":"https://local.cwm-worker-minio:8443","Access-Control-Expose-Headers":"Date, Etag, Server, Connection, Accept-Ranges, Content-Range, Content-Encoding, Content-Length, Content-Type, Content-Disposition, Last-Modified, Content-Language, Cache-Control, Retry-After, X-Amz-Bucket-Region, Expires, X-Amz*, X-Amz*, *","Content-Security-Policy":"block-all-mixed-content","ETag":"","Vary":"Origin","X-Amz-Request-Id":"16503E531076BE1D","X-Xss-Protection":"1; mode=block"}}
|
4
|
+
{"version":"1","deploymentid":"docker-compose-https","time":"2020-12-13T10:00:11.162262185Z","api":{"name":"WebUpload","bucket":"test2","object":"Misc.csv","status":"OK","statusCode":200,"timeToResponse":"2414404ns"},"remotehost":"172.20.0.1","requestID":"16503E573002726A","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","requestClaims":{"accessKey":"12345678","exp":1607939949,"sub":"12345678"},"requestHeader":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Accept-Language":"en-US,en;q=0.9,he;q=0.8,lb;q=0.7,de;q=0.6","Authorization":"Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiIxMjM0NTY3OCIsImV4cCI6MTYwNzkzOTk0OSwic3ViIjoiMTIzNDU2NzgifQ.zXmWWBSu6PCh1UP-aPALSo4BrVFaHtuH6Gk33927fdc-VvDxIa6TYc6gKVdB6UOlmPMYAOenapyJ_36W5iXIsw","Content-Length":"867","Content-Type":"text/csv","Origin":"https://local.cwm-worker-minio:8443","Referer":"https://local.cwm-worker-minio:8443/minio/test2/","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","X-Amz-Date":"20201213T100011Z"},"responseHeader":{"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Origin":"https://local.cwm-worker-minio:8443","Access-Control-Expose-Headers":"Date, Etag, Server, Connection, Accept-Ranges, Content-Range, Content-Encoding, Content-Length, Content-Type, Content-Disposition, Last-Modified, Content-Language, Cache-Control, Retry-After, X-Amz-Bucket-Region, Expires, X-Amz*, X-Amz*, *","Content-Security-Policy":"block-all-mixed-content","ETag":"","Vary":"Origin","X-Amz-Request-Id":"16503E573002726A","X-Xss-Protection":"1; mode=block"}}
|
5
|
+
{"version":"1","deploymentid":"docker-compose-https","time":"2020-12-13T10:00:11.163519081Z","api":{"name":"WebUpload","bucket":"test2","object":"Constru.csv","status":"OK","statusCode":200,"timeToResponse":"2857463ns"},"remotehost":"172.20.0.1","requestID":"16503E57300F4542","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","requestClaims":{"accessKey":"12345678","exp":1607939949,"sub":"12345678"},"requestHeader":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Accept-Language":"en-US,en;q=0.9,he;q=0.8,lb;q=0.7,de;q=0.6","Authorization":"Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiIxMjM0NTY3OCIsImV4cCI6MTYwNzkzOTk0OSwic3ViIjoiMTIzNDU2NzgifQ.zXmWWBSu6PCh1UP-aPALSo4BrVFaHtuH6Gk33927fdc-VvDxIa6TYc6gKVdB6UOlmPMYAOenapyJ_36W5iXIsw","Content-Length":"844","Content-Type":"text/csv","Origin":"https://local.cwm-worker-minio:8443","Referer":"https://local.cwm-worker-minio:8443/minio/test2/","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","X-Amz-Date":"20201213T100011Z"},"responseHeader":{"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Origin":"https://local.cwm-worker-minio:8443","Access-Control-Expose-Headers":"Date, Etag, Server, Connection, Accept-Ranges, Content-Range, Content-Encoding, Content-Length, Content-Type, Content-Disposition, Last-Modified, Content-Language, Cache-Control, Retry-After, X-Amz-Bucket-Region, Expires, X-Amz*, X-Amz*, *","Content-Security-Policy":"block-all-mixed-content","ETag":"","Vary":"Origin","X-Amz-Request-Id":"16503E57300F4542","X-Xss-Protection":"1; mode=block"}}
|
6
|
+
{"version":"1","deploymentid":"docker-compose-https","time":"2020-12-13T10:00:11.164228465Z","api":{"name":"WebUpload","bucket":"test2","object":"Hasadna.csv","status":"OK","statusCode":200,"timeToResponse":"3569188ns"},"remotehost":"172.20.0.1","requestID":"16503E57300F3E83","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","requestClaims":{"accessKey":"12345678","exp":1607939949,"sub":"12345678"},"requestHeader":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Accept-Language":"en-US,en;q=0.9,he;q=0.8,lb;q=0.7,de;q=0.6","Authorization":"Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiIxMjM0NTY3OCIsImV4cCI6MTYwNzkzOTk0OSwic3ViIjoiMTIzNDU2NzgifQ.zXmWWBSu6PCh1UP-aPALSo4BrVFaHtuH6Gk33927fdc-VvDxIa6TYc6gKVdB6UOlmPMYAOenapyJ_36W5iXIsw","Content-Length":"2074","Content-Type":"text/csv","Origin":"https://local.cwm-worker-minio:8443","Referer":"https://local.cwm-worker-minio:8443/minio/test2/","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","X-Amz-Date":"20201213T100011Z"},"responseHeader":{"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Origin":"https://local.cwm-worker-minio:8443","Access-Control-Expose-Headers":"Date, Etag, Server, Connection, Accept-Ranges, Content-Range, Content-Encoding, Content-Length, Content-Type, Content-Disposition, Last-Modified, Content-Language, Cache-Control, Retry-After, X-Amz-Bucket-Region, Expires, X-Amz*, X-Amz*, *","Content-Security-Policy":"block-all-mixed-content","ETag":"","Vary":"Origin","X-Amz-Request-Id":"16503E57300F3E83","X-Xss-Protection":"1; mode=block"}}
|
7
|
+
{"version":"1","deploymentid":"docker-compose-https","time":"2020-12-13T10:00:11.166982552Z","api":{"name":"WebUpload","bucket":"test2","object":"personal.csv","status":"OK","statusCode":200,"timeToResponse":"3350434ns"},"remotehost":"172.20.0.1","requestID":"16503E57303C9CA9","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","requestClaims":{"accessKey":"12345678","exp":1607939949,"sub":"12345678"},"requestHeader":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Accept-Language":"en-US,en;q=0.9,he;q=0.8,lb;q=0.7,de;q=0.6","Authorization":"Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiIxMjM0NTY3OCIsImV4cCI6MTYwNzkzOTk0OSwic3ViIjoiMTIzNDU2NzgifQ.zXmWWBSu6PCh1UP-aPALSo4BrVFaHtuH6Gk33927fdc-VvDxIa6TYc6gKVdB6UOlmPMYAOenapyJ_36W5iXIsw","Content-Length":"1300","Content-Type":"text/csv","Origin":"https://local.cwm-worker-minio:8443","Referer":"https://local.cwm-worker-minio:8443/minio/test2/","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","X-Amz-Date":"20201213T100011Z"},"responseHeader":{"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Origin":"https://local.cwm-worker-minio:8443","Access-Control-Expose-Headers":"Date, Etag, Server, Connection, Accept-Ranges, Content-Range, Content-Encoding, Content-Length, Content-Type, Content-Disposition, Last-Modified, Content-Language, Cache-Control, Retry-After, X-Amz-Bucket-Region, Expires, X-Amz*, X-Amz*, *","Content-Security-Policy":"block-all-mixed-content","ETag":"","Vary":"Origin","X-Amz-Request-Id":"16503E57303C9CA9","X-Xss-Protection":"1; mode=block"}}
|
8
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:28.146379165Z","api":{"name":"PutObject","bucket":"warp-benchmark-bucket","object":"XTSAfFmC/wmAgfs(Y5gfvrUvH.rnd","status":"OK","statusCode":200,"timeToResponse":"5600028ns"},"remotehost":"172.20.0.1","requestID":"16503E7714B596E7","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length,Signature=f9617e6380d377f96574e8789b369de3e3c1873a5142ab43a94da2df845195db","Content-Length":"10415","Content-Type":"application/octet-stream","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"STREAMING-AWS4-HMAC-SHA256-PAYLOAD","X-Amz-Date":"20201213T100228Z","X-Amz-Decoded-Content-Length":"10240"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"0","Content-Security-Policy":"block-all-mixed-content","ETag":"7567b673c6b45518b054f71053745bbb","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E7714B596E7","X-Xss-Protection":"1; mode=block"}}
|
9
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:28.148376209Z","api":{"name":"PutObject","bucket":"warp-benchmark-bucket","object":"MpIBxAbZ/19VPLXm3I2ucVYIa.rnd","status":"OK","statusCode":200,"timeToResponse":"4019987ns"},"remotehost":"172.20.0.1","requestID":"16503E7714EC5781","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length,Signature=6b9fe765f9d66be6e4f31ef045919d95084d6eed5c3b4100689599d8eacba174","Content-Length":"10415","Content-Type":"application/octet-stream","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"STREAMING-AWS4-HMAC-SHA256-PAYLOAD","X-Amz-Date":"20201213T100228Z","X-Amz-Decoded-Content-Length":"10240"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"0","Content-Security-Policy":"block-all-mixed-content","ETag":"1e36a820bbd64d49a99805bb704ce524","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E7714EC5781","X-Xss-Protection":"1; mode=block"}}
|
10
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:28.150866606Z","api":{"name":"PutObject","bucket":"warp-benchmark-bucket","object":"uPe9zwVp/TEV(fS)CtKQj9)Kk.rnd","status":"OK","statusCode":200,"timeToResponse":"6407612ns"},"remotehost":"172.20.0.1","requestID":"16503E7714EDEC3C","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length,Signature=4905027a735dbff6cee19490fe93a560bad6589255f18d347ee876229ab19331","Content-Length":"10415","Content-Type":"application/octet-stream","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"STREAMING-AWS4-HMAC-SHA256-PAYLOAD","X-Amz-Date":"20201213T100228Z","X-Amz-Decoded-Content-Length":"10240"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"0","Content-Security-Policy":"block-all-mixed-content","ETag":"103806e3c82de16ed70fc943573c4248","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E7714EDEC3C","X-Xss-Protection":"1; mode=block"}}
|
11
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:28.150997904Z","api":{"name":"PutObject","bucket":"warp-benchmark-bucket","object":"SACTQyFh/6Khq9rqx5iR9S313.rnd","status":"OK","statusCode":200,"timeToResponse":"6598556ns"},"remotehost":"172.20.0.1","requestID":"16503E7714ED097A","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length,Signature=888587f0d7a475dbc31654d9bbfb5090973057601bc4981ebe9bb3d458cb819d","Content-Length":"10415","Content-Type":"application/octet-stream","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"STREAMING-AWS4-HMAC-SHA256-PAYLOAD","X-Amz-Date":"20201213T100228Z","X-Amz-Decoded-Content-Length":"10240"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"0","Content-Security-Policy":"block-all-mixed-content","ETag":"3c226393e1fda01fba77eeee8cdfba94","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E7714ED097A","X-Xss-Protection":"1; mode=block"}}
|
12
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:28.152358033Z","api":{"name":"PutObject","bucket":"warp-benchmark-bucket","object":"U9dAIeMw/xFlwgtYWHmWDU92i.rnd","status":"OK","statusCode":200,"timeToResponse":"6643027ns"},"remotehost":"172.20.0.1","requestID":"16503E7715012723","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length,Signature=ecca35dd261dae1875de09ce62b2ffc9aa98d1734fcd1f3d3e0ca9020937d895","Content-Length":"10415","Content-Type":"application/octet-stream","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"STREAMING-AWS4-HMAC-SHA256-PAYLOAD","X-Amz-Date":"20201213T100228Z","X-Amz-Decoded-Content-Length":"10240"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"0","Content-Security-Policy":"block-all-mixed-content","ETag":"122d13e787596645b9310a6e56a51a17","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E7715012723","X-Xss-Protection":"1; mode=block"}}
|
13
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:31.307623369Z","api":{"name":"DeleteObject","bucket":"warp-benchmark-bucket","object":"DsrjeNDy/oeGegUiJWIDTWOOq.rnd","status":"No Content","statusCode":204,"timeToResponse":"1819254ns"},"remotehost":"172.20.0.1","requestID":"16503E77D15C32DB","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=25804b0b3ed5ba119fd6504f8492e2ba47a0fc2ca4f22d865592022c5728b332","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","X-Amz-Date":"20201213T100231Z"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"0","Content-Security-Policy":"block-all-mixed-content","ETag":"","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E77D15C32DB","X-Xss-Protection":"1; mode=block"}}
|
14
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:31.311626518Z","api":{"name":"DeleteObject","bucket":"warp-benchmark-bucket","object":"DsrjeNDy/(60XuwNT(uVnBWFc.rnd","status":"No Content","statusCode":204,"timeToResponse":"1070737ns"},"remotehost":"172.20.0.1","requestID":"16503E77D1A4F9F1","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=a3a705dbe6a5b8d74ec26b1961b19553571753d745c8687e08d362490dca40de","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","X-Amz-Date":"20201213T100231Z"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"0","Content-Security-Policy":"block-all-mixed-content","ETag":"","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E77D1A4F9F1","X-Xss-Protection":"1; mode=block"}}
|
15
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:31.312482136Z","api":{"name":"DeleteObject","bucket":"warp-benchmark-bucket","object":"uPe9zwVp/kSu7mJneCaD)Fuit.rnd","status":"No Content","statusCode":204,"timeToResponse":"296524ns"},"remotehost":"172.20.0.1","requestID":"16503E77D1BDD9DE","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=817281c9cb6ecc0d6f6f46949b71f7d62cf8d845c51b38c2e3a25b375ed248fd","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","X-Amz-Date":"20201213T100231Z"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"0","Content-Security-Policy":"block-all-mixed-content","ETag":"","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E77D1BDD9DE","X-Xss-Protection":"1; mode=block"}}
|
16
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:31.31500656Z","api":{"name":"DeleteObject","bucket":"warp-benchmark-bucket","object":"uPe9zwVp/CG2EVQTBBoZS(A2Q.rnd","status":"No Content","statusCode":204,"timeToResponse":"1104650ns"},"remotehost":"172.20.0.1","requestID":"16503E77D1D80933","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=50b12d8a0ea7b9aa1a6616ecbf49c49b5e96a17c39fc14b81564fc6f147f332a","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","X-Amz-Date":"20201213T100231Z"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"0","Content-Security-Policy":"block-all-mixed-content","ETag":"","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E77D1D80933","X-Xss-Protection":"1; mode=block"}}
|
17
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:31.315527682Z","api":{"name":"DeleteObject","bucket":"warp-benchmark-bucket","object":"MpIBxAbZ/BsNwtds2hjH06r2T.rnd","status":"No Content","statusCode":204,"timeToResponse":"322966ns"},"remotehost":"172.20.0.1","requestID":"16503E77D1EBE9B1","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=1fac2438b2611e1efe51cc70891a62a23534f6559dfcbf5084200c400a57cc65","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","X-Amz-Date":"20201213T100231Z"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"0","Content-Security-Policy":"block-all-mixed-content","ETag":"","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E77D1EBE9B1","X-Xss-Protection":"1; mode=block"}}
|
18
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:31.315755898Z","api":{"name":"GetObject","bucket":"warp-benchmark-bucket","object":"uPe9zwVp/xaS)33LTUGT1SqAk.rnd","status":"OK","statusCode":200,"timeToFirstByte":"547107ns","timeToResponse":"560938ns"},"remotehost":"172.20.0.1","requestID":"16503E77D1EBBD86","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=f9acf5cad5bbde784b8f15680ed50e3987a5b63231a84246ff871e7a9856b613","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","X-Amz-Date":"20201213T100231Z"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"10240","Content-Security-Policy":"block-all-mixed-content","Content-Type":"application/octet-stream","ETag":"28f85d9558fa9c2f2eca1b70dae20832","Last-Modified":"Sun, 13 Dec 2020 10:02:28 GMT","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E77D1EBBD86","X-Cache":"MISS","X-Cache-Lookup":"MISS","X-Xss-Protection":"1; mode=block"}}
|
19
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:31.316316176Z","api":{"name":"GetObject","bucket":"warp-benchmark-bucket","object":"SACTQyFh/r3VI4ADkZo2KA8MT.rnd","status":"OK","statusCode":200,"timeToFirstByte":"734869ns","timeToResponse":"750395ns"},"remotehost":"172.20.0.1","requestID":"16503E77D1F15E91","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=bba0dd4a5b46361a146631bee00a77a5c2a541979dc4ab7d0d8e3156bb2be69b","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","X-Amz-Date":"20201213T100231Z"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"10240","Content-Security-Policy":"block-all-mixed-content","Content-Type":"application/octet-stream","ETag":"adab22732f9746f00ff7c3cbe93d5a75","Last-Modified":"Sun, 13 Dec 2020 10:02:28 GMT","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E77D1F15E91","X-Cache":"MISS","X-Cache-Lookup":"MISS","X-Xss-Protection":"1; mode=block"}}
|
20
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:31.316583584Z","api":{"name":"GetObject","bucket":"warp-benchmark-bucket","object":"SACTQyFh/33lecLH841eGQqij.rnd","status":"OK","statusCode":200,"timeToFirstByte":"552973ns","timeToResponse":"1377348ns"},"remotehost":"172.20.0.1","requestID":"16503E77D1EBEB39","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=6b616c836152a0d3e342bc0c0ddcdb037185066d942e87cdac0f03de9110f2e4","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","X-Amz-Date":"20201213T100231Z"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"10240","Content-Security-Policy":"block-all-mixed-content","Content-Type":"application/octet-stream","ETag":"a074a4c7facee1c0dbb440545f7d6579","Last-Modified":"Sun, 13 Dec 2020 10:02:28 GMT","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E77D1EBEB39","X-Cache":"MISS","X-Cache-Lookup":"MISS","X-Xss-Protection":"1; mode=block"}}
|
21
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:31.317006173Z","api":{"name":"GetObject","bucket":"warp-benchmark-bucket","object":"U9dAIeMw/ZdueXA8roNczk4pp.rnd","status":"OK","statusCode":200,"timeToFirstByte":"625551ns","timeToResponse":"641906ns"},"remotehost":"172.20.0.1","requestID":"16503E77D1FD94CA","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=6695dd830a24e33807d442ea0d3dccf7b326fcb4e2fda06ee043f448743e7430","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","X-Amz-Date":"20201213T100231Z"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"10240","Content-Security-Policy":"block-all-mixed-content","Content-Type":"application/octet-stream","ETag":"8e331b8121dba9e2b449c6d2732b49f6","Last-Modified":"Sun, 13 Dec 2020 10:02:28 GMT","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E77D1FD94CA","X-Cache":"MISS","X-Cache-Lookup":"MISS","X-Xss-Protection":"1; mode=block"}}
|
22
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:31.318899032Z","api":{"name":"GetObject","bucket":"warp-benchmark-bucket","object":"U9dAIeMw/bOi8mDhPI7xkpLc(.rnd","status":"OK","statusCode":200,"timeToFirstByte":"659834ns","timeToResponse":"675772ns"},"remotehost":"172.20.0.1","requestID":"16503E77D219E810","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=70d55e185056eeb8bda0aa99a0d019c8af35d9d23cdaa1e4efb382e57f43b247","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","X-Amz-Date":"20201213T100231Z"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"10240","Content-Security-Policy":"block-all-mixed-content","Content-Type":"application/octet-stream","ETag":"12a5cae0b22eb8ddede896d51706509c","Last-Modified":"Sun, 13 Dec 2020 10:02:28 GMT","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E77D219E810","X-Cache":"MISS","X-Cache-Lookup":"MISS","X-Xss-Protection":"1; mode=block"}}
|
23
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:31.319875016Z","api":{"name":"HeadObject","bucket":"warp-benchmark-bucket","object":"uPe9zwVp/I55Vvgsvz6(s5dx(.rnd","status":"OK","statusCode":200,"timeToResponse":"375661ns"},"remotehost":"172.20.0.1","requestID":"16503E77D22D666F","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=6d01aa21d6791f12da408b9fedbe3b222b95e0b874b7899400f920e157cf371e","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","X-Amz-Date":"20201213T100231Z"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"10240","Content-Security-Policy":"block-all-mixed-content","Content-Type":"application/octet-stream","ETag":"4d851e2d1b56eda8c047c498e557b568","Last-Modified":"Sun, 13 Dec 2020 10:02:28 GMT","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E77D22D666F","X-Cache":"MISS","X-Cache-Lookup":"MISS","X-Xss-Protection":"1; mode=block"}}
|
24
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:31.322382865Z","api":{"name":"HeadObject","bucket":"warp-benchmark-bucket","object":"MpIBxAbZ/Xomp81ekJZPqDI0Y.rnd","status":"OK","statusCode":200,"timeToResponse":"298541ns"},"remotehost":"172.20.0.1","requestID":"16503E77D254DF29","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=0264ac1e81f4ae83419ea62a0c3bb238c6fffecf853d65fce16c8a43794ba60a","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","X-Amz-Date":"20201213T100231Z"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"10240","Content-Security-Policy":"block-all-mixed-content","Content-Type":"application/octet-stream","ETag":"07817607c15b8d6a52e184cc0a693680","Last-Modified":"Sun, 13 Dec 2020 10:02:28 GMT","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E77D254DF29","X-Cache":"MISS","X-Cache-Lookup":"MISS","X-Xss-Protection":"1; mode=block"}}
|
25
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:31.325077259Z","api":{"name":"HeadObject","bucket":"warp-benchmark-bucket","object":"SACTQyFh/7x7JgnxP9x3JpdAN.rnd","status":"OK","statusCode":200,"timeToResponse":"304259ns"},"remotehost":"172.20.0.1","requestID":"16503E77D27DE12B","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=3b53df8afe888f9d786c4847d6c2186e77c70ff8cb4e222dcacb65cb11ae7c88","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","X-Amz-Date":"20201213T100231Z"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"10240","Content-Security-Policy":"block-all-mixed-content","Content-Type":"application/octet-stream","ETag":"fc1d79a40d198f25c4a5448cfa82071d","Last-Modified":"Sun, 13 Dec 2020 10:02:28 GMT","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E77D27DE12B","X-Cache":"MISS","X-Cache-Lookup":"MISS","X-Xss-Protection":"1; mode=block"}}
|
26
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:31.330091282Z","api":{"name":"HeadObject","bucket":"warp-benchmark-bucket","object":"SACTQyFh/33lecLH841eGQqij.rnd","status":"OK","statusCode":200,"timeToResponse":"417243ns"},"remotehost":"172.20.0.1","requestID":"16503E77D2C8A79D","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=7a99e1b7d3eaa3f466fb5c4352f84657ab22422c2be62cc8694eccf6fbd833fc","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","X-Amz-Date":"20201213T100231Z"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"10240","Content-Security-Policy":"block-all-mixed-content","Content-Type":"application/octet-stream","ETag":"a074a4c7facee1c0dbb440545f7d6579","Last-Modified":"Sun, 13 Dec 2020 10:02:28 GMT","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E77D2C8A79D","X-Cache":"MISS","X-Cache-Lookup":"MISS","X-Xss-Protection":"1; mode=block"}}
|
27
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:02:31.330171641Z","api":{"name":"HeadObject","bucket":"warp-benchmark-bucket","object":"XTSAfFmC/6jVNqbTHjY)TMUsf.rnd","status":"OK","statusCode":200,"timeToResponse":"417005ns"},"remotehost":"172.20.0.1","requestID":"16503E77D2C9E103","userAgent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=12345678/20201213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=686a542242d464fd2787765209b2ea1d6bf711ee9d12fc9bcf6cabb4b3c936b0","User-Agent":"MinIO (linux; amd64) minio-go/v7.0.5 warp/0.3.17","X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","X-Amz-Date":"20201213T100231Z"},"responseHeader":{"Accept-Ranges":"bytes","Content-Length":"10240","Content-Security-Policy":"block-all-mixed-content","Content-Type":"application/octet-stream","ETag":"68a0d2b0c2733dfca0b6f5d37ea01b99","Last-Modified":"Sun, 13 Dec 2020 10:02:28 GMT","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503E77D2C9E103","X-Cache":"MISS","X-Cache-Lookup":"MISS","X-Xss-Protection":"1; mode=block"}}
|
28
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:27:55.410575308Z","api":{"name":"WebDownload","bucket":"test2","object":"personal.csv","status":"OK","statusCode":200,"timeToFirstByte":"539568ns","timeToResponse":"554854ns"},"remotehost":"172.20.0.1","requestID":"16503FDAAD0D3460","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","requestClaims":{"accessKey":"12345678","exp":1607855335,"sub":"12345678"},"requestQuery":{"token":"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiIxMjM0NTY3OCIsImV4cCI6MTYwNzg1NTMzNSwic3ViIjoiMTIzNDU2NzgifQ.Lr6b1NB4cydukrBF-_1StDLwR6UGsRJZlVlfRIeVlWJZVp2AAS9DMXpVueUzSOmqiNvlyCPfjsIzHC5nIjiyzw"},"requestHeader":{"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","Accept-Encoding":"gzip, deflate","Accept-Language":"en-US,en;q=0.9,he;q=0.8,lb;q=0.7,de;q=0.6","Connection":"keep-alive","Referer":"http://local.cwm-worker-minio:8080/minio/test2/","Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36"},"responseHeader":{"Accept-Ranges":"bytes","Cache-Control":"no-store","Content-Disposition":"attachment; filename=\"personal.csv\"","Content-Length":"1300","Content-Security-Policy":"block-all-mixed-content","Content-Type":"text/csv","ETag":"0ea1fa5fd9afe7f0f9519c5825f57310","Last-Modified":"Sun, 13 Dec 2020 10:00:11 GMT","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503FDAAD0D3460","X-Cache":"MISS","X-Cache-Lookup":"MISS","X-Xss-Protection":"1; mode=block"}}
|
29
|
+
{"version":"1","deploymentid":"docker-compose-http","time":"2020-12-13T10:27:57.202896957Z","api":{"name":"WebDownload","bucket":"test2","object":"Misc.csv","status":"OK","statusCode":200,"timeToFirstByte":"647394ns","timeToResponse":"667159ns"},"remotehost":"172.20.0.1","requestID":"16503FDB17E01EDE","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","requestClaims":{"accessKey":"12345678","exp":1607855337,"sub":"12345678"},"requestQuery":{"token":"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiIxMjM0NTY3OCIsImV4cCI6MTYwNzg1NTMzNywic3ViIjoiMTIzNDU2NzgifQ.8jzmcdPBPKjwCuKJLES2qtfhf7iYN-LXZz_zXU0rlCjMzbFHJI0hFF0naMtFQEA1R9Ad1WhZY8mYErqdioMonw"},"requestHeader":{"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","Accept-Encoding":"gzip, deflate","Accept-Language":"en-US,en;q=0.9,he;q=0.8,lb;q=0.7,de;q=0.6","Connection":"keep-alive","Referer":"http://local.cwm-worker-minio:8080/minio/test2/","Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36"},"responseHeader":{"Accept-Ranges":"bytes","Cache-Control":"no-store","Content-Disposition":"attachment; filename=\"Misc.csv\"","Content-Length":"867","Content-Security-Policy":"block-all-mixed-content","Content-Type":"text/csv","ETag":"b58887295950f4a7edceccab141d8c92","Last-Modified":"Sun, 13 Dec 2020 10:00:11 GMT","Server":"MinIO","Vary":"Origin","X-Amz-Request-Id":"16503FDB17E01EDE","X-Cache":"MISS","X-Cache-Lookup":"MISS","X-Xss-Protection":"1; mode=block"}}
|
@@ -0,0 +1,125 @@
|
|
1
|
+
# frozen-string-literal: true
|
2
|
+
|
3
|
+
require 'helper'
|
4
|
+
require 'fluent/plugin/in_http_cwm'
|
5
|
+
require 'net/http'
|
6
|
+
require 'json'
|
7
|
+
|
8
|
+
class CwmHttpInputTest < Test::Unit::TestCase
|
9
|
+
setup do
|
10
|
+
Fluent::Test.setup
|
11
|
+
|
12
|
+
@default_conf = config_element('ROOT', '', { 'tag' => 'test' })
|
13
|
+
@custom_conf = config_element('ROOT', '', { 'tag' => 'test' }, [
|
14
|
+
config_element('redis', '', {
|
15
|
+
'grace_period' => '1s',
|
16
|
+
'flush_interval' => '1s'
|
17
|
+
})
|
18
|
+
])
|
19
|
+
|
20
|
+
@expected_redis_output = {
|
21
|
+
'deploymentid:last_action:docker-compose-http' => '',
|
22
|
+
'deploymentid:last_action:docker-compose-https' => '',
|
23
|
+
'deploymentid:minio-metrics:docker-compose-http:bytes_in' => '61852',
|
24
|
+
'deploymentid:minio-metrics:docker-compose-https:bytes_in' => '14875',
|
25
|
+
'deploymentid:minio-metrics:docker-compose-http:bytes_out' => '112012',
|
26
|
+
'deploymentid:minio-metrics:docker-compose-https:bytes_out' => '2755',
|
27
|
+
'deploymentid:minio-metrics:docker-compose-http:num_requests_out' => '7',
|
28
|
+
'deploymentid:minio-metrics:docker-compose-http:num_requests_in' => '10',
|
29
|
+
'deploymentid:minio-metrics:docker-compose-https:num_requests_in' => '5',
|
30
|
+
'deploymentid:minio-metrics:docker-compose-http:num_requests_misc' => '5'
|
31
|
+
}.freeze
|
32
|
+
end
|
33
|
+
|
34
|
+
def create_driver(conf)
|
35
|
+
Fluent::Test::Driver::Input.new(Fluent::Plugin::CwmHttpInput).configure(conf)
|
36
|
+
end
|
37
|
+
|
38
|
+
sub_test_case 'configuration' do
|
39
|
+
test 'default configuration test' do
|
40
|
+
driver = create_driver(@default_conf)
|
41
|
+
plugin = driver.instance
|
42
|
+
assert_equal Fluent::Plugin::CwmHttpInput, plugin.class
|
43
|
+
assert_equal 'localhost', plugin.host
|
44
|
+
assert_equal 8080, plugin.port
|
45
|
+
end
|
46
|
+
|
47
|
+
test 'redis default configuration test' do
|
48
|
+
driver = create_driver(@default_conf)
|
49
|
+
plugin = driver.instance
|
50
|
+
redis = plugin.redis_config
|
51
|
+
assert_equal 'localhost', redis.host
|
52
|
+
assert_equal 6379, redis.port
|
53
|
+
assert_equal '300s', redis.grace_period
|
54
|
+
assert_equal '300s', redis.flush_interval
|
55
|
+
assert_equal 'deploymentid:last_action', redis.last_update_prefix
|
56
|
+
assert_equal 'deploymentid:minio-metrics', redis.metrics_prefix
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
sub_test_case 'route#emit' do
|
61
|
+
test 'emit test' do
|
62
|
+
driver = create_driver(@custom_conf)
|
63
|
+
plugin = driver.instance
|
64
|
+
redis = plugin.redis_config
|
65
|
+
|
66
|
+
res_codes = []
|
67
|
+
lines = 0
|
68
|
+
health_res_code = ''
|
69
|
+
health_res_body = ''
|
70
|
+
|
71
|
+
driver.run do
|
72
|
+
health_res = get('/health')
|
73
|
+
health_res_code = health_res.code
|
74
|
+
health_res_body = health_res.body
|
75
|
+
File.readlines('./test/logs.txt').each do |line|
|
76
|
+
res = post('/test', line.chomp)
|
77
|
+
res_codes << res.code
|
78
|
+
lines += 1
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
assert_equal lines, res_codes.size
|
83
|
+
assert_equal '200', res_codes[0]
|
84
|
+
assert_equal 1, res_codes.uniq.size
|
85
|
+
|
86
|
+
assert_equal '200', health_res_code
|
87
|
+
assert_equal ({}), JSON.parse(health_res_body)
|
88
|
+
|
89
|
+
# run and test private flushing methods
|
90
|
+
`redis-cli FLUSHALL`
|
91
|
+
sleep(redis.grace_period)
|
92
|
+
driver.events.each do
|
93
|
+
plugin.send(:flush_api_metrics)
|
94
|
+
plugin.send(:flush_last_action)
|
95
|
+
end
|
96
|
+
|
97
|
+
# verify from Redis server
|
98
|
+
@expected_redis_output.each do |key, expected_value|
|
99
|
+
if key.include? 'last_action'
|
100
|
+
exists = `redis-cli EXISTS #{key}`.chomp
|
101
|
+
assert_equal '1', exists
|
102
|
+
else
|
103
|
+
actual_value = `redis-cli GET #{key}`.chomp
|
104
|
+
assert_equal expected_value, actual_value
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
private
|
111
|
+
|
112
|
+
def post(path, body)
|
113
|
+
http = Net::HTTP.new('127.0.0.1', 8080)
|
114
|
+
header = { 'Content-Type' => 'application/json' }
|
115
|
+
req = Net::HTTP::Post.new(path, header)
|
116
|
+
req.body = body
|
117
|
+
http.request(req)
|
118
|
+
end
|
119
|
+
|
120
|
+
def get(path)
|
121
|
+
http = Net::HTTP.new('127.0.0.1', 8080)
|
122
|
+
req = Net::HTTP::Get.new(path)
|
123
|
+
http.request(req)
|
124
|
+
end
|
125
|
+
end
|