Docker Logs Collector

The Copy File Custom Collector

This content is associated with a legacy version of the Replicated product. For the current Replicated product documentation, see

Docker Logs

Because most applications deployed in Replicated are running in Docker containers, a commonly used collector spec is the docker.logs collector. This will copy the output (stdout/etderr) from a docker container and include it in a support bundle.

This collector is fully documented in the reference docs.


To illustrate how to use this collector, we’ll create a collector that will include the last 1000 lines from all nginx containers.

    - docker.logs:
        descriptino: Nginx docker container logs
        output_dir: /docker/logs/nginx
        timeout_seconds: 15
          All: true    # include stopped containers
            image: "nginx"
          Timestamps: true
          Tail: 1000    # only include 1000 lines

The above collector definition will include the logs for stdout and stderr in the /docker/logs/nginx directory for any container running from any tag of the “nginx” image.