# Copyright Materialize, Inc. and contributors. All rights reserved. # # Use of this software is governed by the Business Source License # included in the LICENSE file at the root of this repository. # # As of the Change Date specified in that file, in accordance with # the Business Source License, use of this software will be governed # by the Apache License, Version 2.0. global: scrape_interval: 5s scrape_configs: - job_name: environmentd static_configs: - targets: [host.docker.internal:6878] labels: namespace: local pod: environmentd-0 - job_name: services file_sd_configs: - files: - /mnt/services/*.json refresh_interval: 5s relabel_configs: # Rewrite references to 127.0.0.1 or 0.0.0.0 to host.docker.internal, # since the services are running on the host. - source_labels: [__address__] target_label: __address__ regex: (127\.0\.0\.1|0\.0\.0\.0)(.*) replacement: host.docker.internal$2 action: replace # The process orchestrator emits static configurations for all ports, but # only the "internal-http" port serves metrics. Filter out other configs, # to avoid scrape failures in the Prometheus UI. - source_labels: [mz_orchestrator_port] regex: internal-http action: keep # Construct namespace and pod labels that are similar to the label that # Kubernetes installs, so that production dashboards work without changes # when running locally. - target_label: namespace replacement: local - source_labels: [mz_orchestrator_namespace, mz_orchestrator_service_id] separator: "-" target_label: pod replacement: $1-0 - job_name: prometheus static_configs: - targets: [ localhost:9090 ] - job_name: tempo static_configs: - targets: [ tempo:3200 ]