How to import grafana dashboard json file manually

sivanesan1 picture sivanesan1 · Jul 3, 2019 · Viewed 10.6k times · Source

I have exported the dashboard in json format.

I want to import the json file manually to create the same dashboard in new grafana instance.

While googling i got some related information but finding difficulties to implement successfully.

From the site Grafana API link i got the code snippet like,

POST /api/dashboards/db HTTP/1.1 Accept: application/json Content-Type: application/json Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

{ “dashboard”: { “id”: null, “uid”: null, “title”: “Production Overview”, “tags”: [ “templated” ], “timezone”: “browser”, “schemaVersion”: 16, “version”: 0 }, “folderId”: 0, “overwrite”: false }

The above code snippet looks like we can create new dashboard with existing json file but i have no idea of how to implement this code snippet successfully.

Somebody guide me how to achieve this?

Answer

Vinay Mishra picture Vinay Mishra · Jul 3, 2019

There are two techniques to copy the current dashboard - if you want to export this

  1. Go to Current Grafana Dashboard
  2. Select the Share button on the top enter image description here
  3. Select the Export Button and Copy the JSON or save it as JSON enter image description here

Create new Grafana dashboard and copy this JSON model to

  • Click on the Setting button on the top
  • Click on JSON Model - from left panel enter image description here
  • Past the JSON & Save the dashboard and run

Please let me know if you have any issue.