Skip to main content

Docker Monitoring

Professional

Docker Metrics​

Agent gathers the following metrics:

  • containers_count: Number of running Docker containers.

In addition to the above global metric, the following information are retrieved per Docker container:

  • Name of the container.
  • Docker ID of the container.
  • Status of the container (running, stopped, ...).
  • Date when the container is created, started and/or stopped.
  • Image name used to create the container.
  • Command used to create the container.
  • A copy of Docker inspect for the container.

The above information are not archived: only latest value is available, and when a container is destroyed, the information for this container are deleted.

Finally, for each container, Agent gathers the following metrics:

MetricDescription
container_cpu_usedCPU used by container in percent.
container_health_statusStatus of Docker container, if your container has an HEALTHCHECK defined, this metric will contains the result of this check
container_io_read_bytesDisk read throughput of container in bytes per second
container_io_write_bytesDisk write throughput of container in bytes per second
container_mem_usedMemory used by container in bytes
container_mem_used_percMemory used by container in percent
container_mem_used_perc_statusStatus of memory used by container
container_net_bits_recvNetwork traffic received by container in bits per second
container_net_bits_sentNetwork traffic sent by container in bits per second

Docker Labels​

The following labels are known by the Bleemeo agent:

  • glouton.enable: If false, the Bleemeo agent will ignore the container. Once ignored, information and metrics from this container won't be gathered and any service running in this container won't be discovered.
  • glouton.check.ignore.port.80: If true, the Bleemeo agent skips the check on port 80 that the auto-discovered may have wrongly detected. This option isn't limited to port 80, and any other value could be used.
  • prometheus.io/scrape, prometheus.io/path, prometheus.io/port: Configure the Bleemeo agent to scrape a Prometheus metric exporter. See See the Prometheus page for details.
  • glouton.allow_metrics, glouton.deny_metrics, glouton.include_default_metrics: Configure which Prometheus metrics are scraped. See See the Prometheus page for details.

Filtering monitored container​

You can configure which container will be monitored by Bleemeo agent. In addition to the label glouton.enable described above, the following could be added in Bleemeo agent configuration:

container:
filter:
allow_by_default: true
allow_list:
- "bleemeo_*"
deny_list:
- "bleemeo_ephemeral"
- "bleemeo_builder"

This will:

  • allow_by_default enable monitoring of container when the container name is neither allowed/denied by the list or when the container don't have the label glouton.enable. If unspecified, allow_by_default is enabled.
  • deny_list is a list of container name that will not be monitored. They are not monitored even if also present in allow_list or with a label glouton.enable. The deny_list take precedence over other configuration.
  • allow_list is a list of container name that will be monitored, unless excluded by the deny_list. Allow list take precedence over a label glouton.enable

For both the allow_list and the deny_list, you can use plain name or use pattern with the * wildcard. In above example bleemeo_* match anything that start with bleemeo_.