[SOLVED] How can I delete a provisioned dashboard?

Hi, I am running Grafana v6.5.1, I have done a bit of searching but cannot find a method to delete a provisioned dashboard.

Obviously, you cannot delete a provisioned dashboard by simply pressing the delete button.

So far I have tried:

  • Removing the reference to the dashboard in provisioning.yml.
    Dashboard is still there, and trying to delete gives the usual “cannot delete provisioned dashboard”

  • Removing the reference to the dashboard in provisioning.yml AND deleting the JSON file.
    Dashboard is still there, and trying to delete gives the usual “cannot delete provisioned dashboard”

I haven’t tried deleting the folder, but I guess that is what I would try next. I’d really rather not as there are multiple dashboards in the folder.

  • ¯_(ツ)_/¯ Not really sure what else I can try…
2 Likes

I have figured out a method to delete the provisioned dashboard but it involves manually modifying the Grafana database. Here are the most straight forward instructions to do it:

This was tested on: Grafana v6.5.1

Warning: These intructions will manually modify the Grafana database. Proceed at your own risk!!

  1. Remove the reference to the dashboard in provisioning.yaml

  2. Delete the dashboard JSON file (not sure if this step is required but I had already deleted mine by this stage)

  3. Connect to the sqlite database: sqlite3 /var/lib/grafana/grafana.db

  4. Find the id of your provisioned dashboard: select id, name from dashboard_provisioning;
    6|My Dashboard

  5. Delete the entry: delete from dashboard_provisioning where id = 6; Use step 4 again to check everything went as planned.

  6. Quit sqlite: .quit

  7. Go back into the web UI and you will now be able to delete the provisioned dashboard.

1 Like

this solved my same issue, change your container to root access:
in compose file add this line :

...
services:
    grafana:
        build: .
        user: root
        ports:
            - "3000:3000"
        depends_on:
            - prometheus
...

and run again, remove your dashboards, and change this access to normal user.