From f0f3d0d96ec546a54cfc827d307cfa17b9a7d118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Fri, 17 Jan 2025 13:34:21 +0100 Subject: [PATCH] net: fix sanitize # on the nic label for windows_net_nic_address_info (#1839) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Otto Kröpke --- internal/collector/net/net.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/collector/net/net.go b/internal/collector/net/net.go index 3703de9c2..7e445c096 100644 --- a/internal/collector/net/net.go +++ b/internal/collector/net/net.go @@ -391,7 +391,7 @@ func (c *Collector) collectNICAddresses(ch chan<- prometheus.Metric) error { return err } - convertNicName := strings.NewReplacer("(", "[", ")", "]") + convertNicName := strings.NewReplacer("(", "[", ")", "]", "#", "_") for _, nicAdapterAddress := range nicAdapterAddresses { friendlyName := windows.UTF16PtrToString(nicAdapterAddress.FriendlyName)