Docker setup

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 system to the LOGZIO_MODULES environment variable, and restart. You can find the run command and all parameters in this procedure.

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="system" \
Parameters for all modules
Parameter Description
LOGZIO_TOKEN Your account token. Replace <<SHIPPING-TOKEN>> with the token of the account you want to ship to.
LOGZIO_MODULES 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/logzio_modules.
LOGZIO_REGION 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.
Check for your metrics

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

You can view your metrics on the System Metrics dashboard in Grafana. Just click > Manage in the left menu, then click Dashboards > System Metrics.

Metricbeat setup

Before you begin, you’ll need: Metricbeat 7.1 or higher

Download the certificate

Download the public certificate to your certificate authority folder.

sudo wget -P /etc/pki/tls/certs/
Add configuration

Replace the General configuration with settings.

Replace <<SHIPPING-TOKEN>> with the token of the account you want to ship to.

# ===== General =====
  logzio_codec: json
  token: <<SHIPPING-TOKEN>>
fields_under_root: true
Set as the output

If is not an output, add it now. Remove all other outputs.

Replace <<LISTENER-HOST>> with your region’s listener host (for example, For more information on finding your account’s region, see Account region.

# ===== Outputs =====
  hosts: ["<<LISTENER-HOST>>:5015"]
  ssl.certificate_authorities: ['/etc/pki/tls/certs/COMODORSADomainValidationSecureServerCA.crt']
(If needed) Enable the system module

The system module is enabled by default. If you’ve disabled it for any reason, re-enable it now.

sudo metricbeat modules enable system

You can change the metrics collected by Metricbeat by modifying modules.d/system.yml. If you installed Metricbeat from a package manager, this directory is under /etc/metricbeat.

Start Metricbeat

Start or restart Metricbeat for the changes to take effect.

Check for your metrics

Give your metrics some time to get from your system to ours, and then open