File beats in docker. How to access host logs?

Hi,

I am thinking of running filebeat in a docker container. But I wanna ship logs from the host.
What is the best practice?

Use a volume to make the host logs accessible from inside of the docker container? Or how?

Thanks, Andreas

Exactly. Log files of the host are are available under /var/lib/docker/containers. You need to mount this in order to access them and use docker prospector to read.

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?

Yes, it's correct.

thanks a lot

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