Skip to content

Commit

Permalink
net: fix sanitize # on the nic label for windows_net_nic_address_info (
Browse files Browse the repository at this point in the history
…#1839)

Signed-off-by: Jan-Otto Kröpke <[email protected]>
  • Loading branch information
jkroepke authored Jan 17, 2025
1 parent f73a74b commit f0f3d0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/collector/net/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f0f3d0d

Please sign in to comment.