server:
  http_listen_port: 9080
  grpc_listen_port: 0

positions:
  filename: /tmp/positions.yaml

# Ship to the flagship's Loki over the vSwitch. The flagship exposes
# port 3100 on its vSwitch IP (10.0.0.2) for this purpose; Hetzner
# Cloud firewall blocks 3100 from the public internet.
clients:
  - url: http://10.0.0.2:3100/loki/api/v1/push

scrape_configs:
  - job_name: docker
    docker_sd_configs:
      - host: unix:///var/run/docker.sock
        refresh_interval: 10s
    relabel_configs:
      # Scope: only trails-labeled containers. Every other workload on
      # this shared host is dropped before it reaches Loki.
      - source_labels: ["__meta_docker_container_label_trails_cool_service"]
        regex: "^$"
        action: drop
      # Labels mirror the flagship's promtail setup so dashboards are
      # easy to unify: container, service, plus a host label that
      # distinguishes this scraper from the flagship one.
      - source_labels: ["__meta_docker_container_name"]
        regex: "/?(.*)"
        target_label: container
      - source_labels: ["__meta_docker_container_label_trails_cool_service"]
        target_label: service
      - target_label: host
        replacement: brouter
    pipeline_stages:
      - docker: {}
