prometheus.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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: 15s
  11. scrape_configs:
  12. - job_name: environmentd
  13. static_configs:
  14. - targets: [materialized:6878]
  15. labels:
  16. namespace: local
  17. pod: environmentd-0
  18. - job_name: services
  19. file_sd_configs:
  20. - files:
  21. - /mnt/mzdata/prometheus/*.json
  22. refresh_interval: 30s
  23. relabel_configs:
  24. # Rewrite references to 127.0.0.1 or 0.0.0.0 to materialized,
  25. # since the services are running in that container.
  26. - source_labels: [__address__]
  27. target_label: __address__
  28. regex: (127\.0\.0\.1|0\.0\.0\.0)(.*)
  29. replacement: materialized$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: 'cockroachdb'
  47. metrics_path: '/_status/vars'
  48. # Insecure mode:
  49. scheme: 'http'
  50. # Secure mode:
  51. # scheme: 'https'
  52. tls_config:
  53. insecure_skip_verify: true
  54. static_configs:
  55. - targets: ['cockroach:8080']
  56. labels:
  57. cluster: cockroach