Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grafana multi-org and dashboard links #3826

Open
1 of 3 tasks
Tracked by #3558
Rotfuks opened this issue Jan 13, 2025 · 4 comments
Open
1 of 3 tasks
Tracked by #3558

grafana multi-org and dashboard links #3826

Rotfuks opened this issue Jan 13, 2025 · 4 comments
Assignees
Labels
team/atlas Team Atlas

Comments

@Rotfuks
Copy link
Contributor

Rotfuks commented Jan 13, 2025

When we have dashboards spread in multiple grafana organizations, the links to grafana dashboards that we have for instance in alerts may be broken.

ie, this link: https://grafana.gaggle.azuretest.gigantic.io/d/kube-builder-operators/kube-builder-operators
uses the defaut org, and becomes: https://grafana.gaggle.azuretest.gigantic.io/d/kube-builder-operators/kube-builder-operators?orgId=1
But as the dashboard is private, it will be in the Giant Swarm organization, so it should be: https://grafana.gaggle.azuretest.gigantic.io/d/kube-builder-operators/kube-builder-operators?orgId=2

We can't just add the orgId to the URL, as we have no guaranty of consistency of the orgIds across all installations.

Idea:
Is there a parameter that would match the org by name instead of by orgId?

Todo

  • Push the discussion in upstream how to handle org-ids in a clean way
  • Enforce the creation of the giantswarm org in second position behind shared org to enforce id 1 (shared org) and 2 (gaitnswarm org) for both.
  • Change the links in the alerts to include the org id - blocked by Release the new Mimir Alertmanager #3752
@Rotfuks
Copy link
Contributor Author

Rotfuks commented Jan 20, 2025

Soooo I feel like this is something we need to address at least for the giantswarm and shared organisations. If we want to link backstage to managed dashboards we need to make sure this works.

These are also the two main use cases I see at this point: Alerts and stuff going to giantswarm org dashboards and fully managed dashboards being linked in backstage.

Therefore imo we need to fix those two at least.

Is it possible to "hardcode" the creation order of the shared and giantswarm organisation to make sure those always have the same ids (1 and 2) across all installations to ensure the links to those two organisations dashboards always work?

For the rest we can add a disclaimer into the public docs I think.
What's your opionion here @QuentinBisson ?

@QuentinBisson
Copy link

QuentinBisson commented Jan 20, 2025

So, no :D

I mean, we can be sure that the grafana organization named shared org will have org id 1
and that the giant swarm organization will be id 2 in the beginning but any restart might change this one.

So if we want to enforce some kind of id, maybe we should allow users to set the org id in a way? Or always make sure the giantswarm org is processed first in the operator?
That would not solve the issues for customers though but unless we have an UID provided upstream or we enable persistence well.

Unless we want to add a proxy that sets the correct header?

@Rotfuks
Copy link
Contributor Author

Rotfuks commented Jan 20, 2025

That was the idea, that for any restart, we make sure the giantswarm org is processed first - or handled the same way as the shared org, to always get the id 2?

@QuentinBisson
Copy link

We theoretically could yes but as long as grafana does not offer a proper UID for datasources then this will also hit customers

@QuentinBisson QuentinBisson self-assigned this Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team/atlas Team Atlas
Projects
Status: Inbox 📥
Development

No branches or pull requests

2 participants