Browse Source

Merge pull request #2427 from stephen-soltesz/master

Kubernetes port annotations - match addresses with or without declared ports
pull/2434/head
Tobias Schmidt 8 years ago committed by GitHub
parent
commit
0436e982cb
  1. 6
      documentation/examples/prometheus-kubernetes.yml

6
documentation/examples/prometheus-kubernetes.yml

@ -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…
Cancel
Save