[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:
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()}
[{"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"}]
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
Get-WmiObject -Query "select Name,Description,NetConnectionID,Speed,AdapterTypeId,NetConnectionStatus,GUID from win32_networkadapter where PhysicalAdapter=True and NetConnectionStatus>0"
__GENUS : 2 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. |
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. |