windows_exporter
windows_exporter copied to clipboard
NIC name missing ?
Hi,
Everything is in the title, the name of the NIC interface seems to be missing, or I couldn't find it.
TYPE windows_net_bytes_received_total counter
windows_net_bytes_received_total{nic="vmxnet3_Ethernet_Adapter"} 4.7875466e+07 windows_net_bytes_received_total{nic="vmxnet3_Ethernet_Adapter__2"} 4.255629273e+09
The metrics shows the interface description instead name. Is there a way to display it ?
This is the name as far as Windows is concerned. What field/data did you expect instead?
I rather expect the name in this command :
Get-WmiObject Win32_NetworkAdapter | Select-Object -ExpandProperty NetConnectionID
See https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-networkadapter
NetConnectionID Data type: string Access type: Read/write Name of the network connection as it appears in the Network Connections Control Panel program.
NetConnectionID is not a member of the Win32_PerfRawData_Tcpip_NetworkInterface class, which is what this collector uses.
https://github.com/prometheus-community/windows_exporter/blob/b64ccbe68307385d9d9f2dcdffdcdd776216406e/collector/net.go#L148-L164
Is there a way to match the name that appears in class Win32_PerfRawData_Tcpip_NetworkInterface with the name in Win32_NetworkAdapter class ?
I agree, without this label the NET metrics are almost useless on any computer that have more than one NIC.
You can match Win32_NetworkAdapter
Name property with the Win32_NetworkAdapter
Name property and add the NetConnectionID as a name
label?
Get-WmiObject Win32_PerfRawData_Tcpip_NetworkInterface -Property Name | Select-Object Name | FT -Autosize
Get-WmiObject Win32_NetworkAdapter -Property Name, NetConnectionID | Select-Object Name, NetConnectionID | FT -Autosize
Up.
Any news about the nic name matching ?
No. I'd like to clarify that this is spare time work for us, and replying to "is it done yet" type comments takes time from that limited pool we have to spend. If this feature is important to you, we'd love to help review a pull request with code. If not, it'll be on the backlog if we have some extra time.
I really would like to help more about code, unfortunately no knowledge is limited to PowerShell / .NET languages. Go is very obscure for me and I don’t have enough tome to get into it.
Thx for the hard work! :)
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
I really think this one should be implemented
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.