From 1976dfe63432c5d55d2f386c8bbe8b11de8e3f89 Mon Sep 17 00:00:00 2001 From: Jimmi Dyson Date: Tue, 29 Sep 2015 12:55:08 +0100 Subject: [PATCH] Add Kubernetes namespace & name labels to example config --- documentation/examples/prometheus-kubernetes.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/documentation/examples/prometheus-kubernetes.yml b/documentation/examples/prometheus-kubernetes.yml index a82c34bb6..115e86b88 100644 --- a/documentation/examples/prometheus-kubernetes.yml +++ b/documentation/examples/prometheus-kubernetes.yml @@ -80,3 +80,13 @@ scrape_configs: regex: ^(.+)$ target_label: kubernetes_role replacement: $1 + - source_labels: [__meta_kubernetes_service_namespace] + action: replace + regex: ^(.+)$ + target_label: kubernetes_namespace + replacement: $1 + - source_labels: [__meta_kubernetes_service_name] + action: replace + regex: ^(.+)$ + target_label: kubernetes_name + replacement: $1