

# Linking
<a name="linking-in-Amazon-Managed-Service-for-Grafana"></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).

 You can use links to navigate between commonly used dashboards or to connect others to your visualizations. Links let you create shortcuts to other dashboards, panels, and even external websites. 

 Amazon Managed Grafana supports dashboard links, panel links, and data links. Dashboard links are displayed at the top of the dashboard. Panel links are accessible by choosing an icon on the top-left corner of the panel. 

## Which link should you use?
<a name="which-link-should-you-use"></a>

 Start by examining how you’re currently navigating between dashboards. If you’re often jumping between a set of dashboards and struggling to find the same context in each, links can help optimize your workflow. 

 The next step is to figure out which link type is right for your workflow. Although all the link types in Grafana are used to create shortcuts to other dashboards or external websites, they work in different contexts. 
+  To add links that relate to most or all of the panels in the dashboard, use [Dashboard links](dashboard-links.md). 
+  To drill down into specific panels, use [Panel links](panel-links.md).
+  To link to external sites, you can use either a dashboard link or a panel link. 
+  To drill down into a specific series, or even a single measurement, use [Data links](data-links.md). 

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

 You can control the time range of a panel or dashboard by providing the following query parameters in the dashboard URL: 
+  `from` defines lower limit of the time range, specified in ms epoch. 
+  `to` defines upper limit of the time range, specified in ms epoch. 
+  `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` will result in a 10-second time range from 1499999995000 to 1500000005000 

