# How to capture docker logs

**URL:** <https://discuss.elastic.co/t/how-to-capture-docker-logs/107228>\
**Category:** Logstash\
**Created:** [November 10, 2017, 6:29pm UTC](https://discuss.elastic.co/t/how-to-capture-docker-logs/107228 "2017-11-10T18:29:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![obodard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/obodard/32/27575_2.png) [@obodard](https://discuss.elastic.co/u/obodard)\
**Post date:** [November 10, 2017, 6:29pm UTC](https://discuss.elastic.co/t/how-to-capture-docker-logs/107228/1 "2017-11-10T18:29:13Z")

</div>

I have Docker containers deployed under Kubernetes. I need to capture the Docker logs which are sent to its console, and I would like to avoid dumping those logs in a file for each container.

What is the best way to capture those logs for Logstash? Is the TCP plugin suitable for this or is there a better recommendation?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 8, 2017, 6:29pm UTC](https://discuss.elastic.co/t/how-to-capture-docker-logs/107228/2 "2017-12-08T18:29:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
