{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11221","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11221/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11221/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11221/events","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/11221","id":94920651,"number":11221,"title":"Http logs for Kubernetes services","user":{"login":"pz07","id":251065,"avatar_url":"https://avatars.githubusercontent.com/u/251065?v=3","gravatar_id":"","url":"https://api.github.com/users/pz07","html_url":"https://github.com/pz07","followers_url":"https://api.github.com/users/pz07/followers","following_url":"https://api.github.com/users/pz07/following{/other_user}","gists_url":"https://api.github.com/users/pz07/gists{/gist_id}","starred_url":"https://api.github.com/users/pz07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pz07/subscriptions","organizations_url":"https://api.github.com/users/pz07/orgs","repos_url":"https://api.github.com/users/pz07/repos","events_url":"https://api.github.com/users/pz07/events{/privacy}","received_events_url":"https://api.github.com/users/pz07/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-14T11:03:52Z","updated_at":"2015-07-14T17:09:19Z","closed_at":null,"body":"I wonder if there is a way to get HTTP (access) logs for Kubernetes services. Ideally it would look similar to logs provided by HAProxy: http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#8.2.3\r\n\r\nI guess it would be helpful in investigating issues in microservices environment. "},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/121310929","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/11221#issuecomment-121310929","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11221","id":121310929,"user":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"created_at":"2015-07-14T17:09:19Z","updated_at":"2015-07-14T17:09:19Z","body":"I think the easiest way to get this is to actually just use HAProxy in place of a load balancer (some assembly required). If you're already using a load balancer, your cloud provider should be keeping the logs you desire.\r\n\r\nAt the moment, we *do* store access logs for requests that go through the apiserver's proxy; however it's not in HAProxy's format, and it's mixed in with all api calls.\r\n\r\nI don't think it makes sense to make the apiserver proxy fancy, since for production work you almost certainly want to use a load balancer/HAProxy/nginx for getting users to your services.\r\n\r\nIt *might* make sense to do something fancier with apiserver's log if there's a compelling reason for people to want to scrape it for data; it shouldn't be too hard to make it conform to any desired format, and I don't think we have strong opinions about what the format should be (other than *useful*)."}}