Merge pull request #2427 from stephen-soltesz/master
Kubernetes port annotations - match addresses with or without declared ports
This commit is contained in:
commit
0436e982cb
|
@ -108,7 +108,7 @@ scrape_configs:
|
|||
- source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
|
||||
action: replace
|
||||
target_label: __address__
|
||||
regex: (.+)(?::\d+);(\d+)
|
||||
regex: (.+)(?::\d+)?;(\d+)
|
||||
replacement: $1:$2
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_service_label_(.+)
|
||||
|
@ -174,8 +174,8 @@ scrape_configs:
|
|||
regex: (.+)
|
||||
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
|
||||
action: replace
|
||||
regex: (.+):(?:\d+);(\d+)
|
||||
replacement: ${1}:${2}
|
||||
regex: (.+)(?::\d+)?;(\d+)
|
||||
replacement: $1:$2
|
||||
target_label: __address__
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_pod_label_(.+)
|
||||
|
|
Loading…
Reference in New Issue