global:
  scrape_interval: 15s
  scrape_timeout: 10s
  evaluation_interval: 15s

scrape_configs:
  - job_name: 'prometheus'
    static_configs:
      - targets: ['localhost:9090']

  - job_name: 'factoryz-labs-api'
    metrics_path: '/metrics'
    static_configs:
      - targets: ['factoryz-labs-api:3001']
    relabel_configs:
      - source_labels: [__address__]
        target_label: instance
        replacement: 'factoryz-labs-api'

  - job_name: 'factoryz-labs-web'
    metrics_path: '/metrics'
    static_configs:
      - targets: ['factoryz-labs-web:3002']
    relabel_configs:
      - source_labels: [__address__]
        target_label: instance
        replacement: 'factoryz-labs-web'

  - job_name: 'node-exporter'
    static_configs:
      - targets: ['node-exporter:9100']

  - job_name: 'docker'
    static_configs:
      - targets: ['docker-swarm:9323']

alerting:
  alertmanagers:
    - static_configs:
        - targets: ['alertmanager:9093']

rule_files:
  - '/etc/prometheus/rules/*.yml'

remote_write:
  - url: 'http://hypergraph-monitor:9090/api/v1/write'
    basic_auth:
      username: 'factoryz'
      password: 'factoryz-password'