Hi, On 4/9/19 5:02 AM, Pavan Rallabhandi wrote:
Refer "rgw log http headers" under http://docs.ceph.com/docs/nautilus/radosgw/config-ref/ Or even better in the code https://github.com/ceph/ceph/pull/7639
Ok, thx for your help Pavan. I have progressed but I have already some problems. With the help of this comment: https://github.com/ceph/ceph/pull/7639#issuecomment-266893208 I have tried this config: ----- rgw enable ops log = true rgw ops log socket path = /tmp/opslog rgw log http headers = http_x_forwarded_for ----- and I have logs in the socket /tmp/opslog like this: ----- {"bucket":"test1","time":"2019-04-09 09:41:18.188350Z","time_local":"2019-04-09 11:41:18.188350","remote_addr":"10.111.222.51","user":"flaf","operation":"GET","uri":"GET /?prefix=toto/&delimiter=%2F HTTP/1.1","http_status":"200","error_code":"","bytes_sent":832,"bytes_received":0,"object_size":0,"total_time":39,"user_agent":"DragonDisk 1.05 ( http://www.dragondisk.com )","referrer":"","http_x_headers":[{"HTTP_X_FORWARDED_FOR":"10.111.222.55"}]}, ----- I can see the IP address of the client in the value of HTTP_X_FORWARDED_FOR, that's cool. But I don't understand why there is a specific socket to log that? I'm using radosgw in a Docker container (installed via ceph-ansible) and I have logs of the "radosgw" daemon in the "/var/log/syslog" file of my host (I'm using the Docker "syslog" log-driver). 1. Why is there a _separate_ log source for that? Indeed, in "/var/log/syslog" I have already some logs of civetweb. For instance: 2019-04-09 12:33:45.926 7f02e021c700 1 civetweb: 0x55876dc9c000: 10.111.222.51 - - [09/Apr/2019:12:33:45 +0200] "GET /?prefix=toto/&delimiter=%2F HTTP/1.1" 200 1014 - DragonDisk 1.05 ( http://www.dragondisk.com ) 2. In my Docker container context, is it possible to put the logs above in the file "/var/log/syslog" of my host, in other words is it possible to make sure to log this in stdout of the daemon "radosgw"? -- flaf _______________________________________________ ceph-users mailing list ceph-users@xxxxxxxxxxxxxx http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com