Application - Docker Opspack
Docker exists as an open platform for developers and sysadmins to build, ship, and run distributed applications. Docker containers are helping drive the micro services movement by making portable, easily deployable containerized systems which are both easy to build and maintain.
Docker utilizes containers which use shared operating systems that don’t take up a large amount of system resources. Docker is comprised of both open source and commercial technologies which enables application portability across multiple environments. Linux containers have been around for years, but Docker brings them to the masses and makes them standardized and easy to use.
What You Can Monitor Copied
Our Opspack allows you to pull vital information from all of your containers and makes sure they are up and running, allowing you to monitor their resource usage such as CPU, size and memory. It also gives users the ability to monitor Docker on a per container basis, returning system statistics including container size (MB/GB), container uptime and the top
command output for each container where possible.
Service Checks Copied
Service Check | Description |
---|---|
Container CPU usage | Measures the CPU usage of each container on the Docker host |
Container memory usage | Measures the memory usage of each container on the Docker host |
Container size | Measures the size in MB/GB of each container on the Docker host |
Container top output | Returns the top command output for the given container |
Container uptime | Measures the uptime of each Docker instance on the Docker host |
List all containers | Returns a list of all containers on the Docker host which the template is applied to |
Overall status | Returns three values: total number of containers running, total number stopped and total number overall of containers running on the specified Docker host |
Setup Docker for Monitoring Copied
To allow monitoring you must enable the Docker API.
Create a startup_options.conf file Copied
Create a file at /etc/systemd/system/docker.service.d/startup_options.conf
with the following contents:
# /etc/systemd/system/docker.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://127.0.0.1:4243
Reload the unit files Copied
sudo systemctl daemon-reload
Restart the Docker daemon Copied
sudo systemctl restart docker.service
Note
For more details see Enabling the Docker API.
Setup and Configuration Copied
Add the Host Template Copied
Add the Application - Docker Host Template to your Opsview Monitor host.
Note
For more information, refer to the documentation on Adding Host Templates to Hosts.
Add and configure variables required for this host Copied
Variable | Description |
---|---|
DOCKER_CONTAINER | The Value is the name of the docker container you want to monitor. You can add multiple variables to check the status of each container on the host individually. |
Note
For more information, refer to the documentation on Adding Variables to Hosts.
Apply Changes Copied
Apply Changes and the system will then be monitored: