Is there a way to list all dashbaords that use a datasource in Grafana?

We are making changes to some of our datasources and are looking for a way to find all dashboards using these datasources. Is there a way to list all dashbaords using a datasource?

1 Like

I don’t think there’s an “off-the-shelf” way. You’d probably need to iterate through each of the dashboard definitions and check whether any panels (or template variables) use that datasource. To do that you could either:
a) Write a script that pulls each dashboard’s JSON definition via the API and does a text search for the datasource name. (probably the “right” way to do this, but requires some effort)
b) Run a SQL query to search the Grafana database. You’d need to search through the data column of the dashboard table. (probably the quicker way, provided you have direct access to the DB)

If you’re using the (default) SQLite Grafana database, you could also open up grafana.db in a visual explorer (like and quickly filter the dashboard definitions with that.


Dear Nayana,


On, we regularly are facing the same requirements.

As pointed out by @svetb, Grafana itself doesn’t offer such a feature, but we implemented the other day, which exactly does


We already wrote some more about this at:

We will be happy to hear about whether this was helpful to you. Please let us know if you need further assistance with grafana-wtf.

With kind regards,


This looks useful, we will give this a try and see how it works for us. WIll get back here to let you know how it went, Thanks

1 Like

This tool is great and has helped me a lot