Exporting and importing YAML dashboards

Hello everyone,

I just had to migrate my set-up and when exporting my dashboards, I saw an option in the dashboard export menu that said “V2 asset” or something like that and allowed me to choose between YAML and JSON dashboards. I prefer YAML, so that’s how I chose to export them.

Now, it turns out that I cannot import them in YAML. I don’t know what version of Grafana I had, but I don’t see an “import YAML” option and YAML to JSON translators are not getting the job done either.

Does anyone know whether there is a version of Grafana that allows importing and exporting YAML? I am sure there is at least one that allows for YAML dashboard exports.

Thank you in advance.

it is much easier to migrate using the grafana database and config files

Thank you for the tip, but the migration is already botched. My question now is: Does anyone know whether there is a version of Grafana that allows importing and exporting YAML?

Well, I found it. Grafana 12.3 allows exporting as YAML, but not importing:

Is there a way to import the YAML files that I created with Grafana 12.3.0?

If not, then at least write a warning so that people don’t export into formats that they cannot import with until its possible if ever?

I just don’t understand the point of allowing people to export into a format that they cannot import with. Am I missing something?

I would say that’s part of JSON schema v2 | Grafana documentation

Caution

Dashboard JSON schema v2 is an experimental feature. Engineering and on-call support is not available. Documentation is either limited or not provided outside of code comments. No SLA is provided.

I guess it is some bug/misconfiguration that’s visible in the UI of 12.3.

It’s easy to convert YAML to JSON (random link Transform YAML into JSON - Online YAML Tools).
As it is mentioned in the doc, it is experimental feature, so you can expect many problems. That’s the reason why good admins have backups ready - they can restore working state when something is going wrong.

But it is not mentioned anywhere on the interface that it is an experimental feature. 0 warnings and activated by default. So, how would any user who isn’t reading updates to the documentation or the code know about it?

These exports are exactly that, the backups. So, what do we want a backup for that we cannot restore?

And as stated above: the YAML - JSON converters are not doing the trick.

To me the answers you provide are hinting, but not satisfactory.

Ok, so you have backups. Now you need to dig into source code to find how it is implemented so you can import it.

IMHO: good admins are doing DB backup

OK. I have elected to observe silence. The resources of my mind are no longer at your disposal.

1 Like

Please lodge a bug in github