Deleting DataSources

We have some defunct data sources where the plugin no longer exists, and they are dead. Is there way in the GUI to delete a datasource? Or possibly via CLI?

Click on the Configuration gearwheel, select Data Sources, and you should get a
list of the data sources which are configured.

Click on one, and there should be a “delete” button at the bottom.

If not, let us know which version of Grafana you’re using and what you find
instead of the above.

Antony.

The above is what I get

Using Version 6.6.2

image001.jpg

1 Like

Same question as the original above. We DO have the delete button at the bottom but it’s unclickable. Why would that be when our new default data source is current and in use?

1 Like

I am stuck at the same screen. It continues to load and I’'m not able to delete the data source

I have the same screen

Ver 8.0.6

And when eventually it times out and gives me the option to delete, there is an error and the delete is unsuccessful

same issue here. and was not posible to delete from cli.


cat /etc/grafana/provisioning/datasources/ansible.yml     
apiVersion: 1
deleteDatasources:
- name: Prometheusssdss

will delete the datasource.

1 Like

To anyone having this problem now. To delete a Data Source from the GUI do the following:

  1. Access your dashboard through eg: http://grafana.staged-by-discourse.com

  2. After you login click on the gear icon in the bottom left corner >> Configuration >> Data Sources and the existing data sources will appear

  3. Click on the one you’d like to delete

  4. Scroll down and click on delete

In case your data source page is blank, you can do this via the API. Go to

http://your-grafana-url:3000/swagger-ui

On the top right there is an “Authorize” button which you need to do in order to login to Grafana. You need to be an admin. Then scroll down to “Datasources” and then “DELETE /databases/name/{name}”. Just put in the name of the DataSource (you can see if on the DataSources screen or just use the "GET /datasources above in the swagger-ui to find it) and then click execute.