Filebeat doesn't accept logs with container name

Hi,

We are using Docker to deploy microservice. Every time when we run a new container. Its id will be changed. Default logs path looks like /var/lib/docker/containers/<container-id>/<container-id>-json.log. We are using the ELK stack for logs pipeline. filebeat read the logs through container-id or path.
Is there any way to use container-name rather than container-id or anything else to make it dynamic?

1 Like

This is a good feature to have to make the docker deployment easy otherwise the inputs need to change after one container is down. Which is really a pain.

You can use processor for this.

processors:
  - add_docker_metadata: ~

Thanks, Its working for me.

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