{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/12876","labels_url":"https://api.github.com/repos/docker/docker/issues/12876/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/12876/comments","events_url":"https://api.github.com/repos/docker/docker/issues/12876/events","html_url":"https://github.com/docker/docker/pull/12876","id":71909997,"number":12876,"title":"Add new Logging driver \"fluentd\"","user":{"login":"tagomoris","id":230654,"avatar_url":"https://avatars.githubusercontent.com/u/230654?v=3","gravatar_id":"","url":"https://api.github.com/users/tagomoris","html_url":"https://github.com/tagomoris","followers_url":"https://api.github.com/users/tagomoris/followers","following_url":"https://api.github.com/users/tagomoris/following{/other_user}","gists_url":"https://api.github.com/users/tagomoris/gists{/gist_id}","starred_url":"https://api.github.com/users/tagomoris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tagomoris/subscriptions","organizations_url":"https://api.github.com/users/tagomoris/orgs","repos_url":"https://api.github.com/users/tagomoris/repos","events_url":"https://api.github.com/users/tagomoris/events{/privacy}","received_events_url":"https://api.github.com/users/tagomoris/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/status/2-needs-code-review","name":"status/2-needs-code-review","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":65,"created_at":"2015-04-29T15:35:08Z","updated_at":"2015-06-19T01:40:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/12876","html_url":"https://github.com/docker/docker/pull/12876","diff_url":"https://github.com/docker/docker/pull/12876.diff","patch_url":"https://github.com/docker/docker/pull/12876.patch"},"body":"This patch provides `fluentd` logging plugin for docker, which is mentioned at #12540.\r\n\r\nHow to confirm behavior of this patch/new logging driver.\r\n1. Setup dev docker container\r\n2. Build repository with this patch by `make BINDDIR=. binary`\r\n3. Copy binary and execute it in debug mode `docker -dD`\r\n4. Attach from external environment by `docker exec -it kickass_heisenberg /bin/bash`\r\n5. Build/execute another docker container from other console, built on Dockerfile and configuration file below:\r\n```\r\n# sh\r\n$ docker run --net=container:kickass_heisenberg tagomoris/docker-fluentd\r\n# Dockerfile\r\nFROM kiyoto/fluentd:0.10.56-2.1.1\r\nMAINTAINER kiyoto@treausure-data.com\r\nRUN mkdir /etc/fluent\r\nADD fluent.conf /etc/fluent/\r\nENTRYPOINT [\"/usr/local/bin/fluentd\", \"-c\", \"/etc/fluent/fluent.conf\"]\r\n# fluent.conf\r\n<source>\r\n  type forward\r\n</source>\r\n<match docker.**>\r\n  type stdout\r\n</match>\r\n```\r\n6. Execute hello-world container on attached environment: `docker run --log-driver=fluentd hello-world`\r\n7. Got logs\r\n```\r\n2015-04-20 09:32:27 +0000 [info]: starting fluentd-0.10.56\r\n2015-04-20 09:32:27 +0000 [info]: reading config file path=\"/etc/fluent/fluent.conf\"\r\n2015-04-20 09:32:27 +0000 [info]: gem 'fluentd' version '0.10.56'\r\n2015-04-20 09:32:27 +0000 [info]: using configuration file: <ROOT>\r\n  <source>\r\n    type forward\r\n  </source>\r\n  <match docker.**>\r\n    type stdout\r\n  </match>\r\n</ROOT>\r\n2015-04-20 09:32:27 +0000 [info]: adding source type=\"forward\"\r\n2015-04-20 09:32:27 +0000 [info]: adding match pattern=\"docker.**\" type=\"stdout\"\r\n2015-04-20 09:32:27 +0000 [info]: listening fluent socket on 0.0.0.0:24224\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"source\":\"stdout\",\"log\":\"Hello from Docker.\"}\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"source\":\"stdout\",\"log\":\"This message shows that your installation appears to be working correctly.\"}\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"log\":\"\",\"source\":\"stdout\"}\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"source\":\"stdout\",\"log\":\"To generate this message, Docker took the following steps:\"}\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"source\":\"stdout\",\"log\":\" 1. The Docker client contacted the Docker daemon.\"}\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"source\":\"stdout\",\"log\":\" 2. The Docker daemon pulled the \\\"hello-world\\\" image from the Docker Hub.\"}\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"source\":\"stdout\",\"log\":\"    (Assuming it was not already locally available.)\"}\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"source\":\"stdout\",\"log\":\" 3. The Docker daemon created a new container from that image which runs the\"}\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"source\":\"stdout\",\"log\":\"    executable that produces the output you are currently reading.\"}\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"source\":\"stdout\",\"log\":\" 4. The Docker daemon streamed that output to the Docker client, which sent it\"}\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"source\":\"stdout\",\"log\":\"    to your terminal.\"}\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"source\":\"stdout\",\"log\":\"\"}\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"source\":\"stdout\",\"log\":\"To try something more ambitious, you can run an Ubuntu container with:\"}\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"source\":\"stdout\",\"log\":\" $ docker run -it ubuntu bash\"}\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"source\":\"stdout\",\"log\":\"\"}\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"source\":\"stdout\",\"log\":\"For more examples and ideas, visit:\"}\r\n2015-04-20 09:45:09 +0000 docker.483cb7e2cc42.stdout: {\"source\":\"stdout\",\"log\":\" http://docs.docker.com/userguide/\"}\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/113337315","html_url":"https://github.com/docker/docker/pull/12876#issuecomment-113337315","issue_url":"https://api.github.com/repos/docker/docker/issues/12876","id":113337315,"user":{"login":"tagomoris","id":230654,"avatar_url":"https://avatars.githubusercontent.com/u/230654?v=3","gravatar_id":"","url":"https://api.github.com/users/tagomoris","html_url":"https://github.com/tagomoris","followers_url":"https://api.github.com/users/tagomoris/followers","following_url":"https://api.github.com/users/tagomoris/following{/other_user}","gists_url":"https://api.github.com/users/tagomoris/gists{/gist_id}","starred_url":"https://api.github.com/users/tagomoris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tagomoris/subscriptions","organizations_url":"https://api.github.com/users/tagomoris/orgs","repos_url":"https://api.github.com/users/tagomoris/repos","events_url":"https://api.github.com/users/tagomoris/events{/privacy}","received_events_url":"https://api.github.com/users/tagomoris/received_events","type":"User","site_admin":false},"created_at":"2015-06-19T01:40:40Z","updated_at":"2015-06-19T01:40:40Z","body":"@LK4D4 just uploaded `tagomoris/docker-fluentd` is what I'm using for test of this patch\r\n@calavera squashed"}}