Dashboard provisioning problem with data source uid

Dear community,

I have a Grafana installation with several organizations. All of the organizations have same data source (but with different uid) and I would like to automatically provision same dashboard to all of them. I have tried to export the dashboard with and without the “share externally” but in both cases, error: data source not found. In one case because the full uid of the data source is not found, in the other case, the variable is not found. I also tried to add and env variable with the uid of the data source but same problem. Could someone give me an idea on how to do what I need? I think it is not an strange thing what I am trying to do.

Thanks in advance

Create datasource type variable and configure it so that it will select exactly that one datasource by name, which you need. So you can have my-prometheus-org1,my-prometheus-org2,my-prometheus-orgX and:

Then used that datasource variable in panels.

All orgs can have the same dashboard now because that variable will select exactly that datasource, which is available in that org and which is matching conditions. No need to play with datasource uids (they can be completely random now - you don’t care with this setup).

Thank you very much. I just tried and worked!! Really appreciate your help.