Per Dashboard model, persistent URLs and API changes, the dashboard URL format is:
/d/:uid/:slug
Say, I have a dashboard called “Here goes some title”. So the slug
part of the URL will be here-goes-some-title
. Now, if I change the uid
from its initial random value to here-goes-some-title
, then the final URL will be:
http://grafana.example.com/d/here-goes-some-title/here-goes-some-title
Which doesn’t look too nice. Even if the uid
and title were just one word long, still such duplication doesn’t look nice.
Can the slug
part be dropped somehow? The dashboard is perfectly discoverable by just http://grafana.example.com/d/here-goes-some-title
, but once it’s opened, the slug
part is added to the URL in the address bar.
Also, the slug
seems to be a bit useless, because even http://grafana.example.com/d/here-goes-some-title/pklfjhltdhsdkdigntkdyvhdsdspfkb
still opens the “Here goes some title” dashboard.
Why are you trying to remove the uuid part of the url? Having a uuid keeps the dashboard url unique. We added this as it is quite common to want to have dashboards with the same slug but in different folders.
Perhaps, I am missing something, but in http://grafana.example.com/d/here-goes-some-title/here-goes-some-title
the second here-goes-some-title
(which is the slug
) is absolutely redundant.
The first here-goes-some-title
(which is uid
) already makes the dashboard URL to be unique. And of course I don’t want to remove it.
If you have enough dashboards and a couple of teams then you will end up having dashboards with generic names like “Application Metrics”. Adding a uid like d/000000029/application-metrics
means that they don’t clash.
It also allows you to rename your dashboard without having to change the link. d/000000029/my-old-name
will still work even though the slug is wrong.
That’s what I did, I renamed the dashboard’s uid
from
http://grafana.example.com/d/000000029/here-goes-some-title
to
http://grafana.example.com/d/here-goes-some-title/here-goes-some-title
So now the URL looks a bit ridiculous, as the slug
(which comes from the dashboard title) became redundant.
1 Like