Beats and Docker autodiscover - only works with container start/stop

Quick question about the filebeat and metricbeat "autodiscover" feature for Docker. Does this work with "static" containers, or does metric/log collection from within the docker container only begin if the beats notice a "start" trigger via the Docker API.

The reason I'm asking is that I have some static containers (such as elasticsearch itself in Docker) that only start if the Ubuntu server is started/rebooted. I'm not sure if the "autodiscover" feature will find containers that are already started when the beats container is started.

I guess a work-around would be to start the filebeat and metricbeat container before the reset of the application containers...

Yes, this will work. It lists the running containers when it starts up. Then after that it uses the docker events stream to observe the starts and stops.

1 Like

Documentation update: https://github.com/elastic/beats/pull/7468

1 Like

Hey thanks so much for this clarification. I'm going to experiment with autodiscover on filebeats/metricbeats today to simplify the docker monitoring.

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