# Prometheus scrape config for the Scrabble contour. The OTel Collector exposes
# every service's metrics on its prometheus exporter; Prometheus scrapes that one
# endpoint. Retention (15d) is set on the command line in docker-compose.yml.
global:
  scrape_interval: 30s
  evaluation_interval: 30s

scrape_configs:
  # otelcol exposes both the services' OTLP metrics and the docker_stats receiver's
  # per-container resource metrics (CPU/memory/network) on one endpoint.
  - job_name: otelcol
    static_configs:
      - targets: ["otelcol:9464"]
  - job_name: prometheus
    static_configs:
      - targets: ["localhost:9090"]
  # Postgres server metrics (connections, cache hit ratio, transactions, db size).
  - job_name: postgres_exporter
    static_configs:
      - targets: ["postgres_exporter:9187"]
  # Host-level metrics (memory/CPU/disk). Matters most on the prod main host's tight
  # 1.9 GiB budget, where total host memory is the OOM-proximity signal.
  - job_name: node
    static_configs:
      - targets: ["node_exporter:9100"]
