Name and Version
Docker Monitor Plugin v1.0.9
Asad Ali (firstname.lastname@example.org)
Retrieves CPU, memory and network stats from Docker containers via the Docker Remote API
Retrieves CPU, memory and network stats from Docker containers via the Docker Remote API. It retrieves the following metrics using the REST API
For all the delta calculations, the plugin does a diff between the current value and the previous value. For memoryUsage, it calculates the value by using (usage *100) / limit.
The monitor can run in three different modes: 1. TCP Port 2. Unix Socket - SSH 3. Unix Socket - Local
- TCP Port: If the docker daemon binds to a TCP Port, use this option and provide the port number the docker daemon is listening on.
Unix Socket - SSH: By default, docker daemon binds to a Unix socket (/var/run/docker.sock). If the docker daemon is using the default binding, you can collect metrics data from a collector that is running on a different host than the docker deaemon by using the Unix Socket - SSH option. For this option to work, ensure that
- Netcat utility "nc" is installed on the docker host machine.
- The userId provided in the monitor has sudo access.
Unix Socket - Local: By default, docker daemon binds to a Unix socket (/var/run/docker.sock). If the docker daemon is using the default binding, you can collect metrics data from a collector that is running on the same host as the docker daemon by using the Unix Socket - Local option. This monitor will not work if you run the collector inside the docker container. The collector has to run on the host machine running the Docker daemon. There is no need to install Netcat "nc" utility on the host machine.
This monitor plugin works for docker daemon running on any flavor of 64-bit Linux host.
This monitor can gather statistical information irrespective of whether docker is deployed using Mesos/Marathon or Unmanaged. Unmanaged means that you are not using any third party tool to manage your docker daemon but doing it manually.
If you are using Mesos/Marathon to manage your docker daemons across multiple hosts, then you don't have to define the list of hosts where docker daemon is running. Using the Mesos API, the plugin gathers the list of hosts that are running docker daemons and use the list to get statistical information.
This monitor can gather statistical information across multiple docker daemon host at the same time. As a parameter to this monitor, you can define multiple hosts separated by comma (,) in the Edit Docker Hosts section as shown below:
If you are using Unmanaged option, then you can define the list of all hosts that are running Docker daemons in the "Edit Docker Host(s)" multi-line textbox. Ensure that each host name/ip address that you list is separated by comma(,).
The host information that is entered in the hosts section of the monitor is irrelevant and is not used by the plugin. You have to put a host for the monitor for it to run but it is not taken into consideration.
This plugin also supports HTTP and HTTPS connection to collect docker statistics only if the docker daemon is listening on TCP Port. For HTTP port, typically the Docker daemon listens on port number 2375. For HTTPS, this plugin expect private/public key authentication and expect you to provide the certificate file.
The certificate file (.pem) needs to reside on the collector machine on which the plugin is running. This certificate could be self signed or provided by CA authority. Please ensure to check "Certificate Self Signed" if you are using self signed certificate.
The docker monitor now also supports public key authentication with ssh connection.