global:
  scrape_interval: 30s
  external_labels:
    monitor: 'codelab-monitor'

scrape_configs:

  - job_name: 'cluster_metrics'
    static_configs:
      - targets: ['HAProxy:80']
    honor_labels: true
    metrics_path: '/cluster/metrics'
    basic_auth:
      username: '{{ CLUSTER_ID }}'
      password: '{{ CLUSTER_SECRET }}'

  - job_name: 'node'
    dns_sd_configs:
    - names:
      - 'tasks.node-exporter'
      type: 'A'
      port: 9100
