Is there support for selecting containers other than by container id?

docker

(David) #1

I want to apply a prospector to only some of the docker containers I am running. However, it appears that the only way to select the containers in the prospector yml config is to specify container.ids which only matches on the container id. What would be really helpful is to match on either container name or a label on the docker image. Is there any way to do this currently? If not, is there any planned support for this?


(Shaunak Kashyap) #2

Yes, it's possible to specify matching conditions for fields other than container IDs. This doc gives you an idea of how to do that: https://www.elastic.co/guide/en/beats/filebeat/current/configuration-autodiscover.html.