The first task is to enable the new experimental flag that will enable the metrics feature and define the metrics address to listen on localhost:4444.
The command below will update the systemd configuration used to start Docker to set the flags when the daemon starts and then restarts Docker.
sed -i 's/dockerd/dockerd --experimental --metrics-addr localhost:9323/g' /etc/systemd/system/docker.service
systemctl restart docker
The metrics endpoint will be accessible once Docker has begun. You can see the raw metrics using
These metrics are outputted in the Prometheus format and designed to be scraped by a Prometheus server which will launch in the next steps.