[ZBX-18663] Template "Windows CPU by Zabbix agent", does not recognize the number of CPUs. Created: 2020 Nov 16 Updated: 2020 Nov 20 |
|
Status: | Confirmed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Templates (T) |
Affects Version/s: | 5.2.0 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Stefan Sabolowitsch | Assignee: | Zabbix Development Team |
Resolution: | Unresolved | Votes: | 0 |
Labels: | templates | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Windows Server 2019 |
Attachments: |
![]() ![]() ![]() ![]() ![]() |
Description |
Hi there, The error message: Value of type "string" is not suitable for value type "Numeric (unsigned)" The correct value is returned with powershell wmic CPU get NumberOfCores,NumberOfLogicalProcessors NumberOfCores NumberOfLogicalProcessors 6 12 |
Comments |
Comment by Aleksandrs Pahomovs [ 2020 Nov 19 ] |
Hello, Original template query is like "wmic cpu get NumberOfLogicalProcessors" and answer is 12 for you. Cannot be reproduced with 5.2.0 and Win Server 2019. |
Comment by Stefan Sabolowitsch [ 2020 Nov 19 ] |
Hi, maybe it's because of the agent we use v2 |
Comment by Stefan Sabolowitsch [ 2020 Nov 19 ] |
Found the Bug ! wmi select ist wrong:
wmi.get[root/cimv2,"Select NumberOfLogicalProcessors from Win32_ComputerSystem"]
correct without quotation marks! wmi.get[root/cimv2, Select NumberOfLogicalProcessors from Win32_ComputerSystem] i get now without quotation marks the correct value: C:\Program Files\Zabbix Agent 2>zabbix_agent2.exe -t "wmi.getall[root/cimv2, Select NumberOfLogicalProcessors from Win32_ComputerSystem]" wmi.getall[root/cimv2, Select NumberOfLogicalProcessors from Win32_ComputerSystem][s|[{"Name":"SFG05","NumberOfLogicalProcessors":12}]] |
Comment by Stefan Sabolowitsch [ 2020 Nov 19 ] |
@Aleksandrs Pahomovs OK, It's a little strange
C:\Program Files\Zabbix Agent 2>zabbix_agent2.exe -t "wmi.get[root/cimv2, Select NumberOfLogicalProcessors from Win32_ComputerSystem]"
wmi.get[root/cimv2, Select NumberOfLogicalProcessors from Win32_ComputerSystem][s|SFG05]
What's going on here ? |
Comment by Stefan Sabolowitsch [ 2020 Nov 20 ] |
Basically there are two bugs, one is the template with the wrong WIMI Select and agent2 that it cannot (always) read the value. |