docker.stack-task-logs

Collect logs from a docker swarm task

docker.stack-task-logs

type object

Collect logs from a docker swarm task

collect:
  v1:
    - docker.stack-task-logs:
        output_dir: /swarm/stacks/cooltool/service-logs
        description: Logs from services in the cooltool stack
        namespace: cooltool-core
        task_list_options:
          Filters:
            name:
              - redis.1
collect:
  v1:
    - docker.stack-task-logs:
        output_dir: /swarm/stacks/cooltool/service-logs
        description: Logs from services in the cooltool stack
        namespace: cooltool-core
        labels: {}
collect:
  v1:
    - docker.stack-task-logs:
        output_dir: /swarm/stacks/cooltool/service-logs
        description: Logs from services in the cooltool stack
        namespace: cooltool-core
        labels:
          com.replicated.excludelogs: 'false'
          abc: xyz
          abc2: ''

Required Parameters

  • namespace - The stack namespace

Optional Parameters

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

  • labels - A set of labels that must be present for the logs to be included

  • task_list_options - Options for filtering stack tasks

Outputs

  • {{.TaskId}}.stdout - The stdout output. Will generate this file for each matched service task

  • {{.TaskId}}.stderr - The stderr output. Will generate this file for each matched service task


Shared Parameters

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