Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1910045

Summary: Update data source in all dashboards
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.5Flags: alitman: needinfo-
pm-rhel: ovirt-4.4+
gdeolive: testing_ack+
Target Release: 4.4.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-dwh-4.4.5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-18 15:13:30 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
Example none

Description Aviv Litman 2020-12-22 12:53:42 UTC
Created attachment 1741380 [details]
Example

Created attachment 1741380 [details]
Example

Created attachment 1741380 [details]
Example

Created attachment 1741380 [details]
Example

Description of problem:
We want to change the data source from oVirt DWH to null so the user will be able to change the default data source name or to set a different default data source, and it automatically changes for all dashboards.

Currently dashboards are only being questioned by a data source called oVirt DWH. 
When the fix takes effect the dashboards will be able to query any data source that will be set as default no matter what its name.

Version-Release number of selected component (if applicable):
4.4.4

How reproducible:
100%

Steps to Reproduce:
1.go to any dashboard (json) in the repo:/ovirt-dwh/packaging/conf/grafana-dashboards/

Actual results:
on the json file:
at the top:
{
  "__inputs": [
    {
      "name": "oVirt DWH"
      "label": "oVirt DWH"

at several places in the file:
"datasource": "oVirt DWH"

Expected results:
on the json file:
at the top:
{
  "__inputs": [
    {
      "name": null
      "label": null

at several places in the file:
"datasource": null

Notes for QA:
Until now we could not change the name of the data source but now with the help of the change it will be possible to change the name or set a different default data source.
Because Grafana adds the data source name when importing the dashboards,
first need to check all 18 Jason's file under /ovirt-dwh/packaging/conf/grafana-dashboards/.
for each Jason file/ Dashboard nees to check:

1. In the start of the Json name and label are null:
{
  "__inputs": [
    {
      "name": null
      "label": null

2. Along the file the lines "datasource": is null:
"datasource": null

second need to check that the dashboars works in Grafana and even if you change the data source name it will still work:
On the left side in Grafana go to 'Configuration' -> 'Data Sources' -> change the default data source name from 'oVirt DWH' to different name, 
and check that the dashboards still works.

Comment 3 RHEL Program Management 2020-12-22 12:55:14 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 4 Pavel Novotny 2021-03-16 20:50:42 UTC
Verified in
ovirt-engine-4.4.5.9-0.1.el8ev.noarch
ovirt-engine-dwh-4.4.5.5-1.el8ev.noarch

Changing the default data source name from oVirt DWH to something else is possible. All the dashboards still work after the rename.

In the dashboard json files, all 'name' and 'label' keys now have 'null' value:

# grep -r -A3 __inputs /usr/share/ovirt-engine-dwh/conf/grafana-dashboards/ | egrep 'name|label' | grep -vc 'null'
0

The 'datasource' key is set to 'null' (the '-- Grafana --' value in grep below is used only in the 'annotations' section):

# grep -r '"datasource":' /usr/share/ovirt-engine-dwh/conf/grafana-dashboards/ | egrep -vc 'null|\-\- Grafana \-\-'
0

Comment 5 Sandro Bonazzola 2021-03-18 15:13:30 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.