You are here

Docker Monitoring

Requires Opsview Cloud or Opsview Monitor 6
check_circle
Opsview Supported

Docker Monitoring

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 on Docker

Our Opspack allows you to pull vital information from all of your Docker 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 Docker monitoring 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.

You can use this Opspack for Docker monitoring along with our Kubernetes Opspack to maintain complete visibility over your container environment.

Service Checks

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 Monitoring

To allow monitoring you must enable the Docker API.

Step 1: Create a startup_options.conf file

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

Step 2: Reload the unit files

$ sudo systemctl daemon-reload

Step 3: Restart the Docker daemon

$ sudo systemctl restart docker.service

For more details see Enabling the Docker API.

Docker Monitoring Configuration

To configure and utilize this Opspack, you simply need to add the 'Application - Docker' Opspack to your Opsview Monitor system.

Step 1: Add the host template

Add the Application - Docker Host Template to your Opsview Monitor host.

For more information, refer to Opsview Knowledge Center - Adding Host Templates to Hosts.

Step 2: Add and configure variables required for this host

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.

For more information, refer to Opsview Knowledge Center - Adding Variables to Hosts.

Step 3: Apply changes and the system will now be monitored

Docker Service Checks