[ZBX-24724] Windows by Zabbix agent template network discovery issue when adapter disabled Created: 2024 Jun 25  Updated: 2024 Jun 27

Status: Open
Project: ZABBIX BUGS AND ISSUES
Component/s: Templates (T)
Affects Version/s: 7.0.0
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Julien Lacasse-Roger Assignee: Bartosz Mickiewicz (Inactive)
Resolution: Unresolved Votes: 0
Labels: templates
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 22.04, Windows 10, Zabbix 7.0.0 (server+agent+template)



 Description   

Steps to reproduce:

  1. Disable network interface on Windows host (ie "Intel(R) Wi-Fi 6E AX211 160MHz") using WMI:
get-wmiobject -class win32_networkadapter -namespace root\CIMV2 | Where-Object {$_.Name -match 'Wireless' -or $_.Name -match 'WiFi' -or $_.Name -match 'Wi-Fi' -or $_.Name -match '802.11'} | % {$_.Disable()}
  1. Apply "Windows by Zabbix agent" template to Windows host.
  2. Get output for "Windows: Network interfaces WMI get" item, i.e :
[{"Description":"Intel(R) Wi-Fi 6E AX211 160MHz","GUID":"{043513DC-2598-44AE-83AA-86705F12409E}","Name":"Intel(R) Wi-Fi 6E AX211 160MHz","NetConnectionID":"WiFi","NetConnectionStatus":4},{"AdapterTypeId":0,"Description":"Intel(R) Ethernet Connection (17) I219-LM","GUID":"{5437D9AB-09F1-45D3-9229-F9525BE64551}","Name":"Intel(R) Ethernet Connection (17) I219-LM","NetConnectionID":"LAN","NetConnectionStatus":2,"Speed":"1000000000"},{"AdapterTypeId":0,"Description":"Bluetooth Device (Personal Area Network)","GUID":"{8392BE0F-E294-4B5B-8527-BDE3803A8A68}","Name":"Bluetooth Device (Personal Area Network)","NetConnectionID":"Bluetooth Network Connection","NetConnectionStatus":7,"Speed":"3000000"}] 
  1. Notice the missing "AdapterTypeId" tag for the disabled interface.
  2. Item prototype "Interface type" is created but check is unsupported due to missing adapter type is WMI data:
Preprocessing failed for: [{"AdapterTypeId":0,"Description":"Intel(R) Ethernet Connection (7) I219-LM","GUID":"{B72CD6F8-B6...
1. Failed: cannot extract value from json by path "$[?(@.GUID == "{D341492D-CD63-4E88-A011-AEBF326FF6C1}")].AdapterTypeId.first()": no data matches the specified path
  1. Adapter ID is indeed null for disabled adapter when queried from powershell.
Get-WmiObject -Query "select Name,Description,NetConnectionID,Speed,AdapterTypeId,NetConnectionStatus,GUID from win32_networkadapter where PhysicalAdapter=True and NetConnectionStatus>0"

__GENUS             : 2
__CLASS             : Win32_NetworkAdapter
__SUPERCLASS        :
__DYNASTY           :
__RELPATH           :
__PROPERTY_COUNT    : 7
__DERIVATION        : {}
__SERVER            :
__NAMESPACE         :
__PATH              :
AdapterTypeId       : 
Description         : Intel(R) Wi-Fi 6E AX211 160MHz
GUID                : {043513DC-2598-44AE-83AA-86705F12409E}
Name                : Intel(R) Wi-Fi 6E AX211 160MHz
NetConnectionID     : WiFi
NetConnectionStatus : 7
Speed               : 9223372036854775807
PSComputerName      :

Result:

see above

Expected:

Would expect the error to be handled or item creation skipped altogether. 

Workaround:

Use {$NET.IF.IFNAME.NOT_MATCHES} macro to skip interface discovery altogether. 
OR
Enable interface on host (Adapter



 Comments   
Comment by Julien Lacasse-Roger [ 2024 Jun 27 ]

I'll add that disabling the interface via device manager or powershell removes the interface from WMI output so problem only occurs if interface was disabled using WMI. So kind of an edge case. 

Generated at Tue May 13 09:22:50 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.