[ZBX-19267] Windows (any version): Agent2 incorrectly handle WMI requests sometimes Created: 2021 Apr 20 Updated: 2025 May 20 |
|
Status: | Confirmed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent2 plugin (G) |
Affects Version/s: | 5.0.10 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Anth0ny | Assignee: | Zabbix Development Team |
Resolution: | Unresolved | Votes: | 1 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() ![]() ![]() |
||||||||
Issue Links: |
|
Description |
Steps to reproduce:
Result: (debug logging level 4) received passive check request: 'wmi.get[root\cimv2,Select LicenseStatus From SoftwareLicensingProduct where ProductkeyID IS NOT NULL and Name like "Windows%"]' from '172.16.1.2' Expected: Windows Agent 4.4.5 log file: Requested [wmi.get[root\cimv2,Select LicenseStatus From SoftwareLicensingProduct where ProductkeyID IS NOT NULL and Name like "Windows%"]] |
Comments |
Comment by Anth0ny [ 2021 Apr 20 ] | ||||||||||||||
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/sppwmi/softwarelicensingproduct WQL : Select LicenseStatus From SoftwareLicensingProduct where ProductkeyID IS NOT NULL and Name like "Windows%" What can return with this query
| ||||||||||||||
Comment by Anth0ny [ 2021 Apr 20 ] | ||||||||||||||
At ALL Agent v. 4.* versions all looks correct. Not tested for Windows Agent\Agent2 5.2 or Agent 5.0.10 | ||||||||||||||
Comment by Anth0ny [ 2021 Apr 21 ] | ||||||||||||||
Direct request with WMIExplorer works fine. But from test via Agent2 5.0.10 i always got "Empty result" Item test Expected result Unexpected result | ||||||||||||||
Comment by Mickael Martin [ 2022 Jun 28 ] | ||||||||||||||
Hello, Same thing for me : 2022/06/28 09:25:23.028253 plugin WindowsPerfMon: executing collector task 2022/06/28 09:25:23.609048 sending passive check response: ZBX_NOTSUPPORTED: 'Empty WMI search result.' to 'x.x.x.x' So I got a fail check at https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/internal/agent/scheduler/task.go#296 wmi.get[root\cimv2,select status from Win32_DiskDrive where Name like '%PHYSICALDRIVE0%'] -> Work and Get-WmiObject -Query "Select LicenseStatus From SoftwareLicensingProduct where ProductkeyID IS NOT NULL and Name like 'Windows%'" returns data. Maybe related to https://support.zabbix.com/browse/ZBX-18643 ? | ||||||||||||||
Comment by Mickael Martin [ 2023 Apr 18 ] | ||||||||||||||
Another tests : With getall, works wmi.getall[root\cimv2,Select LicenseStatus From SoftwareLicensingProduct where Name like "Windows%" and ProductkeyID IS NOT NULL][s|[{"LicenseStatus":1}]] With the uint32 LicenseStatus , not works
wmi.get[root\cimv2,Select LicenseStatus From SoftwareLicensingProduct where Name like "Windows%" and ProductkeyID IS NOT NULL][m|ZBX_NOTSUPPORTED] [Empty WMI search result.]
with string Description, works wmi.get[root\cimv2,Select Description From SoftwareLicensingProduct where Name like "Windows%" and ProductkeyID IS NOT NULL][s|Windows(R) Operating System, VOLUME_MAK channel] with another uint32... not works
wmi.get[root\cimv2,Select LicenseStatusReason From SoftwareLicensingProduct where Name like "Windows%" and ProductkeyID IS NOT NULL][m|ZBX_NOTSUPPORTED] [Empty WMI search result.]
But, works with GracePeriodRemaining a another uint32..
wmi.get[root\cimv2,Select GracePeriodRemaining From SoftwareLicensingProduct where Name like "Windows%" and ProductkeyID IS NOT NULL][s|0]
All tests before with zabbix_agent2 Win64 (Zabbix) 6.2.8 With non-go version, works :
wmi.get[root\cimv2,Select LicenseStatus From SoftwareLicensingProduct where Name like "Windows%" and ProductkeyID IS NOT NULL] [u|1]
| ||||||||||||||
Comment by Mickael Martin [ 2023 Nov 27 ] | ||||||||||||||
Hello, Can you provide a correction for the future v7, please? We have this bug for 2 years. |