# Prometheus (data node). Docker-network targets by service name; crawl-node targets over dci0. # Prometheus does not expand env vars: 10.68.0.2 is the crawl node's private address (compose.crawl.yml). global: scrape_interval: 15s evaluation_interval: 30s external_labels: cluster: dci site: bhs rule_files: - /etc/prometheus/alerts.yml scrape_configs: - job_name: prometheus static_configs: [{ targets: ["localhost:9090"], labels: { node: data } }] # Fastify API — dci_api_requests_total, dci_api_request_duration_seconds, dci_api_cache_* - job_name: dci-api metrics_path: /api/metrics static_configs: [{ targets: ["api:8311"], labels: { node: data, role: api } }] # Crawl workers (BHS64b) — /metrics on the worker health port (published on 10.68.0.2); the maintenance-only # worker on this node is scraped over the compose network. Contract: dci_crawl_fetches_total{connector,level,outcome}, # dci_crawl_credits_total{provider}, dci_crawl_daily_budget / dci_crawl_daily_credits_used{provider}, # dci_crawl_fetch_duration_seconds, dci_ingest_entities_total{connector,result}, dci_events_total, # dci_queue_jobs{queue,state}, dci_worker_running_jobs, dci_worker_up (apps/worker/src/prom.ts). - job_name: dci-worker metrics_path: /metrics static_configs: - targets: ["10.68.0.2:8320"] labels: { node: crawl, role: worker, instance_name: worker } - targets: ["10.68.0.2:8322"] labels: { node: crawl, role: worker, instance_name: worker-b } - targets: ["worker-maint:8320"] labels: { node: data, role: worker, instance_name: worker-maint } # Scheduler (data node) — dci_scheduler_ticks_total, dci_scheduler_last_tick_timestamp_seconds, dci_queue_jobs - job_name: dci-scheduler metrics_path: /metrics static_configs: [{ targets: ["scheduler:8321"], labels: { node: data, role: scheduler } }] # Edge Caddy - job_name: dci-edge static_configs: [{ targets: ["edge:9180"], labels: { node: data, role: edge } }] # Hosts - job_name: node static_configs: - targets: ["node-exporter:9100"] labels: { node: data } - targets: ["10.68.0.2:9100"] labels: { node: crawl } # Containers (data node) - job_name: cadvisor static_configs: [{ targets: ["cadvisor:8080"], labels: { node: data } }] # Stores - job_name: postgres static_configs: [{ targets: ["postgres-exporter:9187"], labels: { node: data } }] - job_name: redis static_configs: [{ targets: ["redis-exporter:9121"], labels: { node: data } }] - job_name: clickhouse static_configs: [{ targets: ["clickhouse:9363"], labels: { node: data } }] - job_name: minio metrics_path: /minio/v2/metrics/cluster static_configs: [{ targets: ["minio:9000"], labels: { node: data } }]