From 83b5aff336f7db073367c6465aa3adc869342991 Mon Sep 17 00:00:00 2001 From: roc Date: Tue, 23 Apr 2024 16:58:12 +0800 Subject: [PATCH] update at 2024-04-23 16:58:12 --- codeblock/prometheus/kubernetes-pods.yaml | 6 +++--- codeblock/prometheus/kubernetes-service-endpoints.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/codeblock/prometheus/kubernetes-pods.yaml b/codeblock/prometheus/kubernetes-pods.yaml index b53cc44..c775e56 100644 --- a/codeblock/prometheus/kubernetes-pods.yaml +++ b/codeblock/prometheus/kubernetes-pods.yaml @@ -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: ` 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: ` annotation. - source_labels: - __address__ diff --git a/codeblock/prometheus/kubernetes-service-endpoints.yaml b/codeblock/prometheus/kubernetes-service-endpoints.yaml index 7a4898a..ecc5bed 100644 --- a/codeblock/prometheus/kubernetes-service-endpoints.yaml +++ b/codeblock/prometheus/kubernetes-service-endpoints.yaml @@ -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: ` 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: ` 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: ` annotation. - source_labels: