I’m running Grafana in a Docker container using version 9.1.5, and I’m currently trying to upgrade it to the latest version. However, when I try to provision my dashboards, I’m encountering JSON parsing errors in the UI. I would like to know if there are any differences in the JSON format between version 9.1.5 and the latest versions.
Welcome @saadeddinetaleb98
your title says import but your description says provisioning which a different process in grafana. Which approach are you using?
Also what backend are you using for grafana? sqlite or mysql?
I’m using SQLite and trying to provision JSON dashboards through an external application that calls the Grafana API. In version 9.4.9, it worked fine, but after upgrading to newer versions, I’m encountering a JSON parsing error
There are 2 types of import/export in Grafana: UI and API. They produce different (but similar) JSON files, so you can’t mix them easily.
The easiest way:
1.) Go to Grafana 9.4.9 and export that dashboard in the UI (enable “Export the dashboard to use in another instance” feature - that probably has a different name in the old version)
2.) Go to the latest Grafana (e.g. 11.5.1) and import the file created in 1.) - load dashboard in the browser, fix warnings (e.g. usage of old deprecated panel types) and save it there.
3.) Use API and export the dashboard from the latest Grafana
4.) Use the file from 3.) in your external application that calls the Grafana API
Since this is an upgrade path, I would keep it simple
Copy the data folder to the newest version, I always use a staged migration of the next full version 9-> copy to 10 then run an test → copy to 11 then run an test
In a test environment