[ZBX-16257] Incorrect network interface description on win32 Created: 2019 Jun 13  Updated: 2024 Apr 10  Resolved: 2019 Jun 21

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 4.2.3
Fix Version/s: None

Type: Patch request Priority: Minor
Reporter: Boris P. Korzun Assignee: Michael Veksler
Resolution: Change request declined Votes: 0
Labels: agent, items, lld, patch, usability
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows Vista or greater


Attachments: PNG File Screenshot from 2019-06-21 15-23-57.png     Text File discovery.orig.txt     Text File discovery.txt     Text File zabbix_win32_net.patch    
Issue Links:
Causes
causes ZBXNEXT-5286 Additional element {#IFALIAS} to net.... Open
Team: Team A
Sprint: Sprint 53 (Jun 2019)

 Description   

There's a strange behaviour of WinAPI function GetIfTable() since Windows Vista on some environments (ex, LBFO Teaming in Windows Server 2012 R2 etc).
The fuction usually returns a network adapter name (or friendly name, user-setted name) as MIB_IFROW.bDescr (ex, Ethernet). But sometime (on certain environments) it returns an adapter driver name (ex, "Microsoft Network Adapter Multiplexor Driver #2") instead friendly name. But there isn't problem if it use MIB_IF_ROW2.Alias.
An user can set a friendly name by renaming the network adapter to "LAN" or "Team" etc. But user cannot rename and renumber an adapter driver name.
I suggest to change the zbx_ifrow_get_utf8_description() function for using MIB_IF_ROW2.Alias instead MIB_IF_ROW2.Description.

I've attached two net.if.discovery - original with MIB_IF_ROW2.Description (discovery.orig.txt) and patched with MIB_IF_ROW2.Alias (discovery.txt).



 Comments   
Comment by Boris P. Korzun [ 2019 Jun 13 ]

The problem has appeared after https://support.zabbix.com/browse/ZBX-10063

There wasn't a problem in Zabbix agent 2.2.19

Comment by Michael Veksler [ 2019 Jun 21 ]

Not reasonable to change 'Description' to 'Alias', because we get less informative picture

 

But net.if.discovery may return an 'Alias' as additional element {#IFALIAS} and users can use the Alias value in the name of Items

Comment by Boris P. Korzun [ 2019 Jul 25 ]

In ZBXNEXT-5286 I've suggested the patch that returned 'Alias' as {#IFALIAS} also.

Generated at Fri Apr 26 06:19:45 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.