Cannot access dashboard - Template variables could not be initialized

Hello there, I created a dashboard and used it for a couple of days, then I am stuck in this:
image
which when canceling gives me an error (only the first time though) which is: variable $variable_name could not be initialized. I recognize that is a variable I use in the queries, defined in the Variable section of the dashboard as a query.

The problem is that I cannot even access the dashboard for exporting it and manually try to remove the issue using a text editor.
Thanks in advance for your help,
regards

Using Grafana 8.3.5 Docker.

I would use:

  • Dashboard HTTP API | Grafana Labs to export dashboard json model
  • text editor to edit dashboard json model (I would completely remove broken dashboard variable)
  • API again to update that broken dashboard
  • browser to redefine dashboard variable in the Grafana UI (don’t save until you are sure that variable is getting correct values)

A few requests with Postman/curl and you should be good.

1 Like

Thanks a lot! I haven’t considered using HTTP API.