Description of problem: The Max values displayed for CPU and CPU Usage, and for Memory and Memory usage, are inconsistent with each other. For example, a VM with seven daily metric rollup records shows the following under Normal Operating Ranges: CPU Max 46.29 MHz High 42.20 MHz Average 37.29 MHz Low 32.38 MHz CPU Usage Max 55.99% High 2.53% Average 1.47% Low 0.40% Memory Max 69.01 MB High 69.19 MB Average 66.85 MB Low 64.5 MB Memory Usage Max 14.99% High 2.57% Average 2.31% Low 2.06% The max CPU Usage value (55.99%) is found by taking the highest maximum realtime cpu usage value (min_max[:abs_max_cpu_usage_rate_average_value]) from all of the daily metric rollups. This value is ~38 times greater than the Average CPU Usage value (1.47%), yet the corresponding Max and Average CPU (MHz) values differ only by a factor of ~1.24 times. It looks like the Max CPU value is actually being taken from the max value of cpu_usagemhz_rate_average: vmdb_production=# select max(cpu_usagemhz_rate_average) from metric_rollups where capture_interval_name='daily' and resource_id=636; max ------------------ 46.2881087514149 (1 row) This is showing the maximum of the daily averages, not the realtime maximum. The same discrepancy can be seen for the Max value under Memory and Memory Usage. Version-Release number of selected component (if applicable): 5.8.1.0. How reproducible: 100% Steps to Reproduce: 1.) Gather one or more days' worth of C&U data for a VM. 2.) View Normal Operating Ranges data for the VM in the web UI. Actual results: Inconsistent Max values shown for CPU/CPU Usage and for Memory/Memory Usage. Expected results: The Max values displayed for CPU MHz and Memory MB should be consistent with the Max values for CPU Usage and Memory Usage. Either they should both display the all-time realtime max values, or they should both display the max daily average values. Additional info:
The fix for CPU is merged: https://github.com/ManageIQ/manageiq/pull/16195 The fix for memory is being reviewed: https://github.com/ManageIQ/manageiq/pull/16224
Both PRs are merged.
Verified on 5.9.0.9.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:0380