Switch organization in Grafana and import JSON panels from the previous organization

The error occurred when importing JSON panels from the previous organization, with the message 'Failed to upgrade legacy queries: Datasource was not found
“Hope someone can help me with this. Thanks.”

~ the grafana team

Welcome

You first need to install and create the data source and/or open thr dashboard and refresh the datasource in the dashboard

Thank you for your reply, but I have already set up the PrometheusServer. I will troubleshoot it myself first. Thank you again

1 Like

Hey guys, I found the reason. The error message was pretty clear (Failed to upgrade legacy queries Datasource XXXXXX was not found), it was because the data source could not be obtained through UID. However, I didn’t know where to find the correct UID. Fortunately, with the help of my colleague, we have completely solved the problem. :laughing:

1 Like

It seems to have been found in the JSON model