2016-10-21 17:01:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								+++
							 
						 
					
						
							
								
									
										
										
										
											2020-10-02 05:13:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								title = "Export and import"
							 
						 
					
						
							
								
									
										
										
										
											2016-10-21 17:01:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								keywords = ["grafana", "dashboard", "documentation", "export", "import"]
							 
						 
					
						
							
								
									
										
										
										
											2021-04-16 05:08:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								aliases = ["/docs/grafana/latest/reference/export_import/"]
							 
						 
					
						
							
								
									
										
										
										
											2020-10-02 05:13:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								weight = 800
							 
						 
					
						
							
								
									
										
										
										
											2016-10-21 17:01:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								+++
							 
						 
					
						
							
								
									
										
										
										
											2015-03-10 15:55:42 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-10-02 05:13:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# Export and import
  
						 
					
						
							
								
									
										
										
										
											2015-03-10 15:55:42 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-01-27 20:41:15 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								Grafana Dashboards can easily be exported and imported, either from the UI or from the [HTTP API ]({{< relref "../http_api/dashboard.md#create-update-dashboard" >}} ).
							 
						 
					
						
							
								
									
										
										
										
											2016-10-21 17:01:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-11 06:19:56 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								## Exporting a dashboard
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-25 21:21:45 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								Dashboards are exported in Grafana JSON format, and contain everything you need (layout, variables, styles, data sources, queries, etc) to import the dashboard at a later time.
							 
						 
					
						
							
								
									
										
										
										
											2015-08-11 06:19:56 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-01-30 16:20:55 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								The export feature is accessed in the share window which you open by clicking the share button in the dashboard menu.
							 
						 
					
						
							
								
									
										
										
										
											2015-08-11 06:19:56 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-07-23 00:59:19 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								{{<  docs-imagebox  img = "/img/docs/export/export-modal.png"  max-width = "800px"  > }}
							 
						 
					
						
							
								
									
										
										
										
											2015-08-11 06:19:56 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-06-23 19:21:30 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								### Making a dashboard portable
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								If you want to export a dashboard for others to use then it could be a good idea to
							 
						 
					
						
							
								
									
										
										
										
											2016-12-08 16:14:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								add template variables for things like a metric prefix (use constant variable) and server name.
							 
						 
					
						
							
								
									
										
										
										
											2016-06-23 19:21:30 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-12-08 16:14:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								A template variable of the type `Constant`  will automatically be hidden in
							 
						 
					
						
							
								
									
										
										
										
											2020-05-13 15:45:03 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								the dashboard, and will also be added as a required input when the dashboard is imported.
							 
						 
					
						
							
								
									
										
										
										
											2016-06-23 19:21:30 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-11 06:19:56 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								## Importing a dashboard
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-11-10 04:26:49 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								To import a dashboard click the + icon in the side menu, and then click **Import** .
							 
						 
					
						
							
								
									
										
										
										
											2016-06-22 00:24:25 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 20:10:57 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								{{<  docs-imagebox  img = "/img/docs/v70/import_step1.png"  max-width = "700px"  > }}
							 
						 
					
						
							
								
									
										
										
										
											2016-06-22 00:24:25 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 20:10:57 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								From here you can upload a dashboard JSON file, paste a [Grafana.com ](https://grafana.com ) dashboard
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								URL or paste dashboard JSON text directly into the text area.
							 
						 
					
						
							
								
									
										
										
										
											2016-06-22 00:24:25 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 20:10:57 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								{{<  docs-imagebox  img = "/img/docs/v70/import_step2_grafana.com.png"   max-width = "700px"  > }}
							 
						 
					
						
							
								
									
										
										
										
											2016-06-22 00:24:25 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								In step 2 of the import process Grafana will let you change the name of the dashboard, pick what
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								data source you want the dashboard to use and specify any metric prefixes (if the dashboard use any).
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-20 17:20:32 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								## Discover dashboards on Grafana.com
  
						 
					
						
							
								
									
										
										
										
											2016-06-22 00:24:25 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-20 17:20:32 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								Find dashboards for common server applications at [Grafana.com/dashboards ](https://grafana.com/dashboards ).
							 
						 
					
						
							
								
									
										
										
										
											2016-06-22 00:24:25 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-01-31 00:12:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								{{<  docs-imagebox  img = "/img/docs/v50/gcom_dashboard_list.png"  max-width = "700px"  > }}
							 
						 
					
						
							
								
									
										
										
										
											2016-06-22 00:24:25 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-07-23 00:59:19 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								## Import and sharing with Grafana 2.x or 3.0
  
						 
					
						
							
								
									
										
										
										
											2016-06-22 00:24:25 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-20 17:20:32 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								Dashboards on Grafana.com use a new feature in Grafana 3.1 that allows the import process
							 
						 
					
						
							
								
									
										
										
										
											2020-05-01 13:43:05 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								to update each panel so that they are using a data source of your choice. If you are running a
							 
						 
					
						
							
								
									
										
										
										
											2016-06-22 00:24:25 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								Grafana version older than 3.1 then you might need to do some manual steps either
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								before or after import in order for the dashboard to work properly.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Dashboards exported from Grafana 3.1+ have a new json section `__inputs` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								that define what data sources and metric prefixes the dashboard uses.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Example:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```json
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  "__inputs": [
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      "name": "DS_GRAPHITE",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      "label": "graphite",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      "description": "",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      "type": "datasource",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      "pluginId": "graphite",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      "pluginName": "Graphite"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    },
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      "name": "VAR_PREFIX",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      "type": "constant",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      "label": "prefix",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      "value": "collectd",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      "description": ""
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }
							 
						 
					
						
							
								
									
										
										
										
											2020-09-25 21:21:45 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								  ]
							 
						 
					
						
							
								
									
										
										
										
											2016-06-22 00:24:25 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								These are then referenced in the dashboard panels like this:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```json
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  "rows": [
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        "panels": [
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            "type": "graph",
							 
						 
					
						
							
								
									
										
										
										
											2020-09-25 21:21:45 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								            "datasource": "${DS_GRAPHITE}"
							 
						 
					
						
							
								
									
										
										
										
											2016-06-22 00:24:25 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								          }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  ]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								These inputs and their usage in data source properties are automatically added during export in Grafana 3.1.
							 
						 
					
						
							
								
									
										
										
										
											2017-03-20 17:20:32 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								If you run an older version of Grafana and want to share a dashboard on Grafana.com you need to manually
							 
						 
					
						
							
								
									
										
										
										
											2019-09-20 06:04:56 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								add the inputs and templatize the data source properties like above.
							 
						 
					
						
							
								
									
										
										
										
											2016-06-22 00:24:25 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-20 17:20:32 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								If you want to import a dashboard from Grafana.com into an older version of Grafana then you can either import
							 
						 
					
						
							
								
									
										
										
										
											2016-06-22 00:24:25 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								it as usual and then update the data source option in the metrics tab so that the panel is using the correct
							 
						 
					
						
							
								
									
										
										
										
											2020-04-02 02:00:01 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								data source. Another alternative is to open the json file in a text editor and update the data source properties
							 
						 
					
						
							
								
									
										
										
										
											2016-06-22 00:24:25 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								to value that matches a name of your data source.
							 
						 
					
						
							
								
									
										
										
										
											2015-08-11 06:19:56 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-11-29 01:17:36 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								## Note
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								In Grafana v5.3.4+ the export modal has new checkbox for sharing for external use (other instances). If the checkbox is not checked then the `__inputs`  section will not be included in the exported JSON file.