docker.service-logs

Collect logs from a docker swarm service. One of `service` or `service_list_options` is required.

docker.service-logs

type object

Collect logs from a docker swarm service. One of service or service_list_options is required.

collect:
  v1:
    - docker.service-logs:
        output_dir: /swarm/services/www
        service: cooltool-www
collect:
  v1:
    - docker.service-logs:
        output_dir: /swarm/services/core-stack
        service_list_options:
          Filters:
            name:
              - cooltool-www
              - cooltool-api
              - cooltool-worker

Optional Parameters

  • container_logs_options - Args as would be given to docker logs, as in The Docker API

  • service - A single docker swarm service for which to collect logs

  • service_list_options - Options for filtering all swarm services

Outputs

  • {{.Name}}.stdout - The stdout output of the logs call. Will generate this file for each matched service

  • {{.Name}}.stderr - The stderr output of the logs call. Will generate this file for each matched service


Shared Parameters

This spec also inherits all of the required and optional Shared Parameters