{"_id":"58250a3f3179ce0f007687bf","category":{"_id":"57ae593a7c93fa0e001e6b50","__v":0,"project":"56ba46e2ce5d540d00e2d7a7","version":"56ba46e2ce5d540d00e2d7aa","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-08-12T23:18:18.323Z","from_sync":false,"order":4,"slug":"platforms","title":"Platforms"},"__v":0,"parentDoc":null,"project":"56ba46e2ce5d540d00e2d7a7","user":"5732062ad720220e008ea1d2","version":{"_id":"56ba46e2ce5d540d00e2d7aa","project":"56ba46e2ce5d540d00e2d7a7","__v":12,"createdAt":"2016-02-09T20:06:58.727Z","releaseDate":"2016-02-09T20:06:58.727Z","categories":["56ba46e3ce5d540d00e2d7ab","5771a6b145c7080e0072927f","5771a72eb0ea6b0e006a5221","5772e5b20a6d610e00dea073","577c3006b20f211700593629","57ae587bca3e310e00538155","57ae593a7c93fa0e001e6b50","57b1f8263ff6c519005cf074","582601f155b1060f00ec4173","582a62857a96051b0070b011","58ebfae58d5a860f00851fb9","590a75a1ec0d5e190095ab38"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-11-11T00:01:03.378Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"The LogDNA Docker integration relies on [LogSpout](https://github.com/gliderlabs/logspout), a log router for Docker containers. LogSpout utilizes syslog to send your Docker container log lines to your LogDNA account. \n\n##Setup Instructions\n\nTo set up Docker, follow the instructions below:\n\n1. Provision a syslog port for Docker. You can do so from the Docker section of the [add log source instructions](https://app.logdna.com/pages/add-host) modal available in the LogDNA web app.\n\n2. Run the following LogSpout command:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sudo docker run --name=\\\"logdna\\\" --restart=always \\\\\\n-d -v=/var/run/docker.sock:/var/run/docker.sock \\\\\\n-e SYSLOG_STRUCTURED_DATA=\\\"logdna:::at:::48950 tag=\\\\\\\"docker\\\\\\\"\\\" \\\\\\ngliderlabs/logspout syslog+tcp://syslog-a.logdna.com:<YOUR_PROVISIONED_PORT>\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nPro tip: You can change the default docker host tag to any string you like, and even use multiple tags by separating them with a comma (,). Host tags are used to populate [dynamic groups](https://docs.logdna.com/docs/filters#section-dynamic-groups), which are shown under the All Sources filter.","excerpt":"","slug":"docker","type":"basic","title":"Docker"}
The LogDNA Docker integration relies on [LogSpout](https://github.com/gliderlabs/logspout), a log router for Docker containers. LogSpout utilizes syslog to send your Docker container log lines to your LogDNA account. ##Setup Instructions To set up Docker, follow the instructions below: 1. Provision a syslog port for Docker. You can do so from the Docker section of the [add log source instructions](https://app.logdna.com/pages/add-host) modal available in the LogDNA web app. 2. Run the following LogSpout command: [block:code] { "codes": [ { "code": "sudo docker run --name=\"logdna\" --restart=always \\\n-d -v=/var/run/docker.sock:/var/run/docker.sock \\\n-e SYSLOG_STRUCTURED_DATA=\"logdna@48950 tag=\\\"docker\\\"\" \\\ngliderlabs/logspout syslog+tcp://syslog-a.logdna.com:<YOUR_PROVISIONED_PORT>", "language": "shell" } ] } [/block] Pro tip: You can change the default docker host tag to any string you like, and even use multiple tags by separating them with a comma (,). Host tags are used to populate [dynamic groups](https://docs.logdna.com/docs/filters#section-dynamic-groups), which are shown under the All Sources filter.