Skip to content

Commit d510ef5

Browse files
committed
Initial commit
1 parent 1ddc977 commit d510ef5

File tree

2 files changed

+175
-0
lines changed

2 files changed

+175
-0
lines changed
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
---
2+
title: Share an Azure Managed Grafana dashboard or panel
3+
description: Learn how to share a Grafana dashboard with internal and external stakeholders.
4+
author: maud-lv
5+
ms.author: malev
6+
ms.service: managed-grafana
7+
ms.topic: how-to
8+
ms.date: 03/01/2023
9+
---
10+
11+
# Share a Grafana dashboard or panel
12+
13+
In this guide for Azure Managed Grafana, learn how to share a Grafana dashboard with internal and external stakeholders. See how you can share a dashboard or a panel with anyone, whether they are in your Azure Active Directory tenant or not.
14+
15+
> [!NOTE]
16+
> The Grafana UI may change periodically. This article shows the Grafana interface and user flow at a given point. Your experience may slightly differ from the examples below at the time of reading this document. If this is the case, refer to the [Grafana Labs documentation.](https://grafana.com/docs/grafana/latest/dashboards/)
17+
18+
## Prerequisites
19+
20+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free).
21+
- An Azure Managed Grafana instance. If you don't have one yet, [create an Azure Managed Grafana instance](./quickstart-managed-grafana-portal.md).
22+
- A Grafana dashboard. If you don't have one, [create a Grafana dashboard ](./quickstart-managed-grafana-portal.md).
23+
24+
### [Portal](#tab/azure-portal)
25+
26+
## Open sharing options
27+
28+
Access Grafana dashboard and panel sharing options with the following steps:
29+
30+
1. In the Azure portal, open your Azure Managed Grafana workspace and select the **Endpoint** URL.
31+
1. In the Grafana portal, go to **Dashboards > Browse**, and open a dashboard of your choice.
32+
1. Open the sharing options:
33+
- To share a whole dashboard, select the **Share dashboard or panel** icon at the top of the page
34+
- To share a single dashboard panel, hover on top of a panel title, expand the panel menu and select **Share**.
35+
36+
## Share a dashboard
37+
38+
There a three dashboard sharing options available.
39+
40+
### Share a link
41+
42+
43+
### [Portal](#tab/azure-portal)
44+
45+
1. In the Azure portal, open your Azure Managed Grafana workspace and select the **Endpoint** URL.
46+
1. In the Grafana portal, go to **Dashboards > New Dashboard**.
47+
1. Select one of the following options:
48+
- **Add a new panel**: instantly creates a dashboard from scratch with a first default panel.
49+
- **Add a new row**: instantly creates a dashboard with a new empty row.
50+
- **Add a panel from the panel library**: instantly creates a dashboard with an existing reusable panel from another instance you have access to.
51+
52+
:::image type="content" source="media/create-dashboard/from-scratch.png" alt-text="Screenshot of the Grafana instance. Create a new dashboard.":::
53+
54+
### [Azure CLI](#tab/azure-cli)
55+
56+
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.
57+
58+
```azurecli
59+
az grafana dashboard create --name <AMG-name> --resource-group <AMG-resource-group> --title <title> --definition <definition>
60+
```
61+
62+
For example:
63+
64+
```azurecli
65+
az grafana dashboard create --name myGrafana --resource-group myResourceGroup --title "My dashboard" --folder folder1 --definition '{
66+
"dashboard": {
67+
"annotations": {
68+
...
69+
},
70+
"panels": {
71+
...
72+
}
73+
},
74+
"message": "Create a new test dashboard"
75+
}'
76+
```
77+
78+
---
79+
80+
## Duplicate a Grafana dashboard
81+
82+
Duplicate a Grafana dashboard using your preferred method.
83+
84+
### [Portal](#tab/azure-portal)
85+
86+
To copy a Grafana dashboard:
87+
88+
1. Open an existing dashboard in your Grafana instance
89+
1. Select **Dashboard settings**
90+
1. Select **Save as**
91+
1. Enter a new name and/or a new folder and select **Save**
92+
93+
:::image type="content" source="media\create-dashboard\copy-dashboard.png" alt-text="Screenshot of the Grafana instance. Duplicate a dashboard.":::
94+
95+
### [Azure CLI](#tab/azure-cli)
96+
97+
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.
98+
99+
```azurecli
100+
az grafana dashboard show --name <AMG-name> --resource-group <AMG-resource-group> --dashboard <dashboard-UID>
101+
```
102+
103+
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`.
104+
105+
```azurecli
106+
az grafana dashboard create --name <AMG-name> --resource-group <AMG-resource-group> --title <title>--definition <definition>
107+
```
108+
109+
For example:
110+
111+
```azurecli
112+
az grafana dashboard create --name myGrafana --resource-group myResourceGroup --title "My dashboard" --folder folder1 --definition '{
113+
"dashboard": {
114+
"annotations": {
115+
...
116+
},
117+
"panels": {
118+
...
119+
}
120+
},
121+
"message": "Create a new test dashboard"
122+
}'
123+
```
124+
125+
---
126+
127+
## Edit a dashboard panel
128+
129+
Edit a Grafana dashboard panel using your preferred method.
130+
131+
### [Portal](#tab/azure-portal)
132+
133+
To update a Grafana panel, follow the steps below.
134+
135+
1. Review the panel to check if you're satisfied with it or want to make some edits.
136+
137+
:::image type="content" source="media/create-dashboard/visualization.png" alt-text="Screenshot of the Grafana instance. Example of visualization.":::
138+
139+
1. In the lower part of the page:
140+
1. **Query** tab:
141+
1. Review the selected data source. If necessary, select the drop-down list to use another data source.
142+
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).
143+
1. Select **+ Query** or **+ Expression** to add a new query or expression.
144+
145+
:::image type="content" source="media/create-dashboard/edit-query.png" alt-text="Screenshot of the Grafana instance. Queries.":::
146+
147+
1. **Transform** tab: filter data or queries, and organize or combine data before the data is visualized.
148+
1. **Alert** tab: set alert rules and notifications.
149+
150+
1. At the top of the page:
151+
1. Toggle **Table view** to display data as a table.
152+
1. Switch between **Fill** and **Actual** to edit panel size
153+
1. Select the time icon to update the time range
154+
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.
155+
156+
:::image type="content" source="media/create-dashboard/panel-time-visualization-options.png" alt-text="Screenshot of the Grafana instance. Time, visualization and more options.":::
157+
158+
1. On the right hand side, select the **Panel options** icon to review and update various panel options.
159+
160+
## [Azure CLI](#tab/azure-cli)
161+
162+
Run the [az grafana dashboard update](/cli/azure/grafana/dashboard#az-grafana-dashboard-update) command and update the Grafana dashboard definition.
163+
164+
```azurecli
165+
az grafana dashboard update --name <AMG-name> --resource-group <AMG-resource-group> --definition <definition>
166+
```
167+
168+
---
169+
170+
## Next steps
171+
172+
In this how-to guide, you learned how to create a Grafana dashboard. To learn how to manage your data sources, go to:
173+
174+
> [!div class="nextstepaction"]
175+
> [Configure data sources](how-to-data-source-plugins-managed-identity.md)
57.8 KB
Loading

0 commit comments

Comments
 (0)