1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-16 09:16:38 +00:00
prometheus-operator/pkg/prometheus/testdata/AdditionalScrapeConfigs_sharded prometheus.golden
Simon Pasquier d728a1ce9d
fix: add runtime configuration for PrometheusAgent
In #6667, we forgot to support the new runtime configuration for the
PrometheusAgent CRD.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-11-08 09:19:56 +01:00

60 lines
1.2 KiB
Text
Generated

global:
scrape_interval: 30s
external_labels:
prometheus: default/test
prometheus_replica: $(POD_NAME)
evaluation_interval: 30s
scrape_configs:
- job_name: prometheus
scrape_interval: 15s
static_configs:
- targets:
- localhost:9090
relabel_configs:
- source_labels:
- __address__
target_label: __tmp_hash
modulus: 3
action: hashmod
- source_labels:
- __tmp_hash
regex: $(SHARD)
action: keep
- job_name: gce_app_bar
scrape_interval: 5s
gce_sd_config:
- project: foo
zone: us-central1
relabel_configs:
- action: keep
source_labels:
- __meta_gce_label_app
regex: my_app
- source_labels:
- __address__
target_label: __tmp_hash
modulus: 3
action: hashmod
- source_labels:
- __tmp_hash
regex: $(SHARD)
action: keep
- job_name: gce_app_bar_custom_shard_relabeling
scrape_interval: 5s
gce_sd_config:
- project: foo_custom_shard_relabeling
zone: us-central1
relabel_configs:
- action: keep
source_labels:
- __meta_gce_label_app
regex: my_app
- source_labels:
- __address__
target_label: __tmp_hash
modulus: 999
action: hashmod
- source_labels:
- __tmp_hash
regex: $(SHARD)
action: keep