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

Setup

To use Logz.io AWS ECS Collector, you’ll set environment variables when you run the container. The Docker logs directory and docker.sock are mounted to the container, allowing Fluentd to collect the logs and metadata.

Deploy the AWS ECS collector
  1. Pull the Docker image

    Download the logzio/logzio-aws-ecs image:

     docker pull logzio/logzio-aws-ecs
    
  2. Run the Docker image

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

     docker run -d --name=logzio-aws-ecs \
     --env LOGZIO_TOKEN="<ACCOUNT-TOKEN>" \
     --env LOGZIO_URL="https://<LISTENER-URL>:8071" \
     -v /var/run/docker.sock:/var/run/docker.sock \
     -v /var/lib/docker/containers:/var/lib/docker/containers \
     -v /tmp:/tmp \
     --net="host" \
     logzio/logzio-aws-ecs
    

    Parameters

    LOGZIO_TOKEN
    Your Logz.io account token. Replace <ACCOUNT-TOKEN> with the token of the account you want to ship to.
    LOGZIO_URL
    Your Logz.io listener URL. Replace <LISTENER-URL> with your region’s listener URL. For more information on finding your account’s region, see Account region.
  3. Check Logz.io for your logs

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