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

Allow integration from multiple instances of the same charm without overwriting the first dashboard created #310

Closed
amandahla opened this issue Mar 21, 2024 · 4 comments

Comments

@amandahla
Copy link

Enhancement Proposal

I would like to integrate multiple instances of the same charm with Grafana, creating one dashboard for each integration.

Reason: deploy and integrate different versions of the charm so will not be the same dashboard for every instance integrated.

Reference:
https://matrix.to/#/!nHXpRkcSNJHlHdUGbQ:ubuntu.com/$8c6wHO28xRmdBwrGwzndugr1SZWPupyIIk3F1ebUK_I?via=ubuntu.com&via=matrix.org

@amandahla amandahla changed the title Allow integration from multiple instances of the same charm without overwriting the first one created Allow integration from multiple instances of the same charm without overwriting the first dashboard created Mar 21, 2024
@sed-i
Copy link
Contributor

sed-i commented Mar 21, 2024

Currently, dashboards are intentionally named on disk this way to avoid duplicates:

$ juju ssh --container grafana grafana/0 ls -1 /etc/grafana/provisioning/dashboards 
default.yaml
juju_alertmanager-k8s_e9224b0.json
juju_loki-k8s_0804127.json
juju_prometheus-k8s_35dd368.json
self_dashboard.json

So if you're changing the contents of the dashboard, its sha256 would change and the dashboards won't overwrite each other.

One way of forcing it is modifying the dashboard's uid.

But I'm not clear on the use case. Why would you want to do that? The means of differentiating one instance from another is via the dashboard dropdowns.

@amandahla
Copy link
Author

So, by changing the content, would I have two different dashboards with the same title then?

@chanchiwai-ray
Copy link

I think the active provisioning system in Grafana don't like the dashboards with the same title: see issue #303

@lucabello
Copy link
Contributor

Closing because I believe this is solved via the suggestions above; please feel free to reopen if this is still an issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants