Bug 1910045 - Update data source in all dashboards
Summary: Update data source in all dashboards
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine-dwh
Classification: oVirt
Component: Grafana
Version: 4.4.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.4.5
: 4.4.5
Assignee: Aviv Litman
QA Contact: Pavel Novotny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-22 12:53 UTC by Aviv Litman
Modified: 2021-03-18 15:13 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-dwh-4.4.5
Clone Of:
Environment:
Last Closed: 2021-03-18 15:13:30 UTC
oVirt Team: Metrics
Embargoed:
alitman: needinfo-
pm-rhel: ovirt-4.4+
gdeolive: testing_ack+


Attachments (Terms of Use)
Example (103.47 KB, image/png)
2020-12-22 12:53 UTC, Aviv Litman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 112779 0 master MERGED Update data source in all dashboards 2021-01-31 17:57:46 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.