Project

General

Profile

Cleanup #48384

mgr/dashboard: remove GRAFANA_API_URL and validation through back-end

Added by Ernesto Puerta 5 months ago. Updated 6 days ago.

Status:
New
Priority:
High
Assignee:
-
Category:
dashboard/monitoring
Target version:
% Done:

0%

Tags:
grafana
Backport:
Reviewed:
Affected Versions:
Pull request ID:
Tags:

Description

There's this option GRAFANA_API_URL which is used for:
  • Pushing Grafana dashboards to Grafana. This is legacy/non-required functionality, as now Grafana Dashboards come embedded within the containerized Grafana
  • Allowing the front-end to detect whether Grafana is up and a specific Grafana Dashboard exists and provide some specific/fancy error messages (info boxes)

Given the second behaviour is a little convoluted (for the front-end to guess whether it can ping the same URL an iframe is going to import, a REST API is triggered to the backend and returned to the frontend) and partially incorrect (the backend could reach out Grafana, while the front-end couldn't). An alternative would be to directly interact and guess Grafana status from the front-end via iframe (either by onload() or a similar approach).

Screenshot from 2020-11-26 19-52-14.png View (22.6 KB) Ernesto Puerta, 11/26/2020 06:52 PM

History

#1 Updated by Ernesto Puerta 5 months ago

  • Description updated (diff)

#2 Updated by Patrick Seidensal 5 months ago

The two points you've listed are valid and describe what the options are additionally used for, but its main purpose is to be able to configure the URL to be used for the ceph dashboard frontend to Grafana. There's no way I can think of in which we can remove this setting and being able to configure a URL that the frontend then uses to show Grafana graphs (except for implementing a reverse proxy for Grafana into Ceph Dashboard, but this issue doesn't seem to be about that).

But removing the check of the ceph dashboard backend would work.

Would it make sense to change the scope of this issue to just
  1. remove the test of the CD backend to Grafana and
  2. implement something similar in the frontend?

#3 Updated by Ernesto Puerta 5 months ago

Patrick Seidensal wrote:

The two points you've listed are valid and describe what the options are additionally used for, but its main purpose is to be able to configure the URL to be used for the ceph dashboard frontend to Grafana. There's no way I can think of in which we can remove this setting and being able to configure a URL that the frontend then uses to show Grafana graphs (except for implementing a reverse proxy for Grafana into Ceph Dashboard, but this issue doesn't seem to be about that).

But removing the check of the ceph dashboard backend would work.

Would it make sense to change the scope of this issue to just
  1. remove the test of the CD backend to Grafana and
  2. implement something similar in the frontend?

Yeah, my intention was to decide whether we want to keep the one you added (for front-end only purpose) and discard this other older one. In fact, we can simply keep the former name GRAFANA_API_URL and remove the validation back-end-grafana functionality. What do you think?

#4 Updated by Ernesto Puerta 6 days ago

  • Project changed from mgr to Dashboard
  • Category changed from dashboard/monitoring to dashboard/monitoring

Also available in: Atom PDF