Search⌘ K

Troubleshooting

Explore how to troubleshoot Docker Swarm services by inspecting logs from multiple replicas using the docker service logs command. Understand how to configure and use various Docker log drivers, including json-file and syslog, to manage and follow log outputs effectively. Learn to tailor logging with command flags for better service monitoring.

We'll cover the following...

Service logs

You can inspect a service’s logs with the docker service logs command. It gathers the logs from every replica and displays them in a single output.

If you’ve been following along, you’ll have a service called uber-svc with 12 replicas mapped to a port 8080 on every cluster node. Open a browser tab to the IP address of any cluster node on the port 8080 and refresh the page a few times.

Now run a docker service logs command ...