Skip to content

Commit 014aca2

Browse files
committed
How to share dashboards
1 parent 2d82dcc commit 014aca2

File tree

4 files changed

+68
-136
lines changed

4 files changed

+68
-136
lines changed

articles/managed-grafana/how-to-create-dashboard.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ A Grafana dashboard contains panels and rows. You can import a Grafana dashboard
2525

2626
## Import a Grafana dashboard
2727

28-
To quickly create a dashboard, import a dashboard template from the Grafana Labs website and add it to your Managed Grafana workspace.
28+
To quickly create a dashboard, import an existing dashboard and add it to your Managed Grafana instance. You can do so by importing a dashboard template from Grafana Labs, uploading a JSON file or pasting JSON code.
29+
30+
### Import a dashboard from Grafana Labs
31+
32+
Import a dashboard template from the Grafana Labs website.
2933

3034
1. From the Grafana Labs website, browse through [Grafana dashboards templates](https://grafana.com/grafana/dashboards/?category=azure) and select a dashboard to import.
3135
1. Select **Copy ID to clipboard**.
@@ -46,18 +50,40 @@ To quickly create a dashboard, import a dashboard template from the Grafana Labs
4650

4751
### [Azure CLI](#tab/azure-cli)
4852

49-
1. Open a CLI and run the `az login` command.
50-
1. Run the [az grafana dashboard import](/cli/azure/grafana/dashboard#az-grafana-update)command and replace the placeholders `<AMG-name>`, `<AMG-resource-group>`, and `<dashboard-id>` with the name of the Azure Managed Grafana instance, its resource group, and the dashboard ID you copied earlier.
53+
1. Run the [az grafana dashboard import](/cli/azure/grafana/dashboard#az-grafana-update) command and replace the placeholders `<AMG-name>`, `<AMG-resource-group>`, and `<dashboard-id>` with the name of the Azure Managed Grafana instance, its resource group, and the dashboard ID you copied earlier.
5154

5255
```azurecli
5356
az grafana dashboard import --name <AMG-name> --resource-group <AMG-resource-group> --definition <dashboard-id>
5457
```
5558
5659
---
5760
61+
### Import a JSON dashboard
62+
63+
Follow these steps to import a JSON dashboard to Grafana:
64+
65+
### [Portal](#tab/azure-portal)
66+
67+
1. In the Azure portal, open your Azure Managed Grafana workspace and select the **Endpoint** URL.
68+
1. Go to **Dashboard > Import**
69+
- Select **Upload JSON file** and then **Load** to import from a JSON file
70+
- Paste JSON text in the **Import via panel json** box and select **Load** to use text from your clipboard
71+
1. Optionally update the dashboard name, folder, unique identifier and data source
72+
1. Select **Import**
73+
74+
### [Azure CLI](#tab/azure-cli)
75+
76+
1. Run the [az grafana dashboard import](/cli/azure/grafana/dashboard#az-grafana-update) command and replace the placeholders `<AMG-name>`, `<AMG-resource-group>`, and `<local-path-to-file>` with the name of the Azure Managed Grafana instance, its resource group, and the path to the JSON File on your local machine, ending with `.json`.
77+
78+
```azurecli
79+
az grafana dashboard import --name <AMG-name> --resource-group <AMG-resource-group> --definition @<local-path-to-file>
80+
```
81+
82+
---
83+
5884
## Create a new Grafana dashboard
5985
60-
If none of the pre-configured dashboards listed on the Grafana Labs website fit your needs, create a new dashboard.
86+
To create your own new dashboard, follow these steps.
6187
6288
### [Portal](#tab/azure-portal)
6389
@@ -191,4 +217,4 @@ az grafana dashboard update --name <AMG-name> --resource-group <AMG-resource-gro
191217
In this how-to guide, you learned how to create a Grafana dashboard. To learn how to manage your data sources, go to:
192218

193219
> [!div class="nextstepaction"]
194-
> [Configure data sources](how-to-data-source-plugins-managed-identity.md)
220+
> [Share a dashboard or panel](how-to-share-dashboard.md)
Lines changed: 33 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Share an Azure Managed Grafana dashboard or panel
3-
description: Learn how to share a Grafana dashboard with internal and external stakeholders.
3+
description: Learn how to share a Grafana dashboard with internal and external stakeholders, such as customers or partners.
44
author: maud-lv
55
ms.author: malev
66
ms.service: managed-grafana
@@ -10,12 +10,14 @@ ms.date: 03/01/2023
1010

1111
# Share a Grafana dashboard or panel
1212

13-
In this guide for Azure Managed Grafana, learn how to share a Grafana dashboard with internal and external stakeholders, whether they are registered in your Azure Active Directory tenant or not.
13+
In this guide for Azure Managed Grafana, learn how to share a Grafana dashboard or a Grafana panel with internal and external stakeholders, whether they're registered in your Azure Active Directory tenant or not. You can choose to share a dashboard or panel with restricted access, or share it with public access to facilitate collaboration with partners or customers.
14+
15+
You can share Grafana visualizations by generating:
1416

15-
You can share Grafana panels and dashboards using:
1617
- A direct link
1718
- A snapshot
1819
- An embedded link (for panels only)
20+
- A library panel (for panels only)
1921
- An export link (for dashboards only)
2022

2123
> [!NOTE]
@@ -44,159 +46,59 @@ Access Grafana dashboard and panel sharing options with the following steps:
4446
A new window opens, offering various sharing options.
4547

4648
> [!TIP]
47-
> If you update a dashboard or a panel, make sure to save your changes before sharing it so that it contains the latest changes.
49+
> If you update a dashboard or a panel, make sure to save your changes before sharing it so that it contains your latest changes.
4850
4951
### Share a link
5052

51-
The **Link** tab lets you create a direct link to a Grafana dashboard or panel. This link can then be accessed by users who have a Grafana viewer permission.
53+
The **Link** tab lets you create a direct link to a Grafana dashboard or panel.
5254

53-
Create a sharable link in one step , by selecting **Copy**, at the bottom of the **Link** tab. Optionally customize sharing with the options below:
55+
Create a sharable link in one step, by selecting **Copy**, at the bottom of the tab. Optionally customize sharing with the options below:
5456

5557
- **Lock time range**: sets the time range of the shared panel or dashboard to the time range currently displayed in your shared panel or dashboard.
5658
- **Theme**: keep the current theme or choose a dark or a light theme.
5759
- **Shorten URL**: shortens the sharable link
5860

59-
### Share a snapshot publicly
60-
61-
The **Snapshot** tab lets you share an interactive dashboard or panel publicly. Sensitive data like queries (metric, template, and annotation) and panel links are removed from the snapshot leaving only the visible metric data and series names embedded in your dashboard.
62-
6361
> [!NOTE]
64-
> Snapshots can be viewed by anyone that has the link and can access the URL.
65-
66-
Optionally update the snapshot name, select an expiry date and change the value of the timeout. timeout.
67-
68-
### Share a snapshot publicly
69-
70-
### [Portal](#tab/azure-portal)
71-
72-
1. In the Azure portal, open your Azure Managed Grafana workspace and select the **Endpoint** URL.
73-
1. In the Grafana portal, go to **Dashboards > New Dashboard**.
74-
1. Select one of the following options:
75-
- **Add a new panel**: instantly creates a dashboard from scratch with a first default panel.
76-
- **Add a new row**: instantly creates a dashboard with a new empty row.
77-
- **Add a panel from the panel library**: instantly creates a dashboard with an existing reusable panel from another instance you have access to.
78-
79-
:::image type="content" source="media/create-dashboard/from-scratch.png" alt-text="Screenshot of the Grafana instance. Create a new dashboard.":::
80-
81-
### [Azure CLI](#tab/azure-cli)
82-
83-
Run the [az grafana dashboard create](/cli/azure/grafana/dashboard#az-grafana-dashboard-create) command and replace the placeholders `<AMG-name>`, `<AMG-resource-group>`, `<title>`, and `<definition>` with the name of the Azure Managed Grafana instance, its resource group, a title and a definition for the new dashboard. The definition consists of a dashboard model in JSON string, a path or URL to a file with such content.
84-
85-
```azurecli
86-
az grafana dashboard create --name <AMG-name> --resource-group <AMG-resource-group> --title <title> --definition <definition>
87-
```
88-
89-
For example:
90-
91-
```azurecli
92-
az grafana dashboard create --name myGrafana --resource-group myResourceGroup --title "My dashboard" --folder folder1 --definition '{
93-
"dashboard": {
94-
"annotations": {
95-
...
96-
},
97-
"panels": {
98-
...
99-
}
100-
},
101-
"message": "Create a new test dashboard"
102-
}'
103-
```
104-
105-
---
106-
107-
## Duplicate a Grafana dashboard
108-
109-
Duplicate a Grafana dashboard using your preferred method.
110-
111-
### [Portal](#tab/azure-portal)
112-
113-
To copy a Grafana dashboard:
114-
115-
1. Open an existing dashboard in your Grafana instance
116-
1. Select **Dashboard settings**
117-
1. Select **Save as**
118-
1. Enter a new name and/or a new folder and select **Save**
119-
120-
:::image type="content" source="media\create-dashboard\copy-dashboard.png" alt-text="Screenshot of the Grafana instance. Duplicate a dashboard.":::
62+
> Users must have a Grafana Viewer permission to view shared links.
12163
122-
### [Azure CLI](#tab/azure-cli)
64+
### Share a snapshot
12365

124-
1. Run the [az grafana dashboard show](/cli/azure/grafana/dashboard#az-grafana-dashboard-show) command to show the definition of the dashboard you want to duplicate, and copy the output.
66+
The **Snapshot** tab lets you share an interactive dashboard or panel publicly. Sensitive data like queries (metric, template, and annotation) and panel links are removed from the snapshot, leaving only the visible metric data and series names embedded in your dashboard.
12567

126-
```azurecli
127-
az grafana dashboard show --name <AMG-name> --resource-group <AMG-resource-group> --dashboard <dashboard-UID>
128-
```
68+
1. Optionally update the snapshot name, select an expiry date and change the value of the timeout.
69+
1. Choose to publish the Grafana snapshot:
70+
- to snapshots.raintank.io to make it accessible publicly to anyone with the link
71+
- as a local snapshot, to restrict access to users who are registered in your Azure AD tenant
72+
1. **Copy** the snapshot URL generated by Grafana. Select **Delete snapshot** if you no longer need it.
12973

130-
1. Run the [az grafana dashboard create](/cli/azure/grafana/dashboard#az-grafana-dashboard-create) command and replace the placeholders `<AMG-name>`, `<AMG-resource-group>`, `<title>`, and `<dashboard-id>` with your own information. Replace `<definition>` with the output you copied in the previous step, and remove the `uid`and `id`.
131-
132-
```azurecli
133-
az grafana dashboard create --name <AMG-name> --resource-group <AMG-resource-group> --title <title>--definition <definition>
134-
```
135-
136-
For example:
137-
138-
```azurecli
139-
az grafana dashboard create --name myGrafana --resource-group myResourceGroup --title "My dashboard" --folder folder1 --definition '{
140-
"dashboard": {
141-
"annotations": {
142-
...
143-
},
144-
"panels": {
145-
...
146-
}
147-
},
148-
"message": "Create a new test dashboard"
149-
}'
150-
```
151-
152-
---
153-
154-
## Edit a dashboard panel
155-
156-
Edit a Grafana dashboard panel using your preferred method.
157-
158-
### [Portal](#tab/azure-portal)
159-
160-
To update a Grafana panel, follow the steps below.
161-
162-
1. Review the panel to check if you're satisfied with it or want to make some edits.
163-
164-
:::image type="content" source="media/create-dashboard/visualization.png" alt-text="Screenshot of the Grafana instance. Example of visualization.":::
165-
166-
1. In the lower part of the page:
167-
1. **Query** tab:
168-
1. Review the selected data source. If necessary, select the drop-down list to use another data source.
169-
1. Update the query. Each data source has a specific query editor that provides different features and capabilities for that type of [data source](https://grafana.com/docs/grafana/v9.1/datasources/#querying).
170-
1. Select **+ Query** or **+ Expression** to add a new query or expression.
74+
> [!NOTE]
75+
> - Snapshots published on snapshots.raintank.io can be viewed by anyone who has the link.
76+
> - Users must have a Grafana Viewer permission to view snapshots shared locally.
17177
172-
:::image type="content" source="media/create-dashboard/edit-query.png" alt-text="Screenshot of the Grafana instance. Queries.":::
78+
### Share a panel using an embedded link
17379

174-
1. **Transform** tab: filter data or queries, and organize or combine data before the data is visualized.
175-
1. **Alert** tab: set alert rules and notifications.
80+
The **Embed** tab generates HTML code embedding an iframe with a panel, so that you can include it in another web page. The HTML code is automatically generated. Get it in a single step by selecting **Copy to clipboard** at the bottom of the tab. Optionally customize sharing with the options below:
17681

177-
1. At the top of the page:
178-
1. Toggle **Table view** to display data as a table.
179-
1. Switch between **Fill** and **Actual** to edit panel size
180-
1. Select the time icon to update the time range
181-
1. Select the visualization drop-down menu to choose a visualization type that best supports your use case. Go to [visualization](https://grafana.com/docs/grafana/latest/panels-visualizations/visualizations/) for more information.
82+
- **Current time range**: transforms the relative time range of the shared panel to an absolute time range, as currently displayed in your shared panel.
83+
- **Theme**: keep the current theme or choose a dark or a light theme.
84+
- **Shorten URL**: shortens the sharable link
18285

183-
:::image type="content" source="media/create-dashboard/panel-time-visualization-options.png" alt-text="Screenshot of the Grafana instance. Time, visualization and more options.":::
86+
> [!NOTE]
87+
> Users must have a Grafana Viewer permission to view embedded links.
18488
185-
1. On the right hand side, select the **Panel options** icon to review and update various panel options.
89+
### Create a library panel
18690

187-
## [Azure CLI](#tab/azure-cli)
91+
The **Library panel** tab lets you create a library panel that can be reused in other Grafana dashboards. Do this in a single step by selecting The **Create library panel** at the bottom of the tab. Optionally update the panel library name and select another folder to save it in.
18892

189-
Run the [az grafana dashboard update](/cli/azure/grafana/dashboard#az-grafana-dashboard-update) command and update the Grafana dashboard definition.
93+
Once you've created a library panel, reuse it in other dashboards of the same Grafana instance by going to **Dashboards > New dashboard > Add panel from panel library**.
19094

191-
```azurecli
192-
az grafana dashboard update --name <AMG-name> --resource-group <AMG-resource-group> --definition <definition>
193-
```
95+
### Export a dashboard
19496

195-
---
97+
The **Export** tab lets you export a dashboard in JSON format. Do this by selecting **Save to file** to download the JSON file, or select **View JSON > Copy to Clipboard**.
19698

197-
## Next steps
99+
**Export for sharing externally** is disabled by default. Optionally enable this option to generate JSON code for external stakeholders. The exported dashboard can then be [imported to Grafana](how-to-create-dashboard.md#import-a-json-dashboard).
198100

199101
In this how-to guide, you learned how to create a Grafana dashboard. To learn how to manage your data sources, go to:
200102

201103
> [!div class="nextstepaction"]
202-
> [Configure data sources](how-to-data-source-plugins-managed-identity.md)
104+
> [What's new](concept-whats-new.md)

articles/managed-grafana/index.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ landingContent:
4343
url: how-to-authentication-permissions.md
4444
- text: Create a dashboard
4545
url: how-to-create-dashboard.md
46+
- text: Share a dashboard
47+
url: how-to-share-dashboard.md
4648
- text: Configure SMTP settings
4749
url: how-to-smtp-settings.md
4850
- title: Manage Azure Managed Grafana

articles/managed-grafana/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ items:
3737
href: how-to-permissions.md
3838
- name: Create a dashboard
3939
href: how-to-create-dashboard.md
40+
- name: Share a dashboard
41+
href: how-to-share-dashboard.md
4042
- name: Share an Azure Managed Grafana instance
4143
href: how-to-share-grafana-workspace.md
4244
- name: Configure SMTP settings

0 commit comments

Comments
 (0)