Skip to content

Commit 813fe92

Browse files
authored
Merge pull request #213786 from bwren/prometheus-post-ignite
Prometheus post ignite updates
2 parents c9e82e1 + 89a870e commit 813fe92

File tree

8 files changed

+168
-14
lines changed

8 files changed

+168
-14
lines changed

articles/azure-monitor/containers/container-insights-prometheus-metrics-addon.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ This article describes how to configure Container insights to send Prometheus me
1212

1313
## Prerequisites
1414

15-
- The cluster must be [onboarded to Container insights](container-insights-enable-aks.md).
1615
- The cluster must use [managed identity authentication](container-insights-enable-aks.md#migrate-to-managed-identity-authentication).
1716
- The following resource providers must be registered in the subscription of the AKS cluster and the Azure Monitor Workspace.
1817
- Microsoft.ContainerService
@@ -26,6 +25,10 @@ Use any of the following methods to install the metrics addon on your cluster an
2625

2726
Managed Prometheus can be enabled in the Azure portal through either Container insights or an Azure Monitor workspace.
2827

28+
### Prerequisites
29+
30+
- The cluster must be [onboarded to Container insights](container-insights-enable-aks.md).
31+
2932
#### Enable from Container insights
3033

3134
1. Open the **Kubernetes services** menu in the Azure portal and select your AKS cluster.
@@ -57,7 +60,7 @@ Use the following procedure to install the Azure Monitor agent and the metrics a
5760
#### Prerequisites
5861

5962
- Register the `AKS-PrometheusAddonPreview` feature flag in the Azure Kubernetes clusters subscription with the following command in Azure CLI: `az feature register --namespace Microsoft.ContainerService --name AKS-PrometheusAddonPreview`.
60-
- The aks-preview extension needs to be installed using the command `az extension add --name aks-preview`. For more information on how to install a CLI extension, see [Use and manage extensions with the Azure CLI](https://learn.microsoft.com/cli/azure/azure-cli-extensions-overview).
63+
- The aks-preview extension needs to be installed using the command `az extension add --name aks-preview`. For more information on how to install a CLI extension, see [Use and manage extensions with the Azure CLI](/azure/azure-cli-extensions-overview).
6164
- Azure CLI version 2.41.0 or higher is required for this feature.
6265

6366
#### Install metrics addon

articles/azure-monitor/essentials/azure-monitor-workspace-overview.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Overview of Azure Monitor workspace, which is a unique environment
44
author: bwren
55
ms.topic: conceptual
66
ms.custom: ignite-2022
7-
ms.date: 05/09/2022
7+
ms.date: 10/05/2022
88
---
99

1010
# Azure Monitor workspace (preview)
@@ -21,16 +21,25 @@ The following table lists the contents of Azure Monitor workspaces. This table w
2121
| Prometheus metrics | Native platform metrics<br>Native custom metrics<br>Prometheus metrics |
2222

2323

24-
2524
## Workspace design
2625
A single Azure Monitor workspace can collect data from multiple sources, but there may be circumstances where you require multiple workspaces to address your particular business requirements. Azure Monitor workspace design is similar to [Log Analytics workspace design](../logs/workspace-design.md). There are several reasons that you may consider creating additional workspaces including the following.
2726

28-
- If you have multiple Azure tenants, you'll usually create a workspace in each because several data sources can only send monitoring data to a workspace in the same Azure tenant.
29-
- Each workspace resides in a particular Azure region, and you may have regulatory or compliance requirements to store data in particular locations.
30-
- You may choose to create separate workspaces to define data ownership, for example by subsidiaries or affiliated companies.
27+
- Azure tenants. If you have multiple Azure tenants, you'll usually create a workspace in each because several data sources can only send monitoring data to a workspace in the same Azure tenant.
28+
- Azure regions. Each workspace resides in a particular Azure region, and you may have regulatory or compliance requirements to store data in particular locations.
29+
- Data ownership. You may choose to create separate workspaces to define data ownership, for example by subsidiaries or affiliated companies.
30+
- Workspace limits. See [Azure Monitor service limits](../service-limits.md#prometheus-metrics) for current capacity limits related to Azure Monitor workspaces.
31+
- Multiple environments. You may have Azure Monitor workspaces supporting different environments such as test, pre-production, and production.
32+
33+
> [!NOTE]
34+
> You cannot currently query across multiple Azure Monitor workspaces.
35+
36+
## Workspace limits
37+
These are currently only related to Prometheus metrics, since this is the only data currently stored in Azure Monitor workspaces.
3138

3239
Many customers will choose an Azure Monitor workspace design to match their Log Analytics workspace design. Since Azure Monitor workspaces currently only contain Prometheus metrics, and metric data is typically not as sensitive as log data, you may choose to further consolidate your Azure Monitor workspaces for simplicity.
3340

41+
42+
3443
## Create an Azure Monitor workspace
3544
In addition to the methods below, you may be given the option to create a new Azure Monitor workspace in the Azure portal as part of a configuration that requires one. For example, when you configure Azure Monitor managed service for Prometheus, you can select an existing Azure Monitor workspace or create a new one.
3645

151 KB
Loading
126 KB
Loading
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
---
2+
title: Use Azure Monitor managed service for Prometheus (preview) as data source for Grafana
3+
description: Details on how to configure Azure Monitor managed service for Prometheus (preview) as data source for both Azure Managed Grafana and self-hosted Grafana in an Azure virtual machine.
4+
author: bwren
5+
ms.topic: conceptual
6+
ms.date: 09/28/2022
7+
---
8+
9+
# Use Azure Monitor managed service for Prometheus (preview) as data source for Grafana using managed system identity
10+
11+
[Azure Monitor managed service for Prometheus (preview)](prometheus-metrics-overview.md) allows you to collect and analyze metrics at scale using a [Prometheus](https://aka.ms/azureprometheus-promio)-compatible monitoring solution. The most common way to analyze and present Prometheus data is with a Grafana dashboard. This article explains how to configure Prometheus as a data source for both [Azure Managed Grafana](../../managed-grafana/overview.md) and [self-hosted Grafana](https://grafana.com/) running in an Azure virtual machine using managed system identity authentication.
12+
13+
14+
## Azure Managed Grafana
15+
The following sections describe how to configure Azure Monitor managed service for Prometheus (preview) as a data source for Azure Managed Grafana.
16+
17+
> [!IMPORTANT]
18+
> This section describes the manual process for adding an Azure Monitor managed service for Prometheus data source to Azure Managed Grafana. You can achieve the same functionality by linking the Azure Monitor workspace and Grafana workspace as described in [Link a Grafana workspace](azure-monitor-workspace-overview.md#link-a-grafana-workspace).
19+
20+
### Configure system identify
21+
Your Grafana workspace requires the following:
22+
23+
- System managed identity enabled
24+
- *Monitoring Data Reader* role for the Azure Monitor workspace
25+
26+
Both of these settings are configured by default when you created your Grafana workspace. Verify these settings on the **Identity** page for your Grafana workspace.
27+
28+
:::image type="content" source="media/prometheus-grafana/grafana-system-identity.png" alt-text="Screenshot of Identity page for Azure Managed Grafana." lightbox="media/prometheus-grafana/grafana-system-identity.png":::
29+
30+
31+
**Configure from Grafana workspace**<br>
32+
Use the following steps to allow access all Azure Monitor workspaces in a resource group or subscription:
33+
34+
1. Open the **Identity** page for your Grafana workspace in the Azure portal.
35+
2. If **Status** is **No**, change it to **Yes**.
36+
3. Click **Azure role assignments** to review the existing access in your subscription.
37+
4. If **Monitoring Data Reader** is not listed for your subscription or resource group:
38+
1. Click **+ Add role assignment**.
39+
2. For **Scope**, select either **Subscription** or **Resource group**.
40+
3. For **Role**, select **Monitoring Data Reader**.
41+
4. Click **Save**.
42+
43+
44+
**Configure from Azure Monitor workspace**<br>
45+
Use the following steps to allow access to only a specific Azure Monitor workspace:
46+
47+
1. Open the **Access Control (IAM)** page for your Azure Monitor workspace in the Azure portal.
48+
2. Click **Add role assignment**.
49+
3. Select **Monitoring Data Reader** and click **Next**.
50+
4. For **Assign access to**, select **Managed identity**.
51+
5. Click **+ Select members**.
52+
6. For **Managed identity**, select **Azure Managed Grafana**.
53+
7. Select your Grafana workspace and then click **Select**.
54+
8. Click **Review + assign** to save the configuration.
55+
56+
### Create Prometheus data source
57+
58+
Azure Managed Grafana supports Azure authentication by default.
59+
60+
1. Open the **Overview** page for your Azure Monitor workspace in the Azure portal.
61+
2. Copy the **Query endpoint**, which you'll need in a step below.
62+
3. Open your Azure Managed Grafana workspace in the Azure portal.
63+
4. Click on the **Endpoint** to view the Grafana workspace.
64+
5. Select **Configuration** and then **Data source**.
65+
6. Click **Add data source** and then **Prometheus**.
66+
7. For **URL**, paste in the query endpoint for your Azure Monitor workspace.
67+
8. Select **Azure Authentication** to turn it on.
68+
9. For **Authentication** under **Azure Authentication**, select **Managed Identity**.
69+
10. Scroll to the bottom of the page and click **Save & test**.
70+
71+
:::image type="content" source="media/prometheus-grafana/prometheus-data-source.png" alt-text="Screenshot of configuration for Prometheus data source." lightbox="media/prometheus-grafana/prometheus-data-source.png":::
72+
73+
74+
## Self-managed Grafana
75+
The following sections describe how to configure Azure Monitor managed service for Prometheus (preview) as a data source for self-managed Grafana on an Azure virtual machine.
76+
### Configure system identify
77+
Azure virtual machines support both system assigned and user assigned identity. The following steps configure system assigned identity.
78+
79+
**Configure from Azure virtual machine**<br>
80+
Use the following steps to allow access all Azure Monitor workspaces in a resource group or subscription:
81+
82+
1. Open the **Identity** page for your virtual machine in the Azure portal.
83+
2. If **Status** is **No**, change it to **Yes**.
84+
3. Click **Azure role assignments** to review the existing access in your subscription.
85+
4. If **Monitoring Data Reader** is not listed for your subscription or resource group:
86+
1. Click **+ Add role assignment**.
87+
2. For **Scope**, select either **Subscription** or **Resource group**.
88+
3. For **Role**, select **Monitoring Data Reader**.
89+
4. Click **Save**.
90+
91+
**Configure from Azure Monitor workspace**<br>
92+
Use the following steps to allow access to only a specific Azure Monitor workspace:
93+
94+
1. Open the **Access Control (IAM)** page for your Azure Monitor workspace in the Azure portal.
95+
2. Click **Add role assignment**.
96+
3. Select **Monitoring Data Reader** and click **Next**.
97+
4. For **Assign access to**, select **Managed identity**.
98+
5. Click **+ Select members**.
99+
6. For **Managed identity**, select **Virtual machine**.
100+
7. Select your Grafana workspace and then click **Select**.
101+
8. Click **Review + assign** to save the configuration.
102+
103+
104+
105+
106+
### Create Prometheus data source
107+
108+
Versions 9.x and greater of Grafana support Azure Authentication, but it's not enabled by default. To enable this feature, you need to update your Grafana configuration. To determine where your Grafana.ini file is and how to edit your Grafana config, please review this document from Grafana Labs. Once you know where your configuration file lives on your VM, make the following update:
109+
110+
111+
1. Locate and open the *Grafana.ini* file on your virtual machine.
112+
2. Under the `[auth]` section of the configuration file, change the `azure_auth_enabled` setting to `true`.
113+
3. Open the **Overview** page for your Azure Monitor workspace in the Azure portal.
114+
4. Copy the **Query endpoint**, which you'll need in a step below.
115+
5. Open your Azure Managed Grafana workspace in the Azure portal.
116+
6. Click on the **Endpoint** to view the Grafana workspace.
117+
7. Select **Configuration** and then **Data source**.
118+
8. Click **Add data source** and then **Prometheus**.
119+
9. For **URL**, paste in the query endpoint for your Azure Monitor workspace.
120+
10. Select **Azure Authentication** to turn it on.
121+
11. For **Authentication** under **Azure Authentication**, select **Managed Identity**.
122+
12. Scroll to the bottom of the page and click **Save & test**.
123+
124+
:::image type="content" source="media/prometheus-grafana/prometheus-data-source.png" alt-text="Screenshot of configuration for Prometheus data source." lightbox="media/prometheus-grafana/prometheus-data-source.png":::
125+
126+
127+
128+
## Next steps
129+
130+
- [Collect Prometheus metrics for your AKS cluster](../containers/container-insights-prometheus-metrics-addon.md).
131+
- [Configure Prometheus alerting and recording rules groups](prometheus-rule-groups.md).
132+
- [Customize scraping of Prometheus metrics](prometheus-metrics-scrape-configuration.md).

articles/azure-monitor/essentials/prometheus-metrics-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Azure Monitor managed service for Prometheus can currently collect data from any
2323

2424

2525
## Grafana integration
26-
The primary method for visualizing Prometheus metrics is [Azure Managed Grafana](../../managed-grafana/overview.md). Connect your Azure Monitor workspace to a Grafana workspace so that it can be used as a data source in a Grafana dashboard. You then have access to multiple prebuilt dashboards that use Prometheus metrics and the ability to create any number of custom dashboards.
26+
The primary method for visualizing Prometheus metrics is [Azure Managed Grafana](../../managed-grafana/overview.md). [Connect your Azure Monitor workspace to a Grafana workspace](azure-monitor-workspace-overview.md#link-a-grafana-workspace) so that it can be used as a data source in a Grafana dashboard. You then have access to multiple prebuilt dashboards that use Prometheus metrics and the ability to create any number of custom dashboards.
2727

2828
## Alerts
2929
Azure Monitor managed service for Prometheus adds a new Prometheus alert type for creating alerts using PromQL queries. You can view fired and resolved Prometheus alerts in the Azure portal along with other alert types. Prometheus alerts are configured with the same [alert rules](https://aka.ms/azureprometheus-promio-alertrules) used by Prometheus. For your AKS cluster, you can use a [set of predefined Prometheus alert rules]

articles/azure-monitor/toc.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,24 +223,36 @@ items:
223223
- name: Prometheus metrics
224224
items:
225225
- name: Overview
226+
displayName: Prometheus
226227
href: essentials/prometheus-metrics-overview.md
227228
- name: Rule groups
229+
displayName: Prometheus
228230
href: essentials/prometheus-rule-groups.md
231+
- name: Configure Grafana
232+
displayName: Prometheus
233+
href: essentials/prometheus-grafana.md
229234
- name: Troubleshoot collection
235+
displayName: Prometheus
230236
href: essentials/prometheus-metrics-troubleshoot.md
231237
- name: Customize collection
232238
items:
233239
- name: Default configuration
240+
displayName: Prometheus
234241
href: essentials/prometheus-metrics-scrape-default.md
235242
- name: High scale
243+
displayName: Prometheus
236244
href: essentials/prometheus-metrics-scrape-scale.md
237245
- name: Custom configuration
246+
displayName: Prometheus
238247
href: essentials/prometheus-metrics-scrape-configuration.md
239248
- name: Create and validate custom scrape config
249+
displayName: Prometheus
240250
href: essentials/prometheus-metrics-scrape-validate.md
241251
- name: Minimal ingestion profile
252+
displayName: Prometheus
242253
href: essentials/prometheus-metrics-scrape-configuration-minimal.md
243254
- name: Send to multiple metric workspaces
255+
displayName: Prometheus
244256
href: essentials/prometheus-metrics-multiple-workspaces.md
245257
- name: Metrics explorer
246258
items:

includes/azure-monitor-limits-metrics.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,21 @@ Prometheus queries are created using PromQL and can be authored in either Azure
4343

4444

4545
**Query pre-parsing limits**<br>
46-
Based on query time range and request type over a 30-second window.<br>
47-
Each value is per user (Azure AD or System Identity).
46+
Based on query time range and request type over a 30-second window.
4847

4948
| Limit | Value |
5049
|:---|:---|
51-
| Query hours per Azure Managed Grafana Workspace | 30,000 |
50+
| Query hours per user (Azure AD, managed identity, Azure Managed Grafana Workspace) | 30,000 |
5251
| Query hours per Azure Monitor workspace | 60,000 |
5352
| Query hours per Azure tenant | 600,000 |
5453

5554

5655
**Query post-parsing limits**<br>
57-
Based on query time range and range vectors in query over a 30-second window.<br>
58-
Each value is per user (Azure AD or System Identity).
56+
Based on query time range and range vectors in query over a 30-second window.
5957

6058
| Limit | Value |
6159
|:---|:---|
62-
| Query hours per Azure Managed Grafana Workspace | 2,000,000 |
60+
| Query hours per user (Azure AD, managed identity, Azure Managed Grafana Workspace) | 2,000,000 |
6361
| Query hours per Azure Monitor workspace | 2,000,000 |
6462
| Query hours per Azure tenant | 20,000,000 |
6563

0 commit comments

Comments
 (0)