-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
7.0.0
-
Ubuntu 22.04, Windows 10, Zabbix 7.0.0 (server+agent+template)
Steps to reproduce:
- 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()}
- Apply "Windows by Zabbix agent" template to Windows host.
- 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"}]
- Notice the missing "AdapterTypeId" tag for the disabled interface.
- 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
- 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