[ZBX-18982] windows network template problem Created: 2021 Feb 06 Updated: 2022 Jan 12 Resolved: 2022 Jan 12 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G), Agent2 plugin (G), Server (S) |
Affects Version/s: | 5.0.8 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Minor |
Reporter: | zlq | Assignee: | Zabbix Development Team |
Resolution: | Duplicate | Votes: | 1 |
Labels: | templates | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Zabbix Server OS: CentOS 7.9.2009 |
Attachments: |
![]() ![]() ![]() |
||||||||
Issue Links: |
|
Description |
Steps to reproduce:
Expected:
|
Comments |
Comment by zlq [ 2021 Feb 06 ] |
|
Comment by Aigars Kadikis [ 2021 Feb 09 ] |
Thank you for registering this use case. Not sure we can mark this as a bug. Why windows is allowing adapter names with the same name and same description? As a workaround I can offer to modify preprocessing rule inside discovery section. Install additional field 'IFNETCONNECTIONID' to later mark item as unique: output = JSON.parse(value).map(function(net){ return { "{#IFNAME}": net.Name, "{#IFDESCR}": net.Description, "{#IFPHYSICALADAPTER}": net.PhysicalAdapter, "{#IFALIAS}" : net.NetConnectionID, "{#IFNETENABLED}": net.NetEnabled, "{#IFNETSTATUS}": net.NetConnectionStatus, "{#IFNETCONNECTIONID}": net.NetConnectionID, "{#IFSPEED}": net.Speed }}) return JSON.stringify({"data": output}) After that add in every item prototype: There is a lot of item prototypes to modify! Let us know if workaround helps. |
Comment by zlq [ 2021 Feb 13 ] |
Thank you for reply. But I think this method only works well for dependent items. For zabbix agent items not work. The items for example net.if.in, net.if.out, cannot add additional params. And the results from the WMI query also cannot make the network interface name like "HPE Ethernet 1Gb 4-port 331i Adapter #3", which get from zabbix agent discovery item "net.if.discovery" and can successfully collect data. |
Comment by Aigars Kadikis [ 2021 Feb 16 ] |
Thank you for clearance with 'net.if.in' and 'net.if.out' agent keys. I agree with you, we do not have a solution yet to cover this situation with Zabbix agent. Currently, 'net.if.in' and 'net.if.out' keys only accept one dimension for interface identification. The second argument is dedicated to the mode: net.if.in["{#IFNAME}",<mode>] net.if.out["{#IFNAME}",<mode>] I think a fast patch would be to have a third argument for 'NetConnectionID'. |
Comment by Aigars Kadikis [ 2021 Feb 16 ] |
Confirming problem. Additional use case occurred with another client. Here is discovery data: [ { "Description": "Broadcom NetXtreme Gigabit Ethernet", "Name": "Broadcom NetXtreme Gigabit Ethernet", "NetConnectionID": "NIC1", "NetConnectionStatus": 4 }, { "Description": "Broadcom NetXtreme Gigabit Ethernet", "Name": "Broadcom NetXtreme Gigabit Ethernet", "NetConnectionID": "NIC4", "NetConnectionStatus": 4 }, { "Description": "Broadcom NetXtreme Gigabit Ethernet", "Name": "Broadcom NetXtreme Gigabit Ethernet", "NetConnectionID": "NIC2", "NetConnectionStatus": 4 }, { "Description": "Broadcom NetXtreme Gigabit Ethernet", "Name": "Broadcom NetXtreme Gigabit Ethernet", "NetConnectionID": "NIC3", "NetConnectionStatus": 4 }, { "AdapterTypeId": 0, "Description": "QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)", "Name": "QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)", "NetConnectionID": "SLOT 4 2 Port 2", "NetConnectionStatus": 2, "Speed": "10000000000" }, { "Description": "QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)", "Name": "QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)", "NetConnectionID": "SLOT 4 2 Port 1", "NetConnectionStatus": 4 } ] |
Comment by Mike [ 2021 Jun 06 ] |
I have the same problem on many hosts and none of the many versions of agent updates have fixed it yet. |
Comment by Michael Veksler [ 2022 Jan 12 ] |
Closed as duplicate of |