Docker Monitoring User Guide

General information

Overview

Docker monitoring is a Gateway configuration file that enables monitoring of Docker installations through a set of samplers with customised Toolkit plug-in settings.

This can be monitored locally or remotely. If you set up the Docker installation locally, the Docker daemon and Netprobe will run on the same machine.

If you want to monitor it remotely, then the Docker daemon Netprobe will not run on the same machine.

Track the following key areas when using Docker monitoring:

Key Area Description
Status Provides information about the containers running on the host, including their container ID, name, port information, and size.
Usage Collects performance statistics about each container and returns each container’s individual CPU and Memory utilisation information, Net IO, Block IO Information, and the configured limits.
   

This guide discusses the steps to set up the Docker integration on a Gateway. Once the integration is set up, the samplers providing the dataviews become available to that Gateway.

To view the sample metrics and dataviews, see Docker Monitoring Technical Reference.

User requirements

This monitoring template is a Gateway configuration setup that can be included in the Gateway Setup Editor.

To use this template, your configuration must meet the following requirements:

System requirements

The following requirements must be met prior to the installation and setup of the template:

  • Template package: geneos-integration-docker-<version>.zip.
  • Managed entities utilising the samplers defined in the include/DockerMonitoring.xml.
  • Netprobe version 4.5 or higher.
  • Python 2.7 or higher.

Note: This template is verified to be working with Docker version 17.12.0-ce and Centos 7.

 

Audience

This document is a reference guide to introduce templates and scripts built using the Geneos development toolkit plug-ins.

The template allows you to integrate specific applications and services to collect metrics without having to create a new plug-in.

 

Install and set up

Ensure that you have read and can follow the system requirements prior to installation and setup of this integration template.

  1. Download the config file (geneos-integration-docker-<version>.zip) from the ITRS Downloads site.
  2. Open Active Console 2.
  3. Extract the Docker monitoring configuration file into the Gateway Setup directory.
  4. Click Includes to create a new file in the Navigation panel.
  5. Enter the location of the file to include in the Location field. In this example, use the include/DockerMonitoring.xml:
  6. Note: The priority controls the importance of a file when merging. Sections in a higher priority file will take precedence over sections in a lower priority file. This priority setting affects the priority of configuration in the main setup file.

  7. Expand the file location in the Includes section.
  8. Select Click to load...
  9. Click Yes to load the new Docker include file.
  10. Click Managed entities in the Navigation panel.
  11. Add the Docker type to the Managed Entity section that you will use to monitor Docker.
  12. Click the Validate button to check your configuration.

The Validate button allows you to check if there are any errors or warnings in your configuration set-up.

Once the Gateway configuration appears in the Includes section, you can add the samplers and other variables.

 

Set up the samplers

These are the pre-configured samplers available to use in DockerMonitoring.xml.

Configure the required fields by referring to the table below:

Samplers
Docker-Usage
Docker-Status
 

Set up the variables

The DockerMonitoring.xml template provides the following variables that are set in the Environments section.

For locally installed Docker, where the Docker daemon and Netprobe are running on the same machine, refer to the table below:

Variable Description
DOCKER_PYTHON_EXE Fully qualified path to python executable.
 
Default: /usr/bin/python.
DOCKER_HOST IP/Hostname of the server where Docker daemon is running.
 
Mandatory: No
DOCKER_PORT Port where the Docker daemon is waiting for connections.
 
Mandatory: No
DOCKER_TLS_CA_CERT Refers to <path-to-file>/ca.pem
 
Mandatory: No
DOCKER_TLS_CERT Refers to <path-to-file>/cert.pem
 
Mandatory: No
DOCKER_TLS_KEY Refers to <path-to-file>/key.pem
 
Mandatory: No
   

 

For remotely installed Docker, where the Docker daemon and Netprobe are not running on the same machine, refer to the table below:

Variable Description
DOCKER_PYTHON_EXE Fully qualified path to python executable.
 
Default: /usr/bin/python
DOCKER_HOST IP/Hostname of the server where Docker daemon is running.
DOCKER_PORT Port where the Docker daemon is waiting for connections.
DOCKER_TLS_CA_CERT Refers to <path-to-file>/ca.pem
 
Mandatory: Yes
DOCKER_TLS_CERT Refers to <path-to-file>/cert.pem
 
Mandatory: Yes
DOCKER_TLS_KEY Refers to <path-to-file>/key.pem
 
Mandatory: Yes
DOCKER_TLS_AUTHENTICATION Flag whether TLS authentication should be used.
 
Default: True
   

Note: In this set-up, TLS authentication is required to be configured in the Docker daemon. The ca, cert, and key .pem files are generated separately using OpenSSL.

After checking and saving the changes, the samplers you have set in the Gateway configuration display in Active Console 2.

Set up the rules

The DockerMonitoring-SampleRules.xml template also provides a separate sample rules that you can use to configure the Gateway Setup Editor.

Your configuration rules must be set in the Includes section.

  1. Enter the location of the file to include in the Location field. In this example, use the include/DockerMonitoring-SampleRules.xml:
  2. Note: The priority controls the importance of a file when merging. Sections in a higher priority file will take precedence over sections in a lower priority file. This priority setting affects the priority of configuration in the main setup file.

  3. Expand the file location in the Include section.
  4. Select Click to load...
  5. Click Yes to load the new Docker include rules file.
  6. Click Rules in the Navigation panel to create new rules.

The table below shows the included rule set-up in the configuration file:

Rules Sample Rules
Docker-Usage cpuPercentUsage-High
memPercentUsage-High
Docker Status size-High