# Dashboard links
<a name="dashboard-links"></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).

 When you create a dashboard link, you can include the time range and current template variables to directly jump to the same context in another dashboard. This helps to ensure that the person you send the link to is looking at the right data. For other types of links, see [Data link variables](linking-in-Amazon-Managed-Service-for-Grafana.md#data-link-variables). 

 After you add a dashboard link, it appears in the upper-right corner of your dashboard. 

## Adding links to dashboards
<a name="add-links-to-dashboards"></a>

 Add links to other dashboards at the top of your current dashboard. 

1.  While viewing the dashboard that you want to add a link to, choose the gear icon at the top of the screen to open **Dashboard settings**. 

1.  Choose **Links**, and then choose **Add Dashboard Link** or **New**. 

1.  In **Type**, select **dashboards**. 

1.  Select link options: 
   +  **With tags** – Enter tags to limit the linked dashboards to only the ones with the tags you enter. Otherwise, the Grafana workspace includes links to all other dashboards. 
   +  **As dropdown** – Select this option if you are linking to many dashboards, and add an optional title to the dropdown list. If this option is not selected, the Grafana workspace displays the dashboard links side by side across the top of your dashboard. 
   +  **Time range** – Select this option to include the dashboard time range in the link. When the user chooses the link, the linked dashboard opens with the indicated time range already set.
   +  **Variable values** – Select this option to include the template variables that are currently used as query parameters in the link. When the user chooses the link, any matching templates in the linked dashboard are set to the values from the link.
   +  **Open in new tab** – Select this option to open the dashboard link in a new tab or window. 

1.  Choose **Add**. 

## Adding a URL link to a dashboard
<a name="add-a-url-link-to-a-dashboard"></a>

 Add a link to a URL at the top of your current dashboard. You can link to any available URL, including dashboards, panels, or external sites. You can even control the time range to ensure that the user sees the specific data in the Grafana workspace. 

1.  While viewing the dashboard that you want to link to, choose the gear icon at the top of the screen to open **Dashboard settings**. 

1.  Choose **Links**, and then choose **Add Dashboard Link** or **New**. 

1.  In **Type**, select **link**. 

1.  Select link options: 
   +  **Url** – Enter the URL that you want to link to. Depending on the target, you might want to include field values.
   +  **Title** – Enter the title that you want the link to display. 
   +  **Tooltip** – Enter the tooltip that you want the link to display when the user pauses over it. 
   +  **Icon** – Choose the icon that you want to display with the link. 
   +  **Time range** – Select this option to include the dashboard time range in the link. When the user chooses the link, the linked dashboard opens with the indicated time range already set. 
     +  `from` defines the lower limit of the time range, specified in ms epoch. 
     +  `to` defines the upper limit of the time range, specified in ms epoch. 
     +  `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. 
   +  **Variable values** – Select this option to include the template variables that are currently used as query parameters in the link. When the user chooses the link, any matching templates in the linked dashboard are set to the values from the link; for example, https://play.grafana.org/d/000000074/alerting?var-app=backend&var-server=backend\$101&var-server=backend\$103&var-interval=1h 
   +  **Open in new tab** – Select this option to open the dashboard link in a new tab or window. 

1.  Choose **Add**. 

## Updating a dashboard link
<a name="update-a-dashboard-link"></a>

 To change or update an existing dashboard link, use the following procedure. 

1.  In **Dashboard Settings**, on the **Links** tab, choose the existing link that you want to edit. 

1.  Change the settings, and then choose **Update**. 

## Duplicating a dashboard link
<a name="duplicate-a-dashboard-link"></a>

 To duplicate an existing dashboard link, choose the duplicate icon next to the existing link that you want to duplicate. 

## Deleting a dashboard link
<a name="delete-a-dashboard-link"></a>

 To delete an existing dashboard link, choose the trash can icon for the link that you want to delete. 

# Panel links
<a name="panel-links"></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).

 Each panel can have its own set of links that are shown in the upper-left corner of the panel. You can link to any available URLs, including dashboards, panels, or external sites. You can even control the time range to ensure the user sees the specific data in the Grafana workspace. 

Choose the icon in the top-left corner of a panel to see available panel links. 

## Adding a panel link
<a name="add-a-panel-link"></a>

1.  Pause on the panel that you want to add a link to, and then press **e**. Or choose the dropdown arrow next to the panel title, and then choose **Edit**. 

1.  On the **Panel** tab, scroll down to the **Links** section. 

1.  Expand **Links**, and then choose **Add link**. 

1.  Enter a **Title** for the link. The title will be displayed in the UI. 

1.  Enter the **URL** that you want to link to. You can include one of the template variables that are defined in the dashboard. Press **Ctrl\$1Space** or **Cmd\$1Space**, and then choose the **URL** field to see the available variables. When you add template variables to your panel link, the link sends the user to the right context, with the relevant variables already set. You can also use time variables 
   +  `from` defines the lower limit of the time range, specified in ms epoch. 
   +  `to` defines the upper limit of the time range, specified in ms epoch. 
   +  `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. 

1.  To open in a new tab, select **Open in a new tab**. 

1.  Choose **Save** to save changes and close the window. 

1.  Choose **Save** in the upper right to save your changes to the dashboard. 

## Updating a panel link
<a name="update-a-panel-link"></a>

1.  On the **Panel** tab, find the link that you want to make changes to. 

1.  Choose the **Edit** (pencil) icon to open the **Edit link** window. 

1.  Make any necessary changes. 

1.  Choose **Save** to save changes and close the window. 

1.  Choose **Save** in the upper right to save your changes to the dashboard. 

## Deleting a panel link
<a name="delete-a-panel-link"></a>

1.  On the **Panel** tab, find the link that you want to delete. 

1.  Choose the **X** icon next to the link that you want to delete. 

1.  Choose **Save** in the upper right to save your changes to the dashboard. 

# Data links
<a name="data-links"></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).

 Data links provide more granular context to your links. You can create links that include the series name or even the value. For example, if your visualization shows four servers, you can add a data link to one or two of them. 

 The link itself is accessible in different ways, depending on the visualization. For the graph panel, you need to choose a data point or line. For a panel such as stat, gauge, or bar gauge, you can choose anywhere on the visualization to open the context menu. 

 You can use variables in data links to send people to a detailed dashboard with preserved data filters. For example, you can use variables to specify a time range, series, and variable selection. For more information, see [Data link variables](linking-in-Amazon-Managed-Service-for-Grafana.md#data-link-variables). 

## Typeahead suggestions
<a name="typeahead-suggestions"></a>

 When you create or update a data link, press **Ctrl\$1Space** or **Cmd\$1Space**Cmd\$1Space on your keyboard to open the typeahead suggestions to more easily add variables to your URL. 

## Adding a data link
<a name="add-a-data-link"></a>

1.  Pause on the panel that you want to add a link to, and then press **e**. Or choose the dropdown arrow next to the panel title, and then choose **Edit**. 

1.  On the **Field** tab, scroll down to the **Data links** section. 

1.  Expand **Data links**, and then choose **Add link**. 

1.  Enter a **Title** for the link. The title will be displayed in the UI. 

1.  Enter the **URL** that you want to link to. 

    You can add one of the template variables that are defined in the dashboard. Choose the **URL** field, and then type **\$1**, or press ****Ctrl\$1Space or **Cmd\$1Space** to see a list of available variables. When you add template variables to your panel link, the link sends the user to the right context, with the relevant variables already set. For more information, see [Data link variables](linking-in-Amazon-Managed-Service-for-Grafana.md#data-link-variables). 

1.  To open in a new tab, select **Open in a new tab**. 

1.  Choose **Save** to save changes and close the window. 

1.  Choose **Save** in the upper right to save your changes to the dashboard. 

## Updating a data link
<a name="update-a-data-link"></a>

1.  On the **Field** tab, find the link that you want to make changes to. 

1.  Choose the **Edit** (pencil) icon to open the **Edit link** window. 

1.  Make any necessary changes. 

1.  Choose **Save** to save changes and close the window. 

1.  Choose **Save** in the upper right to save your changes to the dashboard. 

## Deleting a data link
<a name="delete-a-data-link"></a>

1.  On the **Field** tab, find the link that you want to delete. 

1.  Choose the **X** icon next to the link that you want to delete. 

1.  Choose **Save** in the upper right to save your changes to the dashboard. 

## Data link variables
<a name="data-link-variables"></a>

 You can use variables in data links to see series fields, labels, and values. For more information about data links, see [Data links](data-links.md). 

 To see a list of available variables, enter **\$1** in the data link **URL** field. 

 You can also use template variables in your data links URLs. For more information, see [Templates and variables](templates-and-variables.md). 

### Time range panel variables
<a name="time-range-panel-variables"></a>

 You can use the following variables to include the current time range in the data link URL: 
+  `__url_time_range` – The current dashboard’s time range; for example, `?from=now-6h&to=now` 
+  `$__from and $__to` – For more information, see [Global variables](\$1\$1< relref "../variables/variable-types/global-variables.md\$1\$1\$1from-and-\$1\$1to" >\$1\$1). 

### Series variables
<a name="series-variables"></a>

 Series-specific variables are available under the `__series` namespace: 
+  `__series.name` – Adds the series name to the URL 
+  `__series.labels.<LABEL>` – Adds the label’s value to the URL. If your label contains dots, use `__series.labels["<LABEL>"]` syntax. 

### Field variables
<a name="field-variables"></a>

 Field-specific variables are available under the `__field` namespace: 
+  `__field.name` – The name of the field 

### Value variables
<a name="value-variables"></a>

 Value-specific variables are available under the `__value` namespace: 
+  `__value.time` – The value’s timestamp (Unix ms epoch) to the URL; for example, `?time=1560268814105` 
+  `__value.raw` – The raw value 
+  `__value.numeric` – The numeric representation of a value 
+  `__value.text` – The text representation of a value 
+  `__value.calc` – The calculation name if the value is result of calculation 

### Template variables
<a name="template-variables"></a>

 When linking to another dashboard that uses template variables, select variable values for whoever chooses the link. 

 Use `var-myvar=${myvar}`, where `myvar` is a name of the template variable that matches one in the current dashboard that you want to use. 

 To add all of the current dashboard’s variables to the URL, use `__all_variables`. 