You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Learn how data is encrypted in Azure Managed Grafana.
4
+
author: maud-lv
5
+
ms.author: malev
6
+
ms.service: managed-grafana
7
+
ms.topic: conceptual
8
+
ms.date: 07/22/2022
9
+
ms.custom: concept
10
+
---
11
+
12
+
# Encryption in Azure Managed Grafana
13
+
14
+
This article provides a short description of encryption within Azure Managed Grafana.
15
+
16
+
## Data storage
17
+
18
+
Azure Managed Grafana stores data in the following services:
19
+
20
+
- Resource-provider related system metadata is stored in Azure Cosmos DB.
21
+
- Grafana instance user data is stored in a per instance Azure Database for PostgreSQL.
22
+
23
+
## Encryption in Cosmos DB and Azure Database for PostgreSQL
24
+
25
+
Managed Grafana leverages encryption offered by Cosmos DB and Azure Database for PostgreSQL.
26
+
27
+
Data stored in Cosmos DB and Azure Database for PostgreSQL is encrypted at rest on storage devices and in transport over the network.
28
+
29
+
For more information, go to [Encryption at rest in Azure Cosmos DB](/azure/cosmos-db/database-encryption-at-rest) and [Security in Azure Database for PostgreSQL - Flexible Server](/azure/postgresql/flexible-server/concepts-security).
30
+
31
+
## Server-side encryption
32
+
33
+
The encryption model used by Managed Grafana is the server-side encryption model with Service-Managed keys.
34
+
35
+
In this model, all key management aspects such as key issuance, rotation, and backup are managed by Microsoft. The Azure resource providers create the keys, place them in secure storage, and retrieve them when needed. For more information, go to [Server-side encryption using Service-Managed key](/azure/security/fundamentals/encryption-models).
36
+
37
+
## Next steps
38
+
39
+
> [!div class="nextstepaction"]
40
+
> [Monitor your Azure Managed Grafana instance](how-to-monitor-managed-grafana-workspace.md)
title: High availability in Azure Managed Grafana Preview
3
-
description: Learn about high availability options provided by Azure Managed Grafana Preview
2
+
title: Azure Managed Grafana service reliability
3
+
description: Learn about service reliability and availability options provided by Azure Managed Grafana
4
4
author: maud-lv
5
5
ms.author: malev
6
6
ms.service: managed-grafana
7
7
ms.topic: conceptual
8
-
ms.date: 6/18/2022
8
+
ms.date: 7/27/2022
9
9
---
10
10
11
-
# High availability in Azure Managed Grafana Preview
11
+
# Azure Managed Grafana service reliability
12
12
13
-
An Azure Managed Grafana Preview instance in the Standard tier is hosted on a dedicated set of virtual machines (VMs). By default, two VMs are deployed to provide redundancy. Each VM runs a Grafana server. A network load balancer distributes browser requests amongst the Grafana servers. On the backend, the Grafana servers are connected to a shared database that stores the configuration and other persistent data for an entire Managed Grafana instance.
13
+
An Azure Managed Grafana instance in the Standard tier is hosted on a dedicated set of virtual machines (VMs). By default, two VMs are deployed to provide redundancy. Each VM runs a Grafana server. A network load balancer distributes browser requests amongst the Grafana servers. On the backend, the Grafana servers are connected to a shared database that stores the configuration and other persistent data for an entire Managed Grafana instance.
14
14
15
-
:::image type="content" source="media/high-availability/high-availability.png" alt-text="Diagram of the Managed Grafana Standard tier instance setup.":::
15
+
:::image type="content" source="media/service-reliability/diagram.png" alt-text="Diagram of the Managed Grafana Standard tier instance setup.":::
16
16
17
17
The load balancer always keeps track of which Grafana servers are available. In a dual-server setup, if it detects that one server is down, the load balancer starts sending all requests to the remaining server. That server should be able to pick up the browser sessions previously served by the other one based on information saved in the shared database. In the meantime, the Managed Grafana service will work to repair the unhealthy server or bring up a new one.
18
18
19
+
Microsoft is not providing or setting up disaster recovery for this service. In case of a region level outage, service will experience downtime and users can set up additional instances in other regions for disaster recovery purposes.
20
+
19
21
## Zone redundancy
20
22
21
-
Normally the network load balancer, VMs and database that underpin a Managed Grafana instance are located within one Azure datacenter. The Managed Grafana Standard tier supports *zone redundancy*, which provides protection against zonal outages. When the zone redundancy option is selected, the VMs are spread across [availability zones](../availability-zones/az-overview.md#availability-zones) and other resources with availability zone enabled.
23
+
Normally the network load balancer, VMs and database that underpin a Managed Grafana instance are located in a region based on system resource availability, and could end up being in a same Azure datacenter
22
24
23
-
> [!NOTE]
24
-
> Zone redundancy can only be enabled when creating the Managed Grafana instance, and can't be modified subsequently. There's also an additional charge for using the zone redundancy option. Go to [Azure Managed Grafana pricing](https://azure.microsoft.com/pricing/details/managed-grafana/) for details.
25
+
### With zone redundancy enabled
26
+
27
+
When the zone redundancy option is enabled, VMs are spread across [availability zones](../availability-zones/az-overview.md#availability-zones) and other resources with availability zone enabled.
25
28
26
29
In a zone-wide outage, no user action is required. An impacted Managed Grafana instance will rebalance itself to take advantage of the healthy zone automatically. The Managed Grafana service will attempt to heal the affected instances during zone recovery.
27
30
31
+
> [!NOTE]
32
+
> Zone redundancy can only be enabled when creating the Managed Grafana instance, and can't be modified subsequently. The zone redundancy option comes with an additional cost. Go to [Azure Managed Grafana pricing](https://azure.microsoft.com/pricing/details/managed-grafana/) for details.
33
+
34
+
### With zone redundancy disabled
35
+
36
+
Zone redundancy is disabled in the Managed Grafana Standard tier by default. In this scenario, virtual machines are created as regional resources and should not be expected to survive zone-downs scenarios as they can go down at same time.
37
+
28
38
## Next steps
29
39
30
40
> [!div class="nextstepaction"]
31
-
> [Create an Azure Managed Grafana Preview instance](./quickstart-managed-grafana-portal.md)
41
+
> [Create an Azure Managed Grafana instance](./quickstart-managed-grafana-portal.md)
description: Learn how to call Grafana APIs programmatically with Azure Active Directory (Azure AD) and an Azure service principal
2
+
title: 'Call Grafana APIs programmatically with Azure Managed Grafana'
3
+
titleSuffix: Azure Managed Grafana
4
+
description: Learn how to call Grafana APIs programmatically with Azure Active Directory and an Azure service principal
5
5
author: maud-lv
6
6
ms.author: malev
7
7
ms.service: managed-grafana
8
-
ms.topic: how-to
9
-
ms.date: 4/18/2022
8
+
ms.topic: tutorial
9
+
ms.date: 08/11/2022
10
10
---
11
11
12
-
# How to call Grafana APIs programmatically
12
+
# Tutorial: Call Grafana APIs programmatically
13
13
14
-
In this article, you'll learn how to call Grafana APIs within Azure Managed Grafana Preview using a service principal.
14
+
In this tutorial, you learn how to:
15
+
16
+
> [!div class="checklist"]
17
+
> * Assign an Azure Managed Grafana role to the service principal of your application
18
+
> * Retrieve application details
19
+
> * Get an access token
20
+
> * Call Grafana APIs
15
21
16
22
## Prerequisites
17
23
18
-
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/dotnet).
19
-
- An Azure Managed Grafana instance. If you don't have one yet, [create an Azure Managed Grafana instance](./quickstart-managed-grafana-portal.md).
24
+
* An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/).
25
+
* An Azure Managed Grafana workspace. [Create an Azure Managed Grafana instance](./quickstart-managed-grafana-portal.md).
26
+
* An Azure Active Directory (Azure AD) application with a service principal. [Create an Azure AD application and service principal](../active-directory/develop/howto-create-service-principal-portal.md). For simplicity, use an application located in the same Azure AD tenant as your Managed Grafana instance.
20
27
21
28
## Sign in to Azure
22
29
23
30
Sign in to the Azure portal at [https://portal.azure.com/](https://portal.azure.com/) with your Azure account.
24
31
25
-
## Assign roles to the service principal of your application and of your Azure Managed Grafana Preview instance
32
+
## Assign an Azure Managed Grafana role to the service principal of your application
33
+
34
+
1. In the Azure portal, open your Managed Grafana instance.
35
+
1. Select **Access control (IAM)** in the navigation menu.
36
+
1. Select **Add**, then **Add role assignment**.
37
+
1. Select the **Grafana Editor** role and then **Next**.
38
+
1. Under **Assign access to**, select **User,group, or service principal**.
39
+
1. Select **Select members**, select your service principal, and hit **Select**.
40
+
1. Select **Review + assign**.
41
+
42
+
:::image type="content" source="media/tutorial-api/role-assignment.png" alt-text="Screenshot of Add role assignment in the Azure platform.":::
43
+
44
+
## Retrieve application details
45
+
46
+
You now need to gather some information, which you'll use to get a Grafana API access token, and call Grafana APIs.
47
+
48
+
1. Find your tenant ID:
49
+
1. In the Azure portal, enter *Azure Active Directory* in the **Search resources, services, and docs (G+ /)**.
50
+
1. Select **Azure Active Directory**.
51
+
1. Select **Properties** from the left menu.
52
+
1. Locate the field **Tenant ID** and save its value.
53
+
54
+
:::image type="content" source="./media/tutorial-api/tenant-id.png" alt-text="Screenshot of the Azure portal, getting tenant ID.":::
55
+
56
+
1. Find your client ID:
57
+
1. In the Azure portal, in Azure Active Directory, select **App registrations** from the left menu.
58
+
1. Select your app.
59
+
1. In **Overview**, find the **Application (client) ID** field and save its value.
60
+
61
+
:::image type="content" source="./media/tutorial-api/client-id.png" alt-text="Screenshot of the Azure portal, getting client ID.":::
62
+
63
+
1. Create an application secret:
64
+
1. In the Azure portal, in Azure Active Directory, select **App registrations** from the left menu.
65
+
1. Select your app.
66
+
1. Select **Certificates & secrets** from the left menu.
67
+
1. Select **New client secret**.
68
+
1. Create a new client secret and save its value.
26
69
27
-
1. Start by [Creating an Azure AD application and service principal that can access resources](../active-directory/develop/howto-create-service-principal-portal.md). This guide takes you through creating an application and assigning a role to its service principal. For simplicity, use an application located in the same Azure Active Directory (Azure AD) tenant as your Grafana instance.
28
-
1. Assign the role of your choice to the service principal for your Grafana resource. Refer to [How to share a Managed Grafana instance](how-to-share-grafana-workspace.md) to learn how to grant access to a Grafana instance. Instead of selecting a user, select **Service principal**.
70
+
:::image type="content" source="./media/tutorial-api/create-new-secret.png" alt-text="Screenshot of the Azure portal, creating a secret.":::
71
+
72
+
> [!NOTE]
73
+
> You can only access a secret's value immediately after creating it. Copy the value before leaving the page to use it in the next step of this tutorial.
74
+
75
+
1. Find your Grafana endpoint URL:
76
+
77
+
1. In the Azure portal, enter *Azure Managed Grafana* in the **Search resources, services, and docs (G+ /)** bar.
78
+
1. Select **Azure Managed Grafana** and open your Managed Grafana workspace.
79
+
1. Select **Overview** from the left menu and save the **Endpoint** value.
80
+
81
+
:::image type="content" source="media/tutorial-api/endpoint-url.png" alt-text="Screenshot of the Azure platform. Endpoint displayed in the Overview page.":::
29
82
30
83
## Get an access token
31
84
32
-
To access Grafana APIs, you first need to get an access token. Here's an example showing how you can call Azure AD to retrieve a token:
85
+
To access Grafana APIs, you need to get an access token. Follow the example below to call Azure AD and retrieve a token. Replace `<tenant-id>`, `<client-id>`, and `<client-secret>` with the tenant ID, application (client) ID, and client secret collected in the previous step.
33
86
34
87
```bash
35
88
curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' \
Replace `<tenant-id>` with your own Azure AD tenant ID, replace `<client-id>` with your client ID and `<application-secret>` with the application secret of the application you want to share.
41
-
42
93
Here's an example of response:
43
94
44
95
```bash
@@ -53,21 +104,34 @@ Here's an example of response:
53
104
}
54
105
```
55
106
56
-
## Call a Grafana API
107
+
## Call Grafana APIs
57
108
58
-
You can now call the Grafana API using the access token retrieved in the previous step as the Authorization header. For example:
109
+
You can now call Grafana APIs using the access token retrieved in the previous step as the Authorization header. For example:
59
110
60
111
```bash
61
112
curl -X GET \
62
113
-H 'Authorization: Bearer <access-token>' \
63
114
https://<grafana-url>/api/user
64
115
```
65
116
66
-
Replace `<access-token>` with the access token retrieved in the previous step and replace `<grafana-url>` with the URL of your Grafana instance. For example `https://grafanaworkspace-abcd.cuse.grafana.azure.com`. This URL is displayed in the Azure platform, in the **Overview** page of your Managed Grafana instance.
117
+
Replace `<access-token>` and `<grafana-url>` with the access token retrieved in the previous step and the endpoint URL of your Grafana instance. For example `https://my-grafana-abcd.cuse.grafana.azure.com`.
118
+
119
+
## Clean up resources
120
+
121
+
If you're not going to continue to use these resources, delete them with the following steps:
122
+
123
+
1. Delete Azure Managed Grafana:
124
+
1. In the Azure portal, in Azure Managed Grafana, select **Overview** from the left menu.
125
+
1. Select **Delete**.
126
+
1. Enter the resource name to confirm deletion and select **Delete**.
67
127
68
-
:::image type="content" source="media/managed-grafana-how-to-api-endpoint.png" alt-text="Screenshot of the Azure platform. Endpoint displayed in the Overview page.":::
128
+
1. Delete the Azure AD application:
129
+
1. In the Azure portal, in Azure Active Directory, select **App registrations** from the left menu.
130
+
1. Select your app.
131
+
1. In the **Overview** tab, select **Delete**.
132
+
1. Select **Delete**.
69
133
70
134
## Next steps
71
135
72
136
> [!div class="nextstepaction"]
73
-
> [Grafana UI](./grafana-app-ui.md)
137
+
> [Create and manage API keys](./how-to-create-api-keys.md)
0 commit comments