prometheus.yml 2.1 KB

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