mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-07 21:46:37 +00:00
net: fix sanitize # on the nic label for windows_net_nic_address_info (#1839)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -391,7 +391,7 @@ func (c *Collector) collectNICAddresses(ch chan<- prometheus.Metric) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
convertNicName := strings.NewReplacer("(", "[", ")", "]")
|
convertNicName := strings.NewReplacer("(", "[", ")", "]", "#", "_")
|
||||||
|
|
||||||
for _, nicAdapterAddress := range nicAdapterAddresses {
|
for _, nicAdapterAddress := range nicAdapterAddresses {
|
||||||
friendlyName := windows.UTF16PtrToString(nicAdapterAddress.FriendlyName)
|
friendlyName := windows.UTF16PtrToString(nicAdapterAddress.FriendlyName)
|
||||||
|
|||||||
Reference in New Issue
Block a user