Filebeat.autodiscover for docker container logs


(Venkatesh Radhakrishnan) #1

Hi - How to configure file beat yml to read logs of all docker containers?

Below is the configuration i am using now (Working perfectly fine) which i feel is not clean way of coding.

filebeat.autodiscover:

List of enabled autodiscover providers

providers:
- type: docker
templates:
- condition.not:
equals.docker.container.image: ABCD
config:
- type: log
paths:
- /var/lib/docker/containers/${data.docker.container.id}/*.log

Regards
Venkat


(Noémi Ványi) #2

To me it seems clean. It's simple and easy to understand.

You can use docker input for collecting logs of Docker. But it's an experimental feature: https://www.elastic.co/guide/en/beats/filebeat/6.3/filebeat-input-docker.html
It support docker specific use cases much better than log. For example on master combine_partial option is available which makes it possible to aggregate partial logs sent by Docker into one message.


(system) #3

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