I have a few questions on the new docker swarm mode. We set up a demo cluster to try out the latest features and now we want to monitor what is going on inside our cluster, like which container/service/stack runs on which node. Is there a way to get the logs of a specific container via the swarm interface without connecting directly to the docker host that is running the container? Can we log a whole service / stack at once?
I’m also curious on the answer to this question. In the meantime if you’re just testing things out locally miniswarm allows you to do this easily. Here’s what it looks like in action: https://youtu.be/in1ItGKDr98?t=5m15s
I’m basically, looping over the output of
docker service ps service and doing a docker logs on that particular machine.
Might be worthwhile to subscribe to this docker github issue: 24812 (Chat wouldn’t let me create another link)
BTW, as noted there is no
docker service logs type command today (though you can see relevant issues in swarmkit, so it’s being tracked), but I think you can use the Docker built-in logging drivers (e.g.
gelf) per-service as well as per-node (via daemon configuration)