

# Dashboards
<a name="dashboard-overview"></a>

****  
This documentation topic is designed for Grafana workspaces that support **Grafana version 8.x**.  
For Grafana workspaces that support Grafana version 12.x, see [Working in Grafana version 12](using-grafana-v12.md).  
For Grafana workspaces that support Grafana version 10.x, see [Working in Grafana version 10](using-grafana-v10.md).  
For Grafana workspaces that support Grafana version 9.x, see [Working in Grafana version 9](using-grafana-v9.md).

 A *dashboard* is a set of one or more panels organized and arranged into one or more rows. Amazon Managed Grafana ships with a variety of panels. Amazon Managed Grafana makes it easy to construct the right queries and customize the display properties so that you can create the dashboard you need. Each panel can interact with data from any configured data source. 

## Manage dashboards
<a name="manage-dashboards"></a>

 To control the time period for the dashboard, you can use the [Time range controls](dashboard-time-range-controls.md) in the upper right of the dashboard. 

 Dashboards can use templates and variables to make them more dynamic and interactive. For more information, see [Templates and variables](templates-and-variables.md). 

 Dashboards can use [Annotations](dashboard-annotations.md) to display event data across panels. This can help correlate the time series data in the panel with other events. 

 Dashboards can be shared easily in a variety of ways. For more information, see [Sharing a dashboard](share-a-dashboard.md). 

 Dashboards can be tagged, and the dashboard picker provides quick, searchable access to all dashboards in a particular organization. 

## Rows
<a name="dashboard-rows"></a>

 A *row* is a logical divider within a dashboard. It is used to group panels together. 

 Rows are always 12 *units* wide. These units are automatically scaled based on the horizontal resolution of your browser. You can control the relative width of panels within a row by setting their specific width. 

 Amazon Managed Grafana uses a unit abstraction to optimize appearance on all screen sizes. 

**Note**  
 With MaxDataPoint functionality, Amazon Managed Grafana can display the required number of data points, regardless of resolution or time range. 

 To collapse a row, choose the row title. If you save a dashboard with a row collapsed, the dashboard is saved in that state, and those graphs do not load until you expand the row. 

 Use the repeating rows functionality to dynamically create or remove entire rows of panels, based on the template variables selected. 

# Annotations
<a name="dashboard-annotations"></a>

****  
This documentation topic is designed for Grafana workspaces that support **Grafana version 8.x**.  
For Grafana workspaces that support Grafana version 12.x, see [Working in Grafana version 12](using-grafana-v12.md).  
For Grafana workspaces that support Grafana version 10.x, see [Working in Grafana version 10](using-grafana-v10.md).  
For Grafana workspaces that support Grafana version 9.x, see [Working in Grafana version 9](using-grafana-v9.md).

 Annotations provide a way to mark points on the graph with rich events. When you pause on an annotation, you can see an event description and event tags. The text field can include links to other systems for more detail. 

## Native annotations
<a name="native-annotations"></a>

 Amazon Managed Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel. 

## Adding annotations
<a name="adding-annotations"></a>

 To add an annotation, press **Ctrl** or **Cmd** and choose where you want to add the annotation. To make the annotation searchable from other dashboards, add tags to it. 

### Adding region annotations
<a name="adding-regions-events"></a>

 To create an annotation for a region, press **Ctrl** or **Cmd** while you choose the region. 

### Built-in query
<a name="annotation-built-in-query"></a>

 After you add an annotation, it remains visible. This is because a built-in annotation query exists on all dashboards. This annotation query fetches all annotation events that originate from the current dashboard and displays them on the panel where they were created. This includes alert state history annotations. You can stop annotations from being fetched and displayed by choosing the **Dashboard settings** (gear) icon, choosing **Annotations**, and then modifying the query named `Annotations & Alerts (Built-in)`. 

 When you copy a dashboard using the **Save As** feature, the new dashboard has a new dashboard ID, so annotations created on the source dashboard are not visible on the copy. If the source dashboard annotations have tags to filter by, you can show the annotations on the copy by adding a new **Annotation Query** and filtering by the tags. 

### Query by tag
<a name="annotation-query-by-tag"></a>

 You can create new annotation queries that fetch annotations from the native annotation store by using the `-- Grafana --` data source and setting **Filter by** to **Tags**. Specify at least one tag. For example, create an annotation query named `outages`, and specify a tag named `outage`. This query will show all annotations that you create (from any dashboard or via API) that have the `outage` tag.

By default, if you add multiple tags in the annotation query, Amazon Managed Grafana will show only annotations that have all the tags you supplied. To show annotations that contain at least one of the tags you supplied, turn on **Match any**. 

 In Amazon Managed Grafana, it’s possible to use template variables in the tag query. For example, if you have a dashboard showing stats for different services and a template variable that controls which services to show, you can use the same template variable in your annotation query to show annotations for only those services. 

