-
Problem report
-
Resolution: Fixed
-
Major
-
5.0.2
-
Windows Server 2012 R2
-
Sprint 67 (Aug 2020), Sprint 68 (Sep 2020), Sprint 69 (Oct 2020), Sprint 70 (Nov 2020), Sprint 71 (Dec 2020)
-
0.25
Steps to reproduce:
Have an agent running agent2.
The standard windows template contains an item Template Module Windows CPU by Zabbix agent active: Number of cores - key wmi.get[root/cimv2,"Select NumberOfLogicalProcessors from Win32_ComputerSystem"]
Result:
item "hostname:wmi.get[root/cimv2,"Select NumberOfLogicalProcessors from Win32_ComputerSystem"]" became not supported: Value of type "string" is not suitable for value type "Numeric (unsigned)". Value "HOSTNAME"
Expected:
The item should work. In my particular example it shows 2 with the traditional agent.
Hint:
Playing with zabbix_get and slightly modifying the query seems to show that agent2 actually gets more properties than asked for and that might cause confusion.
- zabbix_get -s hostname -k 'wmi.getall[root/cimv2,Select NumberOfLogicalProcessors from Win32_ComputerSystem]'
[\{"Name":"HOSTNAME","NumberOfLogicalProcessors":2}]
Doing the same with a traditional agent yielded (only the requested property):
- zabbix_get -s hostname -k 'wmi.getall[root/cimv2,Select NumberOfLogicalProcessors from Win32_ComputerSystem]'
[\{"NumberOfLogicalProcessors":2}]