Bug 1903977

Summary: Fix Trend Dashboards to show 5/3 entities
Product: [oVirt] ovirt-engine-dwh Reporter: Aviv Litman <alitman>
Component: GrafanaAssignee: Aviv Litman <alitman>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Novotny <pnovotny>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4.4CC: gdeolive, mperina, sradco
Target Milestone: ovirt-4.4.5Keywords: ZStream
Target Release: 4.4.5.4Flags: pm-rhel: ovirt-4.4+
pm-rhel: planning_ack+
sradco: devel_ack+
gdeolive: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-dwh-4.4.5.4 Doc Type: Bug Fix
Doc Text:
Cause: Queries in Trend Dashboard did not show 5 entities Consequence: In Trend Dashboard the queries display less then 5 hosts or vms (in the most utilized queries) Fix: move the condition 'host_status = 1' Result: In Trend Dashboard the queries display 5 hosts or vms (if there is 5 active hosts/vms).
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-18 15:14:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Metrics RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screenshot 1
none
screenshot 2 none

Description Aviv Litman 2020-12-03 09:27:24 UTC
Created attachment 1736015 [details]
Screenshot 1

Created attachment 1736015 [details]
Screenshot 1

Created attachment 1736015 [details]
Screenshot 1

Created attachment 1736015 [details]
Screenshot 1

Created attachment 1736015 [details]
Screenshot 1

Description of problem:
In Trend Dashboard the queries display less then 5 hosts or vms (in the most utilized queries), because the internal query first limited to 5 and then the external query was filtered by active host status.
The fix is to move the condition 'host_status = 1' from the external query to the internal query.

In Hosts/VMS Trend Dashboard the queries display less then 5/3 interfaces/disks because there are different disk/interface ID for the same disk/interface name.
The fix is to add the name of the Host/VM next to the disk/interface nam,
This way it will not be averaged by the name of the disk/interface but by the name of the disk/interface + the name of the host/vm

Steps to Reproduce:
1. Go to 'oVirt Trend Dashboards'
2. go to ' Trend Dashboard'/'Hosts/VMS Trend Dashboard'
3. The wrong panels are:
Trend:
Five Most Utilized Hosts by Memory (over time) (BR4B)
Five Most Utilized Hosts by CPU (over time) (BR4B)
Hosts:
Top 5 Busiest Ethernet Interfaces Tx and Rx Rates (over time) (BR2A) 
VMS:
Top 5 Most Utilized Disks Read and Write Rates (over time) (BR10A) 
Top 3 Most Utilized Network Interfaces Tx and Rx Rates (over time) (BR10A) 

Screenshot 1 : 
present an example of the above panels when showing only 2 hosts ( instead of 5 hosts ).

Five Most Utilized Virtual Machines by Memory (over time) (BR11)
Five Most Utilized Virtual Machines by CPU (over time) (BR11)
Screenshot 2 : 
present an example of the above panels when showing only 1 vm ( instead of 5 vms ).

Notes for qe:
In Trend Dashboard check and make sure that all four panels show 5 entities exactly no matter which period is selected (unless there are less than 5 entities in the cluster then it makes sense - you can see how many active entities there are by deleting the 'limit 5' line in the code).

for hosts/vms trend dashboards check that all panels show 2 rates for 5/3 entities.

Comment 1 RHEL Program Management 2020-12-03 09:27:31 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 2 Aviv Litman 2020-12-03 09:28:25 UTC
Created attachment 1736016 [details]
screenshot 2

Comment 3 Pavel Novotny 2021-03-16 20:16:59 UTC
Verified in
ovirt-engine-4.4.5.9-0.1.el8ev.noarch
ovirt-engine-dwh-4.4.5.5-1.el8ev.noarch

The Hosts & VMs Trend Dashboards now show all 5 hosts/VMs/disks or 3 NICs in the Top X Most Utilized panels.

Comment 4 Sandro Bonazzola 2021-03-18 15:14:20 UTC
This bugzilla is included in oVirt 4.4.5 release, published on March 18th 2021.

Since the problem described in this bug report should be resolved in oVirt 4.4.5 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.