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.


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

Otherwise, stop the container, add aws to the LOGZIO_MODULES environment variable, and restart. You can find the run command and all parameters in this procedure.

Set up your IAM user

You’ll need an IAM user with these permissions: cloudwatch:GetMetricData, cloudwatch:ListMetrics, ec2:DescribeInstances, ec2:DescribeRegions, iam:ListAccountAliases, sts:GetCallerIdentity

If you don’t have one, set that up now.

Create an Access key ID and Secret access key for the IAM user, and paste them in your text editor.

You’ll need these for your Metricbeat configuration later.

Get your metrics region

You’ll need to specify the AWS region you’re collecting metrics from.

AWS region menu

Find your region’s slug in the region menu (in the top menu, on the right side).

For example: The slug for US East (N. Virginia) is “us-east-1”, and the slug for Canada (Central) is “ca-central-1”.

Paste your region slug in your text editor. You’ll need this for your Metricbeat configuration later.

Enable EC2 Auto Scaling metrics

In the EC2 console left menu, click AUTO SCALING > Auto Scaling Groups

Select the Auto Scaling group you want to monitor. To do this, click the Monitoring tab, and then click Enable Group Metrics Collection.

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="aws" \
Parameters for all modules
Parameter Description
LOGZIO_TOKEN Replace <<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 Comma-separated list of Metricbeat modules to enable 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.
HOSTNAME `` Insert your host name if you want it to appear in the metrics’ If null, will show the container’s ID.
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.
Parameters for the AWS module
Parameter Description
AWS_ACCESS_KEY Your IAM user’s access key ID.
AWS_SECRET_KEY Your IAM user’s secret key.
AWS_REGION Your region’s slug. You can find this in the AWS region menu (in the top menu, to the right).
AWS_NAMESPACES Comma-separated list of namespaces of the metrics you want to collect.
For EC2 Auto Scaling, this is AWS/AutoScaling.
Open your Cloudwatch AWS/Auto Scaling 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, click > Manage in the left menu, then click Dashboards > Cloudwatch AWS/Auto Scaling.