You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Label com.docker.swarm.service.name was generated automatically by swarm when Creating the service. In this case, it will be the name of the service: smallredspot. So all the 5 containers' logs will goes into the smallredspot-* index following the logic. It works as expected till now.
3. Update the smallredspot service
docker service update --force smallredspot
This instruction will first stop and kill the container, then remove it and run a new one with new metadata but the service name will not change. Problem comes : a strange index is created on elasticsearch:
And the message is
It seems the last log line while the container is shutting down. But the container's metadata is missing. Due to this the log goes into wrong place and will not be shown in smallredspot-* index.
The text was updated successfully, but these errors were encountered:
Environment:
filebeat version: 6.0.0-beta1(containerized)
Operating System: CentOS 7.3, Docker-ce 17.06
As it is described at https://discuss.elastic.co/t/filebeat-miss-metadata-of-docker-container-when-container-stops/98037, filebeat failed to resolve the container's metadata information when the container stops. Ping @exekias
Here are the steps to reproduce:
docker service create --name smallredspot \ --replicas 5 \ --network dev \ --detach=false \ myregistry.sample.com:5000/smallredspot:latest
The smallredspot is a simple java springboot container which will print multiline logs to stdout.
2. Create a filebeat service to collect the logs:
And the filebeat.yml:
Also logstash.conf
Label
com.docker.swarm.service.name
was generated automatically by swarm when Creating the service. In this case, it will be the name of the service: smallredspot. So all the 5 containers' logs will goes into thesmallredspot-*
index following the logic. It works as expected till now.3. Update the smallredspot service
This instruction will first stop and kill the container, then remove it and run a new one with new metadata but the service name will not change. Problem comes : a strange index is created on elasticsearch:
And the message is
It seems the last log line while the container is shutting down. But the container's metadata is missing. Due to this the log goes into wrong place and will not be shown in smallredspot-* index.
The text was updated successfully, but these errors were encountered: