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:
2026-10-03 22:51:46 +10:00
committed by BenVincent
parent 27dd7e7f3d
commit cc0dd24991
-1
View File
@@ -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__