Kubernetes SD: Cleanup example config label regexps

pull/1177/head
Jimmi Dyson 9 years ago
parent 87940ec213
commit 104803e74e

@ -25,13 +25,13 @@ scrape_configs:
relabel_configs: relabel_configs:
- source_labels: [__meta_kubernetes_role] - source_labels: [__meta_kubernetes_role]
action: keep action: keep
regex: ^(?:apiserver|node)$ regex: (?:apiserver|node)
- action: labelmap - action: labelmap
regex: ^__meta_kubernetes_node_label_(.+)$ regex: __meta_kubernetes_node_label_(.+)
replacement: $1 replacement: $1
- source_labels: [__meta_kubernetes_role] - source_labels: [__meta_kubernetes_role]
action: replace action: replace
regex: ^(.+)$ regex: (.+)
target_label: kubernetes_role target_label: kubernetes_role
replacement: $1 replacement: $1
@ -56,37 +56,37 @@ scrape_configs:
relabel_configs: relabel_configs:
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape] - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
action: keep action: keep
regex: ^true$ regex: true
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme] - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
action: replace action: replace
target_label: __scheme__ target_label: __scheme__
regex: ^(https?)$ regex: (https?)
replacement: $1 replacement: $1
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path] - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
action: replace action: replace
target_label: __metrics_path__ target_label: __metrics_path__
regex: ^(.+)$ regex: (.+)
replacement: $1 replacement: $1
- source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port] - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
action: replace action: replace
target_label: __address__ target_label: __address__
regex: ^(.+)(?::\d+);(\d+)$ regex: (.+)(?::\d+);(\d+)
replacement: $1:$2 replacement: $1:$2
- action: labelmap - action: labelmap
regex: ^__meta_kubernetes_service_label_(.+)$ regex: __meta_kubernetes_service_label_(.+)
replacement: $1 replacement: $1
- source_labels: [__meta_kubernetes_role] - source_labels: [__meta_kubernetes_role]
action: replace action: replace
regex: ^(.+)$ regex: (.+)
target_label: kubernetes_role target_label: kubernetes_role
replacement: $1 replacement: $1
- source_labels: [__meta_kubernetes_service_namespace] - source_labels: [__meta_kubernetes_service_namespace]
action: replace action: replace
regex: ^(.+)$ regex: (.+)
target_label: kubernetes_namespace target_label: kubernetes_namespace
replacement: $1 replacement: $1
- source_labels: [__meta_kubernetes_service_name] - source_labels: [__meta_kubernetes_service_name]
action: replace action: replace
regex: ^(.+)$ regex: (.+)
target_label: kubernetes_name target_label: kubernetes_name
replacement: $1 replacement: $1

Loading…
Cancel
Save