# Prometheus config for voyage v4.1 observability stack.
# Two scrape targets:
#   1. node-exporter — picks up voyage.prom files written by hooks/scripts/otel-export.mjs
#      when VOYAGE_EXPORT_MODE=textfile (default location: ./voyage-textfile/)
#   2. otel-collector — exposes voyage metrics from OTLP push when VOYAGE_EXPORT_MODE=otlp

global:
  scrape_interval: 15s
  evaluation_interval: 15s
  external_labels:
    monitor: voyage-local

scrape_configs:
  # Path A: voyage textfile mode → node-exporter textfile collector
  - job_name: voyage-textfile
    static_configs:
      - targets: ["node-exporter:9100"]
        labels:
          voyage_export_mode: textfile

  # Path B: voyage OTLP mode → otel-collector prometheus exporter
  - job_name: voyage-otlp
    static_configs:
      - targets: ["otel-collector:8889"]
        labels:
          voyage_export_mode: otlp

  # Self-scrape so Prometheus shows its own up=1 in dashboards.
  - job_name: prometheus
    static_configs:
      - targets: ["localhost:9090"]
