Created attachment 1330464 [details] CPU (Mhz) graph from C&U Description of problem: The Capacity & Utilization metrics values for "CPU (Mhz)" are too high by a factor of two for RHV VMs. This appears to be due to an erroneous :precision value of 2 in https://github.com/ManageIQ/ovirt_metrics/blob/12f9f5676e3bb2dacbd2effe08e284e158902465/lib/ovirt_metrics/column_definitions.rb#L24 For example the values retrieved by perf_collect_metrics for the graph shown in the attachment are as follows: Timestamp: 2017-09-22T16:17:16Z, :cpu_usagemhz_rate_average=>306.8928 Timestamp: 2017-09-22T16:17:36Z, :cpu_usagemhz_rate_average=>238.69440000000003 Timestamp: 2017-09-22T16:17:56Z, :cpu_usagemhz_rate_average=>272.7936 Timestamp: 2017-09-22T16:18:16Z, :cpu_usagemhz_rate_average=>170.496 Timestamp: 2017-09-22T16:18:36Z, :cpu_usagemhz_rate_average=>409.1904 Timestamp: 2017-09-22T16:18:56Z, :cpu_usagemhz_rate_average=>170.49 Timestamp: 2017-09-22T16:19:16Z, :cpu_usagemhz_rate_average=>272.7936} Timestamp: 2017-09-22T16:19:36Z, :cpu_usagemhz_rate_average=>238.69440000000003 Timestamp: 2017-09-22T16:19:56Z, :cpu_usagemhz_rate_average=>136.3968 Timestamp: 2017-09-22T16:20:16Z, :cpu_usagemhz_rate_average=>238.69440000000003 Timestamp: 2017-09-22T16:20:36Z, :cpu_usagemhz_rate_average=>306.8928 Timestamp: 2017-09-22T16:20:56Z, :cpu_usagemhz_rate_average=>375.0912 Timestamp: 2017-09-22T16:21:16Z, :cpu_usagemhz_rate_average=>136.3968 Timestamp: 2017-09-22T16:21:36Z, :cpu_usagemhz_rate_average=>375.0912 Timestamp: 2017-09-22T16:21:56Z, :cpu_usagemhz_rate_average=>272.7936 Timestamp: 2017-09-22T16:22:16Z, :cpu_usagemhz_rate_average=>375.0912 Timestamp: 2017-09-22T16:22:36Z, :cpu_usagemhz_rate_average=>375.0912 Timestamp: 2017-09-22T16:22:56Z, :cpu_usagemhz_rate_average=>613.7856 Timestamp: 2017-09-22T16:23:16Z, :cpu_usagemhz_rate_average=>511.488 Timestamp: 2017-09-22T16:23:36Z, :cpu_usagemhz_rate_average=>443.2896 Timestamp: 2017-09-22T16:23:56Z, :cpu_usagemhz_rate_average=>375.0912 Timestamp: 2017-09-22T16:24:16Z, :cpu_usagemhz_rate_average=>170.496 Timestamp: 2017-09-22T16:24:36Z, :cpu_usagemhz_rate_average=>204.5952 Timestamp: 2017-09-22T16:24:56Z, :cpu_usagemhz_rate_average=>170.496 Timestamp: 2017-09-22T16:25:16Z, :cpu_usagemhz_rate_average=>443.2896 Timestamp: 2017-09-22T16:25:36Z, :cpu_usagemhz_rate_average=>272.7936 Timestamp: 2017-09-22T16:25:56Z, :cpu_usagemhz_rate_average=>272.7936 Timestamp: 2017-09-22T16:26:16Z, :cpu_usagemhz_rate_average=>204.5952 Timestamp: 2017-09-22T16:26:36Z, :cpu_usagemhz_rate_average=>375.0912 Timestamp: 2017-09-22T16:26:57Z, :cpu_usagemhz_rate_average=>170.496 Timestamp: 2017-09-22T16:27:17Z, :cpu_usagemhz_rate_average=>204.5952 Version-Release number of selected component (if applicable): 5.8.1.5 How reproducible: Every Time. Steps to Reproduce: 1. Find a RHV VM in the WebUI, and go to the Monitoring -> Utilization button. Select Interval -> 'Most Recent Hour' metrics and show 10 minutes back. Observe the values for CPU (Mhz) 2. In Rails console, find the same VM, and call vm.perf_collect_metrics('realtime', 1.hour.ago). Identify the :cpu_usagemhz_rate_average values for the same time points that the graph showed Actual results: Observe that the real-time values retrieved from perf_collect_metrics are half the values shown in the graph. Expected results: The real-time values retrieved from perf_collect_metrics should match the values in the graph. Additional info: The :precision value of 2 is also set for disk_usage_rate_average and net_usage_rate_average so it's possible that these are also incorrect.
Shirly, can you please take a look?
Please set an environment we can check this in.
https://github.com/ManageIQ/ovirt_metrics/pull/25
https://github.com/ManageIQ/manageiq/pull/16616
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/34a1528e9536b81ad74b1645dce8186df4e6cafb commit 34a1528e9536b81ad74b1645dce8186df4e6cafb Author: Boris Odnopozov <bodnopoz> AuthorDate: Thu Dec 7 13:29:49 2017 +0200 Commit: Boris Odnopozov <bodnopoz> CommitDate: Thu Dec 7 13:29:49 2017 +0200 Bumping the ovirt_metrics gem version Several bug fixes are included in the new release, including: https://bugzilla.redhat.com/show_bug.cgi?id=1495133 https://bugzilla.redhat.com/show_bug.cgi?id=1487735 Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)