# コンテナ上のfilebeatのログ収集について

**URL:** https://discuss.elastic.co/t/filebeat/198264
**Category:** 日本語による質問・議論はこちら
**Created:** [September 5, 2019, 1:30pm UTC](https://discuss.elastic.co/t/filebeat/198264 "2019-09-05T13:30:04Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![tsgkdt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsgkdt/32/39151_2.png) [@tsgkdt](https://discuss.elastic.co/u/tsgkdt)
#### Post date: [September 5, 2019, 2:31pm UTC](https://discuss.elastic.co/t/filebeat/198264/2 "2019-09-05T14:31:52Z")

</div>

こんにちわ

filebeatを動かすコンテナに対して、ホストのログがある箇所をvolume mountしておけば良いかと思います。

discuss上で、ちょうど似たような質問がありましたので、下に貼ってみます。

> [@File beats in docker. How to access host logs?](https://discuss.elastic.co/t/file-beats-in-docker-how-to-access-host-logs/127313/3):
>
> thanks. I keep that in mind if I need need to ship from other containers. When I want to ship logs of classic applications from the host, which are not running in docker, then I just mount the host logfile from eg. /var/log/myapplication into the filebeat container and then I use normal file prospector in filebeat, which runs as docker, correct?

ここで、/var/log/myapplicationをfilebeatのコンテナにマウントして、filebeatコンテナではそれを読み込めば良いのかい？ と質問者が書いています。

> I just mount the host logfile from eg. /var/log/myapplication into the filebeat container and then I use normal file prospector in filebeat, which runs as docker, correct?

これに対して Yes, it's correct.と書かれてあります。

ご参考になれば幸いです。

---

_[View the full topic](https://discuss.elastic.co/t/filebeat/198264)._
