File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -57,10 +57,18 @@ data:
57
57
action: replace
58
58
target_label: __metrics_path__
59
59
regex: (.+)
60
+ # If __address__ is ipv6, update ipv6 adress with []
61
+ # https://github.com/prometheus/prometheus/issues/14656
62
+ - source_labels: [__address__]
63
+ regex: '\[?([0-9a-fA-F:]+:[0-9a-fA-F:]+)\]?(:\d+)?'
64
+ action: replace
65
+ target_label: __address__
66
+ replacement: '[$1]$2'
60
67
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
61
68
action: replace
62
- regex: ([^:]+)(?::\d+)?;(\d+)
63
- replacement: $1:$2
69
+ # match both ipv6 and ipv4
70
+ regex: ([0-9.]+|\[?[0-9a-fA-F:]+\]?)(:?\d+)?;(\d+)
71
+ replacement: $1:$3
64
72
target_label: __address__
65
73
- action: replace
66
74
source_labels: ['__meta_kubernetes_pod_ip']
You can’t perform that action at this time.
0 commit comments