Dashboard ID in URL problems

HI!

Im provisioning my environments with Ansible and keep running into a problem with the dashboards.
I want to include some standard dashboards in all environments.

Maybe someone has an idea on this.

This is how I would want it to be:
The first time I run my ansible job it uploads my standard dashboards.
On the next run (and all other runs) it sees that the dashboard is already uploaded and simply updates it if there are any changes.
Users can access the same dashboard at the same URL every time.

This is how it is now:
The first time I run my ansible job, it creates the standard dashboard with a POST.
On the next run

  • if I use POST it creates another dashboard with the same name
  • if I use PUT I first need a script to check which ID the dashboard has, and then update it
    or
  • I use a script to find the IDs of dashboards with a specific name and DELETE them
  • Use POST to upload the standard dashboards again
    Anyway I do it, I can not be certain that I can give a user an URL to a dashboard and know that it will be correct all the time. Since the ID will change.

So is there anyway to be sure that a dashboard always gets the same ID, or can I access them by NAME somehow?

All the best!
Lars

@hasselrot Are you asking about Grafana or Chronograf?

That sir, is an excellent question! :slight_smile:

Im talking about Chronograf, in grafana it seems possible to access by dashboard name.

@hasselrot This is a use case that we should support. I’ve created a issue to track: As a user, when navigating to a dashboard, I can use the dashboard's name/slug in place of its id in the resource url · Issue #1290 · influxdata/chronograf · GitHub

We’ll find some time to discuss this next week and flesh out our path forward. Thanks for bringing this to our attention!

@lukevmorris Thats great!

Hi @hasselrot, are the scripts you created available by any chance?

Thanks