Docker Monitoring
Feature
Monitor Uptime, Performance and Usage of Docker.
Configuration

How to Enable Docker Engine API
Navigate to
/lib/systemd/system
in your terminal and opendocker.service
file$ vi /lib/systemd/system/docker.service
CODEFind the line which starts with ExecStart and adds -H=tcp://0.0.0.0:2375 to make it look like
ExecStart=/usr/bin/dockerd -H=fd:// -H=tcp://0.0.0.0:2375
CODESave the Modified File
Reload the docker daemon
$ sudo systemctl daemon-reload
CODERestart the docker service
$ sudo service docker restart
CODETest if it is working by using this command, if everything is fine below command should return a JSON
$ curl http://localhost:2375/images/json
CODETo test remotely, use the PC name or IP address of Docker Host
Run Docker commands as a non-root user
To create the docker
group and add your user:
Create the
docker
group.$ sudo groupadd docker
CODEAdd your user to the
docker
group.$ sudo usermod -aG docker $USER
CODELog out and log back in so that your group membership is re-evaluated.
On Linux, you can also run the following command to activate the changes to groups:
$ newgrp docker
CODEVerify that you can run
docker
commands withoutsudo
.$ docker ps
CODE
Component: Engine
Feature Availability: 2022.1 or later