mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-12 16:44:05 -08:00
Kubernetes SD: Cleanup example config label regexps
This commit is contained in:
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…
Reference in a new issue