This integration uses Filebeat in a Docker container to forward logs from Amazon Elastic Container Service (ECS) to Logz.io.

To use docker-collector-logs, you’ll set environment variables when you run the container. The Docker logs directory and docker.sock are mounted to the container, allowing Filebeat to collect the logs and metadata.

Upgrading to a newer version

  • Upgrading to a newer version of docker-collector-logs while it is already running will cause it to resend logs that are within the ignoreOlder timeframe. You can minimize log duplicates by setting the ignoreOlder parameter of the new docker to a lower value (for example, 20m).

  • Version 0.1.0 of docker-collector-logs includes breaking changes. Please see the project’s change log for further information.

Deploy the Docker collector

Pull the Docker image

Download the logzio/docker-collector-logs image.

docker pull logzio/docker-collector-logs
Run the Docker image

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

docker run -d --name=docker-collector-logs \
--env LOGZIO_TOKEN="<<SHIPPING-TOKEN>>" \
--env LOGZIO_URL="<<LISTENER-HOST>>:5015" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/lib/docker/containers:/var/lib/docker/containers \
logzio/docker-collector-logs
Parameters
Parameter Description
LOGZIO_TOKEN Your Logz.io account token. Replace <<SHIPPING-TOKEN>> with the token of the account you want to ship to.
LOGZIO_URL Your Logz.io listener URL and port. Replace <<LISTENER-HOST>> with your region’s listener host (for example, listener.logz.io). For more information on finding your account’s region, see Account region.
ignoreOlder 3h Set a time limit on back shipping logs. Upgrading to a newer version of docker-collector-logs while it is already running will cause it to resend logs that are within the ignoreOlder timeframe. You can minimize log duplicates by setting the ignoreOlder parameter of the new docker to a lower value (for example, 20m).
Check Logz.io for your logs

Give your logs some time to get from your system to ours, and then open Kibana.