From 104803e74efd7eb10d64345c1c01e209f21c580f Mon Sep 17 00:00:00 2001 From: Jimmi Dyson Date: Sat, 24 Oct 2015 19:29:58 +0100 Subject: [PATCH] Kubernetes SD: Cleanup example config label regexps --- .../examples/prometheus-kubernetes.yml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/documentation/examples/prometheus-kubernetes.yml b/documentation/examples/prometheus-kubernetes.yml index 776864a13..e0f6df447 100644 --- a/documentation/examples/prometheus-kubernetes.yml +++ b/documentation/examples/prometheus-kubernetes.yml @@ -25,13 +25,13 @@ scrape_configs: relabel_configs: - source_labels: [__meta_kubernetes_role] action: keep - regex: ^(?:apiserver|node)$ + regex: (?:apiserver|node) - action: labelmap - regex: ^__meta_kubernetes_node_label_(.+)$ + regex: __meta_kubernetes_node_label_(.+) replacement: $1 - source_labels: [__meta_kubernetes_role] action: replace - regex: ^(.+)$ + regex: (.+) target_label: kubernetes_role replacement: $1 @@ -56,37 +56,37 @@ scrape_configs: relabel_configs: - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape] action: keep - regex: ^true$ + regex: true - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme] action: replace target_label: __scheme__ - regex: ^(https?)$ + regex: (https?) replacement: $1 - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path] action: replace target_label: __metrics_path__ - regex: ^(.+)$ + regex: (.+) replacement: $1 - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port] action: replace target_label: __address__ - regex: ^(.+)(?::\d+);(\d+)$ + regex: (.+)(?::\d+);(\d+) replacement: $1:$2 - action: labelmap - regex: ^__meta_kubernetes_service_label_(.+)$ + regex: __meta_kubernetes_service_label_(.+) replacement: $1 - source_labels: [__meta_kubernetes_role] action: replace - regex: ^(.+)$ + regex: (.+) target_label: kubernetes_role replacement: $1 - source_labels: [__meta_kubernetes_service_namespace] action: replace - regex: ^(.+)$ + regex: (.+) target_label: kubernetes_namespace replacement: $1 - source_labels: [__meta_kubernetes_service_name] action: replace - regex: ^(.+)$ + regex: (.+) target_label: kubernetes_name replacement: $1