Welcome to docs.opsview.com

Setup and configuration

With the release of Opsview 4.6.3, we have introduced the monitoring of Docker hosts and containers as standard. This ability is implemented as a separate template named 'Application - Docker' which should be applied to all hosts which have Docker installed (and an Opsview agent!).

  1. Configure Docker to allow monitoring

    Note To enable the Docker API on SystemD, we had to modify the file, /lib/systemd/system/docker.service. Change the execute line to:

    ExecStart=/usr/bin/docker -d -H -H unix:///var/run/docker.sock

    This makes the deamon start listening on port 4243 (Note that we have only shared this locally as it is not secure in this state).

    Note Docker 1.5+ update: After upgrading to the latest version (1.5.0) these settings were overwritten. After re-enabling them we had to run the command “systemctl daemon-reload” to make them take effect.
    For other Linux distributions you will need to modify the file, /etc/default/docker. Modify the DOCKER_OPTS line to:

    DOCKER_OPTS="--dns -H -H unix:///var/run/docker.sock"

    Naturally, change the DNS server to suit your environment. After which restart the docker service. These steps enable the plugin to connect and monitor Docker. We recommend only exposing docker on for security purposes.
  2. Apply the host template:
    Host template
    Add your docker host, i.e., and apply the 'Application - Docker' template to it.
  3. Add the attributes:
    Host attributes
    Navigate to the 'Attributes' tab and add a DOCKER_CONTAINER attribute for each container. Add the containers name in the value field.
  4. Reload and monitor:

Optional: Modify the Docker options

Docker options

If your Docker hosts listen on a different port or a different URL (or you want to change the default time out value for each service check from 15 seconds), then modify DOCKER_OPTS. Changing the global attributes values means the values you set will apply to ALL checks. If you wish to change the port, for example, on a single docker host then apply the DOCKER_OPTS attribute and override the Port as below:

Docker attributes