vmagent: fix consul target address relabel (#516)
The consul job joins node and port with ":" but then sets `replacement: "${1}:${2}"` with the default `(.*)` regex, so `__address__` becomes `node:port:`. vmagent rejects every consul target as an invalid port, including node_exporter.
- drop the replacement so the default `$1` yields `node:port`
Reviewed-on: #516
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
This commit was merged in pull request #516.
This commit is contained in:
@@ -120,7 +120,6 @@ spec:
|
||||
- source_labels: [__meta_consul_node, __meta_consul_service_port]
|
||||
separator: ":"
|
||||
target_label: __address__
|
||||
replacement: "${1}:${2}"
|
||||
action: replace
|
||||
- source_labels: [__meta_consul_tag_metrics_scheme]
|
||||
target_label: __scheme__
|
||||
|
||||
Reference in New Issue
Block a user