From e26fc5e73c553456e699ecd886c198612af97942 Mon Sep 17 00:00:00 2001 From: Jimmi Dyson Date: Tue, 29 Sep 2015 08:59:35 +0100 Subject: [PATCH] Kubernetes SD config tidy & add labelmap action example --- documentation/examples/prometheus-kubernetes.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/examples/prometheus-kubernetes.yml b/documentation/examples/prometheus-kubernetes.yml index 8a283f5e6..c5a6e7558 100644 --- a/documentation/examples/prometheus-kubernetes.yml +++ b/documentation/examples/prometheus-kubernetes.yml @@ -9,9 +9,6 @@ scrape_configs: - masters: - 'https://kubernetes.default.svc' in_cluster: true - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token relabel_configs: - source_labels: [__meta_kubernetes_role, __meta_kubernetes_service_annotation_prometheus_io_scrape] @@ -32,3 +29,6 @@ scrape_configs: target_label: __address__ regex: ^(.+)(?::\d+);(\d+)$ replacement: $1:$2 + - action: labelmap + regex: ^__meta_kubernetes_service_label_(.+)$ + replacement: $1