## Querying other data sources
<a name="querying-other-data-sources"></a>

 Annotation events are fetched by using annotation queries. To add a new annotation query to a dashboard, choose the **Dashboard settings** (gear) icon, choose `Annotations`, and then choose **New**. 

 Specify a name for the annotation query. This name is displayed by the check box for showing or hiding annotation events for this query. For example, you might have two annotation queries named `Deploys` and `Outages`. You can select or clear the check boxes to specify which annotations to show. 

### Annotation query details
<a name="annotation-query-details"></a>

 The annotation query options are different for each data source. 
+ [Annotations using Graphite query editor](https://docs.aws.amazon.com/en_us/grafana/latest/userguide/using-graphite-in-AMG.html#graphite-annotations)
+ [Annotations using OpenSearch data source](https://docs.aws.amazon.com/en_us/grafana/latest/userguide/ES-use-datasource.html#ES-annotations)
+ [Annotations using Prometheus](https://docs.aws.amazon.com/en_us/grafana/latest/userguide/using-prometheus-datasource.html#p-annotations)
+ [Annotations using MySQL](https://docs.aws.amazon.com/en_us/grafana/latest/userguide/using-mysql-in-AMG.html#mysql-annotations)
+ [Annotations using PostgreSQL](https://docs.aws.amazon.com/en_us/grafana/latest/userguide/using-postgresql-in-AMG.html#postgresql-annotations)

# Dashboard folders
<a name="dashboard-folders"></a>

****  
This documentation topic is designed for Grafana workspaces that support **Grafana version 8.x**.  
For Grafana workspaces that support Grafana version 12.x, see [Working in Grafana version 12](using-grafana-v12.md).  
For Grafana workspaces that support Grafana version 10.x, see [Working in Grafana version 10](using-grafana-v10.md).  
For Grafana workspaces that support Grafana version 9.x, see [Working in Grafana version 9](using-grafana-v9.md).

 Folders are a way to organize and group dashboards. This is useful if you have a lot of dashboards or if multiple teams use the same Grafana workspace. 

## Creating a folder
<a name="how-to-create-a-folder"></a>

To create a folder, do one of the following:
+  On the side menu, under the \$1 icon, choose the **Create Folder** link. 
+  On the **Manage Dashboards** page, choose the **Create Folder** button. 

 On the **Create Folder** page, enter a unique name for the folder, and then choose **Create**. 

When saving a dashboard, you can either choose an existing folder or create a new folder.

## Manage dashboards
<a name="folders-manage-dashboards"></a>

 On the **Manage Dashboards** page, you can perform a variety of tasks: 
+  Create a folder. 
+  Create a dashboard. 
+  Move dashboards into folders. 
+  Delete multiple dashboards. 
+  Navigate to a folder page (where you can set permissions for a folder or its dashboards). 

## Dashboard Folder page
<a name="dashboard-folder-page"></a>

 To open a Dashboard Folder page, choose the cog icon that appears when you pause on a folder in the dashboard list in the search results or on the Manage Dashboards page. 

 The Dashboard Folder page is similar to the Manage Dashboards page. On the Dashboard Folder page, you can perform the following tasks: 
+  Move or delete dashboards in a folder. 
+  Rename a folder (on the **Settings** tab). 
+  Set permissions for the folder (inherited by dashboards in the folder). 

## Permissions
<a name="folder-permissions"></a>

 Permissions can be assigned to a folder and inherited by the dashboards that it contains. An Access Control List (ACL) is used where **Organization Role**, **Team** and Individual **User** can be assigned permissions. For more information, see [Dashboard and folder permissions](dashboard-and-folder-permissions.md). 

# Playlist
<a name="dashboard-playlist"></a>

****  
This documentation topic is designed for Grafana workspaces that support **Grafana version 8.x**.  
For Grafana workspaces that support Grafana version 12.x, see [Working in Grafana version 12](using-grafana-v12.md).  
For Grafana workspaces that support Grafana version 10.x, see [Working in Grafana version 10](using-grafana-v10.md).  
For Grafana workspaces that support Grafana version 9.x, see [Working in Grafana version 9](using-grafana-v9.md).

 A playlist is a list of dashboards that are displayed in a sequence. You can use a playlist to build situational awareness or to present your metrics to your team or visitors. 

 Amazon Managed Grafana automatically scales dashboards to any resolution, including big screens. 

 You can access the **Playlist** feature from the side menu, in the **Dashboards** submenu. 

## Creating a playlist
<a name="create-a-playlist"></a>

 A playlist presents dashboards in a sequence, with a set order and a time interval between dashboards. 

1.  To access the **Playlist** feature, pause on the side menu. 

1.  Choose **Playlists**. 

1.  Choose **New playlist**. 

1.  In the **Name** text box, enter a name for your playlist. 

1.  In the **Interval** text box, enter a time interval. 

   The time interval is the amount of time for Amazon Managed Grafana to stay on a particular dashboard before advancing to the next one on the playlist. 

1.  Next to each dashboard that you want to add to your playlist, choose **Add to playlist**. 

1.  Choose **Create**. 

## Editing a playlist
<a name="edit-a-playlist"></a>

 You can edit playlists while creating them or after saving them. 

1.  To access the Playlist feature, pause on the side menu. 

1.  Choose **Playlists**. 

1.  Choose the playlist that you want to edit. 

### Editing the name of a playlist
<a name="edit-the-name-of-a-playlist"></a>

1. Choose the **Name** text box.

1.  Edit the name. 

1.  Choose **Save** to save your changes. 

### Editing the interval of a playlist
<a name="edit-the-interval-of-a-playlist"></a>

1.  Choose the **Interval** text box. 

1.  Edit the interval. 

1.  Choose **Save** to save your changes. 

### Adding a dashboard to a playlist
<a name="add-a-dashboard-to-a-playlist"></a>

1.  Next to the dashboard that you want to add, choose **Add to playlist**. 

1.  Choose **Save** to save your changes. 

### Searching for a dashboard to add
<a name="search-for-a-dashboard-to-add"></a>

1. Under **Add dashboards**, choose the **Search dashboards by name** text box. 

1.  Enter a name or regular expression. 

1. If needed, filter your results by starred status or tags. By default, your starred dashboards appear as options to add to the playlist.

1.  Choose **Save**to save your changes. 

### Rearranging dashboard order
<a name="rearrange-dashboard-order"></a>

1.  Next to the dashboard that you want to move, choose the up or down arrow. 

1.  Choose **Save** to save your changes. 

### Removing a dashboard
<a name="remove-a-dashboard"></a>

1.  Choose the x icon to remove a dashboard from the playlist. 

1.  Choose **Save** to save your changes. 

### Deleting a playlist
<a name="delete-a-playlist"></a>

1.  Choose **Playlists**. 

1.  Next to the playlist that you want to delete, choose the x icon. 

## Saving a playlist
<a name="save-a-playlist"></a>

 You can save a playlist to add it to your **Playlists** page, where you can start it. Be sure to add all the dashboards that you want to appear in your playlist before you save it. 

1.  To access the **Playlist** feature, pause on the side menu. 

1.  Choose **Playlists**. 

1.  Choose the playlist. 

1.  Edit the playlist. 

   Ensure that your playlist has a **Name**, **Interval**, and at least one **Dashboard** added to it. 

1.  Choose **Save**. 

## Starting a playlist
<a name="start-a-playlist"></a>

 You can start a playlist in five different view modes. The mode determines how the menus and navigation bar are displayed on the dashboards. 

 By default, each dashboard is displayed for the amount of time entered in the **Interval** field, which can be set while creating or editing a playlist. After you start a playlist, you can control it by using the navbar at the top of your screen. 

1.  On the **Dashboards** menu, choose **Playlists**. 

1.  Next to the playlist that you want to start, choose **Start playlist**. 

1.  In the dropdown list, choose one of the following display modes: 
   +  **Normal mode** 
     +  The side menu remains visible. 
     +  The navbar, row, and panel controls appear at the top of the screen. 
   +  **TV mode** 
     +  The side menu is hidden or removed. 
     +  The navbar, row, and panel controls appear at the top of the screen. 
     +  TV mode is turned on automatically after 1 minute of user inactivity. 
     +  You can turn TV mode on manually by using the **d v** sequence shortcut, or by appending the parameter `?inactive` to the dashboard URL. 
     +  You can disable TV mode with any mouse movement or keyboard action. 
   +  **TV mode (with auto fit panels)** 
     +  The side menu is hidden or removed. 
     +  The navbar, row, and panel controls appear at the top of the screen. 
     +  Dashboard panels automatically adjust to optimize space on screen. 
   +  **Kiosk mode** 
     +  The side menu, navbar, row, and panel controls are completely hidden or removed from view. 
     +  You can turn Kiosk mode on manually by using the **d v** sequence shortcut after the playlist has started. 
     +  You can turn off Kiosk mode manually by using the same shortcut. 
   +  **Kiosk mode (with auto fit panels):** 
     +  The side menu, navbar, row, and panel controls are completely hidden or removed from view. 
     +  Dashboard panels automatically adjust to optimize space on screen. 

## Controlling a playlist
<a name="control-a-playlist"></a>

 You can control a playlist in **Normal** or **TV** mode after it has started by using the navigation bar at the top of your screen. 


|  Button  |  Result  | 
| --- | --- | 
|  Next (double right arrow)  |  Advances to the next dashboard.  | 
|  Back (left arrow)  |  Returns to the previous dashboard.  | 
|  Stop (square)  |  Ends the playlist, and exits to the current dashboard.  | 
|  Cycle view mode (monitor icon)  |  Changes the display of the dashboards to different view modes.  | 
|  Time range  | Displays data within a time range. It can be set to display the last 5 minutes up to 5 years ago, or a custom time range, using the dropdown arrow.  | 
|  Refresh (circle arrow)  |  Reloads the dashboard to display the current data. It can be set to reload automatically, from every 5 seconds to 1 day, by using the dropdown arrow.  | 

 To stop the playlist from your keyboard, press **Esc**.

## Sharing a playlist in a view mode
<a name="share-a-playlist-in-a-view-mode"></a>

You can share a playlist by copying the URL in the view mode that you want and pasting the URL to your destination.

1.  From the **Dashboards** menu, choose **Playlists**. 

1.  Next to the playlist that you want to share, choose **Start playlist**, and then choose the view mode that you want. 

1.  To copy the URL to your clipboard, choose **Copy Link Address**. 

    For example, the URL for a playlist on the Grafana Play site in Kiosk mode could be `https://play.grafana.org/d/000000010/annotations?orgId=1&kiosk` 

1.  Paste the URL to your destination. 

# Dashboard search
<a name="dashboard-search"></a>

****  
This documentation topic is designed for Grafana workspaces that support **Grafana version 8.x**.  
For Grafana workspaces that support Grafana version 12.x, see [Working in Grafana version 12](using-grafana-v12.md).  
For Grafana workspaces that support Grafana version 10.x, see [Working in Grafana version 10](using-grafana-v10.md).  
For Grafana workspaces that support Grafana version 9.x, see [Working in Grafana version 9](using-grafana-v9.md).

 Dashboards can be searched by the dashboard name, filtered by one (or many) tags, or filtered by starred status. The dashboard search is accessed through the dashboard picker, available in the dashboard top navigation bar. The dashboard search can also be opened by using the shortcut **F**. 

When using only a keyboard, you can use the keyboard arrow keys to navigate the results, and press **Enter** to open the dashboard that you want. 

## Finding by dashboard name
<a name="find-by-dashboard-name"></a>

Type any part of the dashboard name in the search bar. As you type, search returns results for any partial string match in real time. 

Dashboard search is the following:
+ Real time
+ Not case sensitive
+  Functional across stored and file-based dashboards

## Filtering by tags
<a name="filter-by-tags"></a>

 Tags are a helpful way to organize your dashboards, especially as the number of dashboards grows. Tags can be added and managed in the dashboard **Settings**. 

 To filter the dashboard list by tag, choose any tag that appears in the right column. You can further filter the list by choosing additional tags. 

To see a list of all available tags, choose the **Filter by tags** dropdown menu. When you select a tag, the dashboard search is instantly filtered. 

When using only a keyboard, press **Tab** to focus on the tags link, press the down arrow key to find a tag, and press **Enter** to select the tag. 

**Note**  
 When multiple tags are selected, Amazon Managed Grafana shows dashboards that include all the tags. 

# Sharing a dashboard
<a name="share-a-dashboard"></a>

****  
This documentation topic is designed for Grafana workspaces that support **Grafana version 8.x**.  
For Grafana workspaces that support Grafana version 12.x, see [Working in Grafana version 12](using-grafana-v12.md).  
For Grafana workspaces that support Grafana version 10.x, see [Working in Grafana version 10](using-grafana-v10.md).  
For Grafana workspaces that support Grafana version 9.x, see [Working in Grafana version 9](using-grafana-v9.md).

 To share a dashboard, choose **Share dashboard** (the share icon) in the top navigation bar. This opens the **Share** dialog box, where you can get a link to the current dashboard with the current selected time range and template variables. If you have made changes to the dashboard, be sure to save those changes before you copy the link. 

## Dashboard snapshot
<a name="dashboard-snapshot"></a>

 A dashboard snapshot is an instant way to share an interactive dashboard publicly. When creating the snapshot, Amazon Managed Grafana strips sensitive data such as queries (metric, template, and annotation) and panel links, leaving only the visible metric data and series names embedded in your dashboard. Dashboard snapshots can be accessed by anyone who has the link and can reach the URL. 

## Publish snapshots
<a name="publish-snapshots"></a>

 You can publish snapshots to your local instance. 

# Sharing a panel
<a name="dashboard-share-a-panel"></a>

****  
This documentation topic is designed for Grafana workspaces that support **Grafana version 8.x**.  
For Grafana workspaces that support Grafana version 12.x, see [Working in Grafana version 12](using-grafana-v12.md).  
For Grafana workspaces that support Grafana version 10.x, see [Working in Grafana version 10](using-grafana-v10.md).  
For Grafana workspaces that support Grafana version 9.x, see [Working in Grafana version 9](using-grafana-v9.md).

 Choose a panel title to open the panel menu, and then choose **Share** in the panel menu to open the **Share Panel** dialog box. You can copy the link, which will take you to exactly this panel with the current time range and selected template variables. 

# Time range controls
<a name="dashboard-time-range-controls"></a>

****  
This documentation topic is designed for Grafana workspaces that support **Grafana version 8.x**.  
For Grafana workspaces that support Grafana version 12.x, see [Working in Grafana version 12](using-grafana-v12.md).  
For Grafana workspaces that support Grafana version 10.x, see [Working in Grafana version 10](using-grafana-v10.md).  
For Grafana workspaces that support Grafana version 9.x, see [Working in Grafana version 9](using-grafana-v9.md).

 Amazon Managed Grafana provides several ways to manage the time ranges of the data that are being visualized, both at the dashboard level and at the panel level. 

 This topic describes supported time units and relative ranges, the common time controls, dashboard-wide time settings, and panel-specific time settings. 

**Note**  
To have time controls, your data must include a time column. See the documentation for your specific [data source](AMG-data-sources.md) for more information about including a time column.

## Time units and relative ranges
<a name="time-units-and-relative-ranges"></a>

 The following time units are supported: 
+ `s` (seconds)
+ `m` (minutes)
+ `h` (hours),
+ `d` (days)
+ `w` (weeks)
+ `M` (months)
+ `y` (years)

 Use the minus operator to step back in time, relative to now. To display the full period of the unit (such as day, week, or month), append `/<time unit>`. 

 Use the plus operator to step forward in time relative to now. You can use this feature to look at predicted data for the future. 

 Here are some examples: 


|  Example relative range  |  From  |  To  | 
| --- | --- | --- | 
|  Last 5 minutes  |  now-5m  |  now  | 
|  The day so far  |  now/d  |  now  | 
|  This week  |  now/w  |  now/w  | 
|  Week to date  |  now/w  |  now  | 
|  Previous month  |  now-1M/M  |  now-1M/M  | 

## Common time range controls
<a name="common-time-range-controls"></a>

 The dashboard and panel time controls have a common user interface, with the following options. 

### Current time range
<a name="current-time-range"></a>

 The current time range, also called the *time picker*, shows the time range currently displayed in the dashboard or panel that you are viewing. 

 Pause on a field to see the exact timestamps in the range and their source, such as the local browser. 

 To change the time range, choose on the current time range. You can change the current time using a *relative time range*, such as the last 15 minutes, or an *absolute time range*, such as `2020-05-14 00:00:00 to 2020-05-15 23:59:59`. 

### Relative time range
<a name="relative-time-range"></a>

 Select the relative time range from the **Relative time ranges** list. Here are some examples of relative time ranges: 
+  Last 30 minutes 
+  Last 12 hours 
+  Last 7 days 
+  Last 2 years 
+  Yesterday 
+  Day before yesterday 
+  This day last week 
+  Today so far 
+  This week so far 
+  This month so far 

### Absolute time range
<a name="absolute-time-range"></a>

 Set an absolute time range one of two ways: 
+  Enter values in the **From** and **To** fields. You can enter exact time values or relative values, such as `now-24h`, and then choose **Apply time range**. 
+  Choose the **From** or **To** field. Amazon Managed Grafana displays a calendar. Choose the day or days that you want to use as the current time range and then choose **Apply time range**. 

 Amazon Managed Grafana also displays recently used absolute ranges. 

### Zoom out (Cmd\$1Z or Ctrl\$1Z)
<a name="zoom-out-cmdz-or-ctrlz"></a>

 To view a larger time range in the dashboard or panel visualization, choose the **Time range zoom out** icon. 

### Zoom in (for graph visualizations only)
<a name="zoom-in-only-applicable-to-graph-visualizations"></a>

 In the graph visuaization, drag to select the time range that you want to view. 

### Refresh dashboard
<a name="refresh-dashboard"></a>

 Choose the **Refresh dashboard** icon to run every query on the dashboard immediately and refresh the visualizations. Amazon Managed Grafana cancels any pending requests when a new refresh is started. 

 By default, Amazon Managed Grafana does not automatically refresh the dashboard. Queries run on their own schedule according to the panel settings. However, if you want to regularly refresh the dashboard, choose the down arrow next to the **Refresh dashboard** icon, and then select a refresh interval. 

## Dashboard time settings
<a name="dashboard-time-settings"></a>

 Time settings are saved on a per-dashboard basis. 

 To access the dashboard time settings, choose the **Dashboard settings** (gear) icon at the top of the screen. The settings are in the **Time Options** section of the **General** tab. 
+  **Timezone** – The local time zone of the service or system that you are monitoring. This can be helpful when you monitor a system or service that operates across several time zones. 
  +  **Default** – The default selected time zone for the user profile, team, or organization. If no time zone is specified for the user profile, a team that the user is a member of, or the organization, Amazon Managed Grafana uses local browser time. 
  +  **Browser Time** The time zone that is configured for the browser that is being used. This is usually the time zone that is set on the computer. 
  +  **Coordinated Universal Time** – Standard ISO 8601 time zones, including UTC. For more information, see a [list of time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). 
+  **Auto-refresh** – Customizable options the relative time and auto-refresh settings. Entries are separated by commas and can be any valid time unit. 
+  **Now delay now-** – Time delay value that overrides the `now` value. Most commonly, this feature is used to avoid null values by accommodating known delays in data aggregation. 
+  **Hide time picker** – Option for not displaying the time picker. 

## Panel time overrides and time shift
<a name="panel-time-overrides-and-timeshift"></a>

 In [Query options](panel-queries.md#query-options), you can override the relative time range for individual panels, causing them to be different from what is selected in the dashboard time picker in the top navigation bar. You can show metrics from different time periods or days at the same time. 

## Controlling the time range using a URL
<a name="control-the-time-range-using-a-url"></a>

 You can control the time range of a dashboard by providing the following query parameters in the dashboard URL: 
+  `from` – Defines the lower limit of the time range, specified in ms epoch or relative time. For more information, see [Relative time range](#relative-time-range). 
+  `to` – Defines the upper limit of the time range, specified in ms epoch or relative time. For more information, see [Relative time range](#relative-time-range). 
+  `time` and `time.window` – Define a time range from `time-time.window/2` to `time+time.window/2`. Both parameters should be specified in milliseconds. For example, `?time=1500000000000&time.window=10000` results in a 10-second time range from 1499999995000 to 1500000005000 

# Exporting and importing dashboards
<a name="dashboard-export-and-import"></a>

****  
This documentation topic is designed for Grafana workspaces that support **Grafana version 8.x**.  
For Grafana workspaces that support Grafana version 12.x, see [Working in Grafana version 12](using-grafana-v12.md).  
For Grafana workspaces that support Grafana version 10.x, see [Working in Grafana version 10](using-grafana-v10.md).  
For Grafana workspaces that support Grafana version 9.x, see [Working in Grafana version 9](using-grafana-v9.md).

 Amazon Managed Grafana Dashboards can easily be exported and imported, either from the UI or from the [HTTP API] 

## Exporting a dashboard
<a name="exporting-a-dashboard"></a>

 Dashboards are exported in Amazon Managed Grafana JSON format, and contain everything you need, including layout, variables, styles, data sources, and queries, to import the dashboard at a later time. 

 The export feature is accessed in the share window, which you open by choosing the share button in the dashboard menu.

### Making a dashboard portable
<a name="making-a-dashboard-portable"></a>

 When you export a dashboard for others to use, it's good to add template variables for values such as a metric prefix (use a constant variable) and a server name. 

 A template variable of the type `Constant` is automatically hidden in the dashboard. It is also added as a required input when the dashboard is imported. For more information about templating and template variables, see [Templates and variables](templates-and-variables.md). 

## Importing a dashboard
<a name="importing-a-dashboard"></a>

 To import a dashboard, choose the \$1 icon in the side menu, and then choose **Import**. 

 You can upload a dashboard JSON file, paste a dashboard URL or paste dashboard JSON text directly into the text area. 

 In step 2 of the import process, you can change the name of the dashboard, specify the data source that you want the dashboard to use, and specify any metric prefixes (if the dashboard uses any). 

## Discover dashboards on Grafana.com
<a name="discover-dashboards-on-grafana.com"></a>

 Find dashboards for common server applications at [Grafana.com/dashboards](https://grafana.com/dashboards). 

# Dashboard version history
<a name="dashboard-version-history"></a>

****  
This documentation topic is designed for Grafana workspaces that support **Grafana version 8.x**.  
For Grafana workspaces that support Grafana version 12.x, see [Working in Grafana version 12](using-grafana-v12.md).  
For Grafana workspaces that support Grafana version 10.x, see [Working in Grafana version 10](using-grafana-v10.md).  
For Grafana workspaces that support Grafana version 9.x, see [Working in Grafana version 9](using-grafana-v9.md).

 Whenever you save a version of your dashboard, a copy of that version is saved so that previous versions of your dashboard are not lost. A list of these versions is available by choosing **Dashboard settings** and then selecting **Versions** in the left side menu. 

 The dashboard version history feature lets you compare and restore to previously saved dashboard versions. 

## Comparing two dashboard versions
<a name="comparing-two-dashboard-versions"></a>

 To compare two dashboard versions, select the two versions from the list that you want to compare. After you select two versions, choose **Compare versions** to open the diff view. By default, you’ll see a textual summary of the changes, as in the following image.

 To view the diff of the raw JSON that represents your dashboard, choose **View JSON Diff**. 

 To restore to the earlier version that you are comparing against, choose **Restore to version <x>**.

## Restoring to a previously saved dashboard version
<a name="restoring-to-a-previously-saved-dashboard-version"></a>

 If you need to restore to a previously saved dashboard version, you can do so either by choosing the "Restore" button on the right of a row in the dashboard version list or by choosing **Restore to version <x>** appearing in the diff view. After you choose to restore, a pop-up box will prompt you to confirm the restoration. 

 After restoring to a previous version, a new version will be created that containing the same exact data as the previous version, but with a different version number. This is indicated in the **Notes** column. This helps to ensure that your previous dashboard versions are not affected by the change. 

# Keyboard shortcuts
<a name="keyboard-shortcuts"></a>

****  
This documentation topic is designed for Grafana workspaces that support **Grafana version 8.x**.  
For Grafana workspaces that support Grafana version 12.x, see [Working in Grafana version 12](using-grafana-v12.md).  
For Grafana workspaces that support Grafana version 10.x, see [Working in Grafana version 10](using-grafana-v10.md).  
For Grafana workspaces that support Grafana version 9.x, see [Working in Grafana version 9](using-grafana-v9.md).

 Amazon Managed Grafana has a number of keyboard shortcuts available. To display all keyboard shortcuts available in your version of Amazon Managed Grafana, press **Shift \$1 ?** on your keyboard. 

 **Amazon Managed Grafana includes the following popular shortcuts:** 
+  **Ctrl\$1S** saves the current dashboard. 
+  **Ctrl\$1F** opens the dashboard finder / search. 
+  **Ctrl\$1H** hides all controls (hiding controls works well for TV displays). 
+  **Escape** exits a graph when in full-screen or edit mode. 

# Dashboard JSON model
<a name="dashboard-json-model"></a>

****  
This documentation topic is designed for Grafana workspaces that support **Grafana version 8.x**.  
For Grafana workspaces that support Grafana version 12.x, see [Working in Grafana version 12](using-grafana-v12.md).  
For Grafana workspaces that support Grafana version 10.x, see [Working in Grafana version 10](using-grafana-v10.md).  
For Grafana workspaces that support Grafana version 9.x, see [Working in Grafana version 9](using-grafana-v9.md).

 A dashboard in Amazon Managed Grafana is represented by a JSON object, which stores metadata of its dashboard. Dashboard metadata includes dashboard properties, metadata from panels, template variables, and panel queries.

**To view the JSON of a dashboard**

1.  Open a dashboard. 

1.  On the top navigation bar, choose on **Manage dashboard**. 

1.  Select **View JSON** from the dropdown menu. 

## JSON fields
<a name="dashboard-json-fields"></a>

 When a user creates a new dashboard, a new dashboard JSON object is initialized with the following fields. 

**Note**  
 In the following JSON, `id` is shown as `null`, which is the default value assigned to it until a dashboard is saved. After you save a dashboard, an integer value is assigned to the `id` field. 

```
{
  "id": null,
  "uid": "cLV5GDCkz",
  "title": "New dashboard",
  "tags": [],
  "style": "dark",
  "timezone": "browser",
  "editable": true,
  "hideControls": false,
  "graphTooltip": 1,
  "panels": [],
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {
    "time_options": [],
    "refresh_intervals": []
  },
  "templating": {
    "list": []
  },
  "annotations": {
    "list": []
  },
  "refresh": "5s",
  "schemaVersion": 17,
  "version": 0,
  "links": []
}
```

 The following table provides usage details for each field in the dashboard JSON. 


|  Name  |  Usage  | 
| --- | --- | 
|  id  |  The unique numeric identifier for the dashboard (generated by the database).  | 
|  uid  |  The unique dashboard identifier that can be generated by anyone. The uid is a string of 8-40 characters.  | 
|  title  |  The current title of the dashboard.  | 
|  tags  |  The tags that are associated with the dashboard. In the JSON, the tags are an array of strings.  | 
|  style  |  The theme of the dashboard (for example, dark or light).  | 
|  timezone  |  The timezone of dashboard (utc or browser).  | 
|  editable  |  Whether a dashboard can be edited.  | 
|  graphTooltip  |  The tooltip style. [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/grafana/latest/userguide/dashboard-json-model.html)  | 
|  time  |  The time range for the dashboard (for example, last 6 hours, last 7 days).  | 
|  timepicker  |  The timepicker metadata. For more information, see [Time picker](#dashboard-json-timepicker).  | 
|  templating  |  The templating metadata. For more information, see [Templates and variables](templates-and-variables.md).  | 
|  annotations  |  The annotations metadata. For more information, see [Annotations](dashboard-annotations.md).  | 
|  refresh  |  The auto-refresh interval.  | 
|  schemaVersion  |  The version of the JSON schema (integer), which is incremented each time an Amazon Managed Grafana update changes the schema.  | 
|  version  |  The version of the dashboard (integer), which is incremented each time the dashboard is updated.  | 
|  panels  |  The panels array. For more information, see [Panels](#dashboard-JSON-panels).  | 

## Panels
<a name="dashboard-JSON-panels"></a>

 Panels are the building blocks of a dashboard. It consists of data source queries, type of graphs, aliases, and other data. Panel JSON consists of an array of JSON objects, each representing a different panel. Most of the fields are common for all panels, but some fields depend on the panel type. The following example shows the panel JSON of a text panel.

```
"panels": [
  {
    "type": "text",
    "title": "Panel Title",
    "gridPos": {
      "x": 0,
      "y": 0,
      "w": 12,
      "h": 9
    },
    "id": 4,
    "mode": "markdown",
    "content": "# title"
  }
```

### Panel size and position
<a name="panel-size-and-position"></a>

 The `gridPos` property describes the panel size and position in grid coordinates: 
+  `w` – 1-24. The width of the dashboard is divided into 24 columns. 
+  `h` – In grid height units. Each grid height unit represents 30 pixels. 
+  `x` – The x position. The x position uses the in same column unit as `w`. 
+  `y` – The y position. The y position uses the same grid height unit as `h`. 

 The grid has a negative gravity that moves panels up if there is empty space above a panel. 

### Time picker
<a name="dashboard-json-timepicker"></a>

The following example shows the `timepicker` options.

```
"timepicker": {
    "collapse": false,
    "enable": true,
    "notice": false,
    "now": true,
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "status": "Stable",
    "type": "timepicker"
  }
```

 The following table provides usage details for `timepicker`. 


|  Name  |  Usage  | 
| --- | --- | 
|  collapse  |  Whether timepicker is collapsed  | 
|  enable  |  Whether timepicker is activated  | 
|  notice  |  TODO  | 
|  now  |  TODO  | 
|  refresh\$1intervals  |  TODO  | 
|  status  |  TODO  | 
|  type  |  TODO  | 

### Templating
<a name="json-templating"></a>

 The `templating` field contains an array of template variables with their saved values and other metadata. The following example shows `templating` metadata. 

```
 "templating": {
    "enable": true,
    "list": [
      {
        "allFormat": "wildcard",
        "current": {
          "tags": [],
          "text": "prod",
          "value": "prod"
        },
        "datasource": null,
        "includeAll": true,
        "name": "env",
        "options": [
          {
            "selected": false,
            "text": "All",
            "value": "*"
          },
          {
            "selected": false,
            "text": "stage",
            "value": "stage"
          },
          {
            "selected": false,
            "text": "test",
            "value": "test"
          }
        ],
        "query": "tag_values(cpu.utilization.average,env)",
        "refresh": false,
        "type": "query"
      },
      {
        "allFormat": "wildcard",
        "current": {
          "text": "apache",
          "value": "apache"
        },
        "datasource": null,
        "includeAll": false,
        "multi": false,
        "multiFormat": "glob",
        "name": "app",
        "options": [
          {
            "selected": true,
            "text": "tomcat",
            "value": "tomcat"
          },
          {
            "selected": false,
            "text": "cassandra",
            "value": "cassandra"
          }
        ],
        "query": "tag_values(cpu.utilization.average,app)",
        "refresh": false,
        "regex": "",
        "type": "query"
      }
    ]
  }
```

 The following table provides usage details for templating section. 


|  Name  |  Usage  | 
| --- | --- | 
|  enable  |  Whether templating is activated.  | 
|  list  |  An array of objects, each representing one template variable  | 
|  allFormat  |  The format to use while fetching all values from the data source (for example, wildcard, glob, regex, and pipe).  | 
|  current  |  Shows current selected variable text or value on the dashboard  | 
|  data source  |  Shows the data source for the variables  | 
|  includeAll  |  Whether the all value option is available  | 
|  multi  |  Whether multiple values can be selected from variable value list  | 
|  multiFormat  |  The format to use while fetching timeseries from the data source  | 
|  name  |  The name of a variable  | 
|  options  |  The array of variable text/value pairs available for selection on dashboard  | 
|  query  |  The data source query that is used to fetch values for a variable  | 
|  refresh  |  TODO  | 
|  regex  |  TODO  | 
|  type  |  The type of variable (custom, query, or interval)  | 

# Scripted dashboards
<a name="scripted-dashboards"></a>

****  
This documentation topic is designed for Grafana workspaces that support **Grafana version 8.x**.  
For Grafana workspaces that support Grafana version 12.x, see [Working in Grafana version 12](using-grafana-v12.md).  
For Grafana workspaces that support Grafana version 10.x, see [Working in Grafana version 10](using-grafana-v10.md).  
For Grafana workspaces that support Grafana version 9.x, see [Working in Grafana version 9](using-grafana-v9.md).

**Warning**  
 This feature is deprecated and will be removed in a future release. 

 If you have many metric names that change (for example, new servers) in a defined pattern, it can be time consuming to constantly create new dashboards. 

 With scripted dashboards, you can dynamically create your dashboards using JavaScript. In the Grafana install folder, under `public/dashboards/`, there is a file named `scripted.js`. This file contains an example of a scripted dashboard. You can access it by using the URL: `http://grafana_url/dashboard/script/scripted.js?rows=3&name=myName` 

 When you open `scripted.js`, you can see how it reads URL parameters from the `ARGS` variable and then adds rows and panels. 

## Example: scripted.js
<a name="example"></a>

```
var seriesName = 'argName';

if (!_.isUndefined(ARGS.name)) {
  seriesName = ARGS.name;
}

dashboard.panels.push({
  title: 'Events',
  type: 'graph',
  fill: 1,
  linewidth: 2,
  gridPos: {
    h: 10,
    w: 24,
    x: 0,
    y: 10,
  },
  targets: [
    {
      target: "randomWalk('" + seriesName + "')",
    },
    {
      target: "randomWalk('random walk2')",
    },
  ],
});

return dashboard;
```

## More examples
<a name="more-examples"></a>

 You can find more examples in the `public/dashboards/` directory of your Grafana installation. 