global:
  scrape_interval: 15s
  evaluation_interval: 15s

rule_files:
  - "alert_rules.yml"

alerting:
  alertmanagers:
    - static_configs:
        - targets:
          - alertmanager:9093

scrape_configs:
  # Gateway metrics
  - job_name: 'torrent-gateway'
    static_configs:
      - targets: ['gateway:9876']
    metrics_path: /metrics
    scrape_interval: 5s
    scrape_timeout: 5s

  # System metrics
  - job_name: 'node-exporter'
    static_configs:
      - targets: ['node-exporter:9100']
    scrape_interval: 15s

  # Redis metrics
  - job_name: 'redis'
    static_configs:
      - targets: ['redis-exporter:9121']
    scrape_interval: 15s

  # Self monitoring
  - job_name: 'prometheus'
    static_configs:
      - targets: ['localhost:9090']