Hi Steve,
No, contrary to "standalone swarm" (
https://github.com/docker/swarm), "swarm mode" (i.e., the integrated swarm features introduced in docker 1.12), currently does not have a stats command to collect stats for all nodes.
There's a couple of reasons for this. First of all, Standalone Swarm and Swarm "mode" use different concepts. Standalone Swarm works by directly communicating with each node's remote API. Doing so allows it to control the daemons on those nodes, and perform any action you'd be able to perform on a conventional, single node Docker installation; including collecting stats.
While this concept works great; it doesn't scale well; on, say, a 1000 node swarm, the manager has to communicate with, and manage 1000 daemons.
For that reason (and many others), the Swarm features introduced in docker 1.12 were redesigned from scratch (through the SwarmKit project). Instead of controlling nodes directly, SwarmKit uses a distributed ("Raft") store that holds the "desired", and actual state of services. Each worker node runs an agent that is responsible for executing the tasks it gets assigned; and all communication goes through the distributed store.
In that model, there's no direct connection between the manager and each node's remote API, hence, no way to get stats. (Well, it would probably _technically_ be possible to have agents collect the stats, and store them in the distributed store)
While we're not there yet; work has started on providing metrics through a dedicated API, using the Prometheus (
https://prometheus.io/) standard. An initial implementation (limited to low level metrics from the daemon itself) will be available in the upcoming 1.13 release as an "experimental" feature, and the intent is to expand on this in future to provide more targeted metrics per application / service / container.
We're looking for feedback on this topic, so feel free to add your use case on the roadmap;
Please note that if you're currently running Standalone Swarm, nothing should change; you can still run Standalone Swarm as before on Docker 1.12 or 1.13; Docker 1.12 and up are fully backward compatible with older versions, and "swarm mode" is an optional feature.
I hope this answers your questions, but happy to provide more information if needed!
cheers,
Sebastiaan van Stijn
"thaJeztah" on GitHub