prom_ex icon indicating copy to clipboard operation
prom_ex copied to clipboard

[BUG] Uploading a dashboard to two different folders problem

Open pallix opened this issue 3 years ago • 10 comments

It's currently not possible to upload the same dashboard to two different folders. In my setup I would like to have one folder for each deployment environment of the app, thus I need to upload the dashboard to different folders. Each folder contains the dashboard of an environment.

When uploading first to buga folder (when the application starts) and then to bugb folder (when the application start), dashboards in the buga folder disappear (or are moved to bugb).

I have written a small application to reproduce the problem: https://github.com/pallix/bug_prom_ex_two_folders

First run:

GRAFANA_API_KEY="here-the-key" GRAFANA_HOST="here-the-host" DEPLOYMENT_ENV=buga iex -S mix

and observe that the dashboards are correctly in buga, then run:

GRAFANA_API_KEY="here-the-key" GRAFANA_HOST="here-the-host" DEPLOYMENT_ENV=bugb iex -S mix

Now the dashboard from buga are not there anymore: Screenshot_2021-05-07 Dashboards Manage - Grafana(1)

pallix avatar May 07 '21 09:05 pallix

@akoutmos did you get any chance to look at it?

pallix avatar May 18 '21 12:05 pallix

I think I have come up with a solution to solve this problem without breaking backwards compatibility. Unfortunately I've been a bit swamped with work the past couple of weeks, and have this on the TODO list for next week.

akoutmos avatar May 18 '21 13:05 akoutmos

Glad to hear that! I had a harddrive crash so stuffs got delayed on my side too :-)

pallix avatar May 19 '21 08:05 pallix

I think I have come up with a solution to solve this problem without breaking backwards compatibility. Unfortunately I've been a bit swamped with work the past couple of weeks, and have this on the TODO list for next week.

@akoutmos any chance you could publish this branch, even if in a WIP state? Maybe someone else will be able to take up the baton.

b1az avatar Oct 11 '21 07:10 b1az

Same problem here. Looking forward to the fix :-)

herrnesto avatar Oct 19 '21 13:10 herrnesto

I am also running into this. Trying to leverage the same Grafana instance to view info on the same app, but in multiple environments. At the moment, we're looking at running a Grafana instance per environment. This is doable, but it would be nice to centralize if possible.

mwilsoncoding avatar Sep 08 '23 15:09 mwilsoncoding

Trying to leverage the same Grafana instance to view info on the same app, but in multiple environments.

In the end I solve it differently: we now have only one dashboard type for each environment and we use the labels and drop down menu from the Grafana dashboard. Look for Grafana templating and labels if you are interested in such a solution.

pallix avatar Sep 11 '23 08:09 pallix

Ah- I see now. At least in GKE, this works when only one instance of the app deploys dashboards to the grafana instance. The dashboards are already able to toggle between the instances of the application through the configured dropdowns even with them existing on separate clusters.

mwilsoncoding avatar Sep 20 '23 19:09 mwilsoncoding