To simplify shipping metrics from one or many sources, we created Docker Metrics Collector. Docker Metrics Collector is a container that runs Metricbeat with the modules you enable at runtime.

Docker versions
  • Docker Metrics Collector v0.2 runs Metricbeat v7.10.
  • Docker Metrics Collector v0.1.6 runs Metricbeat v7.5.2.

The Metricbeat version determines which pre-built AWS Metrics dashboards you can use for your data. Filter by the Metricbeat version tag to find relevant AWS dashboards in your Metrics library.


If you’re not already running Docker Metrics Collector, follow these steps.

Otherwise, stop the container, add docker to the LOGZIO_MODULES environment variable, add -v /var/run/docker.sock:/var/run/docker.sock:ro to the command, and restart. You can find the run command and all parameters in this procedure.

The docker module collects these metrics: container, cpu, diskio, healthcheck, info, memory, network

Pull the Docker image

Download the Docker Metrics Collector image:

docker pull logzio/docker-collector-metrics
Run the container

You’ll set your configuration using environment variables in the docker run command. Each parameter is formatted like this: --env ENV_VARIABLE_NAME="value".

For a complete list of options, see the parameters below the code block.👇

docker run --name docker-collector-metrics \
--env LOGZIO_MODULES="docker" \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
Parameters for all modules
Parameter Description
LOGZIO_TOKEN (Required) Replace <<METRICS-SHIPPING-TOKEN>> with a token for the Metrics account you want to ship to.
Here’s how to look up your Metrics token.
LOGZIO_MODULES (Required) Comma-separated list of Metricbeat modules to be enabled on this container (formatted as "module1,module2,module3"). To use a custom module configuration file, mount its folder to /logzio/modules.
LOGZIO_REGION Blank (US East) Two-letter region code, or blank for US East (Northern Virginia). This determines your listener URL (where you’re shipping the logs to) and API URL. You can find your region code in the Regions and URLs table.
LOGZIO_TYPE docker-collector-metrics This field is needed only if you’re shipping metrics to Kibana and you want to override the default value. In Kibana, this is shown in the type field. applies parsing based on type.
LOGZIO_LOG_LEVEL "INFO" The log level the module startup scripts will generate.
LOGZIO_EXTRA_DIMENSIONS Semicolon-separated list of dimensions to be included with your metrics (formatted as dimensionName1=value1;dimensionName2=value2). To use an environment variable as a value, format as dimensionName=$ENV_VAR_NAME. Environment variables must be the only value in the field. If an environment variable can’t be resolved, the field is omitted.
DEBUG "false" Set to true if you want Metricbeat to run in debug mode.
Note: Debug mode tends to generate a lot of debugging output, so you should probably enable it temporarily only when an error occurs while running the docker-collector in production.
HOSTNAME `` Insert your host name if you want it to appear in the metrics’ If null, will show the container’s ID.
CLOUD_METADATA "false" Set to true to enrich events with instance metadata from the machine’s hosting provider.
Parameters for the Docker module
Parameter Description
DOCKER_MATCH_CONTAINER_NAME Comma-separated list of containers you want to collect the metrics from. If a container’s name partially matches a name on the list, that container’s metrics are shipped. Otherwise, its metrics are ignored. Note: Can’t be used with DOCKER_SKIP_CONTAINER_NAME.
DOCKER_SKIP_CONTAINER_NAME Comma-separated list of containers you want to ignore. If a container’s name partially matches a name on the list, that container’s metrics are ignored. Otherwise, its metrics are shipped. Note: Can’t be used with DOCKER_MATCH_CONTAINER_NAME.
DOCKER_PERIOD 10s Sampling rate of metrics. The Docker API takes up to 2 seconds to respond, so we recommend setting this to 3s or longer.
DOCKER_CERTIFICATE_AUTHORITY Filepath to certificate authority for connecting to Docker over TLS.
DOCKER_CERTIFICATE Filepath to CA certificate for connecting to Docker over TLS.
DOCKER_KEY Filepath to Docker key for connecting to Docker over TLS.
Open your Docker overview dashboard in

Give your metrics a few minutes to get from your system to ours, and then open

Your metrics should appear in the preconfigured dashboard in your Metrics account. To open it, search your Metrics dashboards for Docker overview.