prometheus.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. global:
  10. scrape_interval: 5s
  11. scrape_configs:
  12. - job_name: environmentd
  13. static_configs:
  14. - targets: [host.docker.internal:6878]
  15. labels:
  16. namespace: local
  17. pod: environmentd-0
  18. - job_name: services
  19. file_sd_configs:
  20. - files:
  21. - /mnt/services/*.json
  22. refresh_interval: 5s
  23. relabel_configs:
  24. # Rewrite references to 127.0.0.1 or 0.0.0.0 to host.docker.internal,
  25. # since the services are running on the host.
  26. - source_labels: [__address__]
  27. target_label: __address__
  28. regex: (127\.0\.0\.1|0\.0\.0\.0)(.*)
  29. replacement: host.docker.internal$2
  30. action: replace
  31. # The process orchestrator emits static configurations for all ports, but
  32. # only the "internal-http" port serves metrics. Filter out other configs,
  33. # to avoid scrape failures in the Prometheus UI.
  34. - source_labels: [mz_orchestrator_port]
  35. regex: internal-http
  36. action: keep
  37. # Construct namespace and pod labels that are similar to the label that
  38. # Kubernetes installs, so that production dashboards work without changes
  39. # when running locally.
  40. - target_label: namespace
  41. replacement: local
  42. - source_labels: [mz_orchestrator_namespace, mz_orchestrator_service_id]
  43. separator: "-"
  44. target_label: pod
  45. replacement: $1-0
  46. - job_name: prometheus
  47. static_configs:
  48. - targets: [ localhost:9090 ]
  49. - job_name: tempo
  50. static_configs:
  51. - targets: [ tempo:3200 ]