docker stats in Swarm mode?
Solution 1:
Try Ansible:
ansible docker -a "docker stats --no-stream"
Where you setup your "docker" nodes in /etc/ansible/hosts
Solution 2:
There's no direct way to retrieve all container stats of a given service in a Swarm. You'll probably have to use more steps to discover all tasks of a service, all node addresses, and each container id. The engine api docs should help you getting started. If you need some inspiration, I'd suggest you to peek into such overview dashboards like the https://github.com/charypar/swarm-dashboard or the https://github.com/dockersamples/docker-swarm-visualizer.