prometheus.yml72 lines · main
| 1 | # Scrape every briven service's /metrics endpoint. Container names match |
| 2 | # the apps/*/Dockerfile compose service names — adjust the static_configs |
| 3 | # targets if the deploy uses different DNS names. |
| 4 | |
| 5 | global: |
| 6 | scrape_interval: 15s |
| 7 | evaluation_interval: 15s |
| 8 | external_labels: |
| 9 | env: production |
| 10 | |
| 11 | alerting: |
| 12 | alertmanagers: |
| 13 | - static_configs: |
| 14 | - targets: ['alertmanager:9093'] |
| 15 | |
| 16 | rule_files: |
| 17 | - /etc/prometheus/rules/*.yml |
| 18 | |
| 19 | scrape_configs: |
| 20 | - job_name: prometheus |
| 21 | static_configs: |
| 22 | - targets: ['localhost:9090'] |
| 23 | |
| 24 | # Service-name targets — docker compose with `--project-name briven` and |
| 25 | # the compose.dokploy.yml file (no container_name) creates `api`, |
| 26 | # `runtime`, `realtime` as resolvable service DNS names on |
| 27 | # dokploy-network. We also list the briven-*-1 container names as a |
| 28 | # fallback so the scrape works whether observability runs alongside |
| 29 | # the managed compose project or as a sibling stack. |
| 30 | - job_name: api |
| 31 | metrics_path: /metrics |
| 32 | static_configs: |
| 33 | - targets: ['briven-api-1:3001', 'api:3001'] |
| 34 | labels: |
| 35 | service: api |
| 36 | |
| 37 | - job_name: runtime |
| 38 | metrics_path: /metrics |
| 39 | static_configs: |
| 40 | - targets: ['briven-runtime-1:3003', 'runtime:3003'] |
| 41 | labels: |
| 42 | service: runtime |
| 43 | |
| 44 | - job_name: realtime |
| 45 | metrics_path: /metrics |
| 46 | static_configs: |
| 47 | - targets: ['briven-realtime-1:3004', 'realtime:3004'] |
| 48 | labels: |
| 49 | service: realtime |
| 50 | |
| 51 | # postgres-exporter sidecar; not in this compose project — operator |
| 52 | # adds it alongside the Postgres container in the data-plane compose. |
| 53 | - job_name: postgres |
| 54 | metrics_path: /metrics |
| 55 | static_configs: |
| 56 | - targets: ['postgres-exporter:9187'] |
| 57 | labels: |
| 58 | service: postgres |
| 59 | |
| 60 | # Host metrics (node-exporter) and per-container metrics (cAdvisor). |
| 61 | # Both run in this compose project; see compose.yml. |
| 62 | - job_name: node |
| 63 | static_configs: |
| 64 | - targets: ['node-exporter:9100'] |
| 65 | labels: |
| 66 | service: host |
| 67 | |
| 68 | - job_name: cadvisor |
| 69 | static_configs: |
| 70 | - targets: ['cadvisor:8080'] |
| 71 | labels: |
| 72 | service: containers |