[ZBX-17369] Zabbix 4.4: wmi.getall[] - incorrect output for values with real32 type Created: 2020 Feb 25  Updated: 2024 Apr 10  Resolved: 2021 Jan 18

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 4.4.5
Fix Version/s: 5.0.8rc1, 5.2.4rc1, 5.4.0alpha1, 5.4 (plan)

Type: Problem report Priority: Trivial
Reporter: Igor Zobun Assignee: Dmitrijs Goloscapovs
Resolution: Fixed Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Official Zabbix appliance (Zabbix version 4.4, release 4.4.5 of Jan 29, 2020)
OS: Installation CD/DVD (.iso) on the VM Hyper-V 1-st generation under Windows 10.
Agent: x64, version (build): 4.4.5.2400
OpenHardwareMonitor: 0.8.0.5 Alpha (compiled from sources)


Team: Team C
Sprint: Sprint 69 (Oct 2020), Sprint 70 (Nov 2020), Sprint 71 (Dec 2020), Sprint 72 (Jan 2021)
Story Points: 0.25

 Description   

Problem:
wmi.getall[] - returns incorrect value when using data type real32
 

Usage:

 C:\Program Files\Zabbix Agent>zabbix_get -s 127.0.0.1 -k wmi.get[root\OpenHardwareMonitor,"select Max from sensor where (Parent LIKE '%RAM%' AND SensorType = \"Load\")"]

Returned value: 79.757965

C:\Program Files\Zabbix Agent>zabbix_get -s 127.0.0.1 -k wmi.getall[root\OpenHardwareMonitor,"select Max from sensor where (Parent LIKE '%RAM%' AND SensorType = \"Load\")"]

Returned value: [\{"Max":4635312884778270720.}]

Description:
When using wmi.getall[], if the object parameters have type Real32 the returned value is incorrect. When using wmi.get[] there's no such issue.

Tried to debug it, the returned value using key wmi.getall[] as to IEEE 754 (decimal number represented in hex) - the resulted value is incorrect. Also it falls over the 32-bits.

P.S. Also the left-most dot after the digits looks suspicious.



 Comments   
Comment by Igor Zobun [ 2020 Feb 25 ]

In the example of returned data

"[\{"Max":4635312884778270720.}]" 

there's a typo, symbol "\" shouldn't be there.

Comment by Alexey Pustovalov [ 2020 Feb 25 ]

Please show the output of the WMI request, without using Zabbix.

Comment by Igor Zobun [ 2020 Feb 25 ]

Result of native WMI request:

C:\Program Files\Zabbix Agent>wmic /Namespace:\\ROOT\OpenHardwareMonitor Path Sensor Where (Parent LIKE '%RAM%' and SensorType = 'Load') Get Max /Format:List

Returned value: Max=58,50438

Comment by dimir [ 2020 Feb 26 ]

Guys, this is international issue tracker. Think of a non-russian-speaker user. Please care to translate everything to English.

What needs to be translated:

  • issue title
  • description
  • environment
Comment by Igor Zobun [ 2020 Feb 26 ]

Well. I'll do it later.

Comment by Igor Zobun [ 2020 Feb 26 ]

This problem may be related to the Zabbix agent, not the Zabbix server...

Comment by Khatsayuk Alexander [ 2020 Apr 15 ]

Hello 4ernomor, could you say if the ZBX has any updates? Is it really Zabbix agent bug?

Comment by Igor Zobun [ 2020 Apr 15 ]

Greetings!
I am not yet forced to use the wmi.getall[] key for OHM.
In this case, the LLD via WMI is a ghost

Comment by Dmitrijs Goloscapovs [ 2021 Jan 11 ]

Available in versions:

Generated at Sun May 18 08:14:50 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.