Old datasource referenced: templating init failed datasource named XX not found

We have made a dashboard, with graphs which was using a datasource named X (influxdb database X) .

After that , we have created a new datasource Y (influxdb database Y) and change X by Y in all panels

All graphs works but each time we choose this dashboard, we have an error popup “templating init failed, datasource named X was not found”.

i have exported the dashboard to json to see old datasource references, but there is nothing.

how to find the root cause?

Hi,

Sounds like you’re using template variables. Make sure that you’ve selected the correct datasource there as well.

Please let me know if this works.

Marcus

i thought too but in fact in variable definition no datasource was set …

i have just understood that if no one is selected the default one is used …which is the bad one

thanks. the pb disappeared.