mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
Kubernetes SD config tidy & add labelmap action example
This commit is contained in:
parent
a88ed8c2ff
commit
e26fc5e73c
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue