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
- 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!