Add Kubernetes namespace & name labels to example config

This commit is contained in:
Jimmi Dyson 2015-09-29 12:55:08 +01:00
parent bf4e4a8ff0
commit 1976dfe634
1 changed files with 10 additions and 0 deletions

View File

@ -80,3 +80,13 @@ scrape_configs:
regex: ^(.+)$ regex: ^(.+)$
target_label: kubernetes_role target_label: kubernetes_role
replacement: $1 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