update at 2024-04-23 16:58:12

pull/158/head
roc 2024-04-23 16:58:12 +08:00
parent 5a3451875a
commit 83b5aff336
2 changed files with 6 additions and 6 deletions

View File

@ -4,14 +4,14 @@
- role: pod
relabel_configs:
# Example relabel to scrape only pods that have
# prometheus relabel to scrape only pods that have
# `prometheus.io/scrape: "true"` annotation.
- source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scrape
action: keep
regex: true
# Example relabel to customize metric path based on pod
# prometheus relabel to customize metric path based on pod
# `prometheus.io/path: <metric path>` annotation.
- source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_path
@ -19,7 +19,7 @@
target_label: __metrics_path__
regex: (.+)
# Example relabel to scrape only single, desired port for the pod
# prometheus relabel to scrape only single, desired port for the pod
# based on pod `prometheus.io/port: <port>` annotation.
- source_labels:
- __address__

View File

@ -10,7 +10,7 @@
- __meta_kubernetes_service_annotation_prometheus_io_scrape
action: keep
regex: true
#
# prometheus relabel to customize metric path based on endpoints
# `prometheus.io/path: <metric path>` annotation.
- source_labels:
@ -18,7 +18,7 @@
action: replace
target_label: __metrics_path__
regex: (.+)
#
# prometheus relabel to scrape only single, desired port for the service based
# on endpoints `prometheus.io/port: <port>` annotation.
- source_labels:
@ -28,7 +28,7 @@
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
target_label: __address__
#
# prometheus relabel to configure scrape scheme for all service scrape targets
# based on endpoints `prometheus.io/scheme: <scheme>` annotation.
- source_labels: