docker.stack-service-logs

Collect logs from one or more services in a stack

docker.stack-service-logs

type object

Collect logs from one or more services in a stack

collect:
  v1:
    - docker.stack-service-logs:
        output_dir: /swarm/stacks/cooltool/service-logs
        description: Logs from services in the cooltool stack
        namespace: cooltool-core
collect:
  v1:
    - docker.stack-service-logs:
        output_dir: /swarm/stacks/cooltool/service-logs
        description: Logs from services in the cooltool stack
        namespace: cooltool-core
        labels: {}
collect:
  v1:
    - docker.stack-service-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’s 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

  • service_list_options - Options as would be passed to `docker stack services

Outputs

  • {{.StackName}}_{{.ServiceName}}.stdout - The stdout output. Will generate this file for each matched service

  • {{.StackName}}_{{.ServiceName}}.stderr - The stderr output. Will generate this file for each matched service


Shared Parameters

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