Feature #19917
closedradosgw access log is lacking useful information
0%
Description
Currently a typical log entry looks like this:
2017-05-12 11:59:20.322942 7f5974ff9700 1 civetweb: 0x7f59fc0014d0: 10.80.0.6 - - [12/May/2017:11:59:20 +0000] "GET / HTTP/1.1" 200 0 - -
There are multiple issues with this:
1. The response size (the number after the "200" status code) is always show as 0, even if data is returned to the client.
2. There is no indication about the "Host" header, so one cannot tell whether this is a list_bucket or a list_buckets request. For the former, it would also be interesting to know which bucket is being targeted, similar for object operations.
3. The user id or name is not shown.
4. As an additional bonus, it would also be nice to should the time it took to serve this request.
Some of this information can be collected from other log entries if one increases the log level, but on a high volume site serving hundreds of requests per second, this is impractical. One can compute the answer to 4. from the req start/done log entries that are included in the default logging, but it still would require some post-processing to take place.
Updated by Jens Harbott almost 7 years ago
This patch in civetweb upstream seems to be fixing issue #1.
Updated by Jens Harbott almost 7 years ago
Updated by Jens Harbott almost 7 years ago
Pushed some initial code for the other information items at https://github.com/cloudbau/ceph/tree/wip-rgw-logging, help appreciated. Sample output:
2017-05-22 14:37:40.909101 7f771fa79700 1 ====== req done req=0x7f771fa73970 op status=0 op_name=get_obj http_status=200 domain=localhost request_uri=/test/test2 duration=0.002737 ======