|
1 | 1 | ---
|
2 | 2 | title: Query Prometheus metrics using Azure workbooks (preview)
|
3 | 3 | description: Query Prometheus metrics in the portal using Azure Workbooks.
|
4 |
| -author: aul |
| 4 | +author: EdB-MSFT |
5 | 5 | ms.topic: conceptual
|
6 | 6 | ms.date: 01/18/2023
|
| 7 | +ms.author: edbaynash |
7 | 8 | ---
|
8 | 9 |
|
9 | 10 | # Query Prometheus metrics using Azure workbooks (preview)
|
10 | 11 |
|
11 |
| -Using the power of [Azure Workbooks](../visualize/workbooks-overview.md), you can easily create dashboards powered by Azure Monitor managed service for Prometheus. |
| 12 | +Create dashboards powered by Azure Monitor managed service for Prometheus using [Azure Workbooks](../visualize/workbooks-overview.md). |
| 13 | +This article introduces workbooks for Azure Monitor workspaces and shows you how to query Prometheus metrics using Azure workbooks and PromQL query language. |
12 | 14 |
|
13 | 15 | ## Pre-requisites
|
14 |
| - |
15 |
| -- You must either have an Azure Monitor workspace or create a new one. |
| 16 | +To query Prometheus metrics from an Azure Monitor workspace you need the following: |
| 17 | +- An Azure Monitor workspace. To create an Azure Monitor workspace see [Create an Azure Monitor Workspace](./azure-monitor-workspace-overview?tabs=azure-portal.md#create-an-azure-monitor-workspace) |
16 | 18 | - Your Azure Monitor workspace must be [collecting Prometheus metrics](./prometheus-metrics-enable.md) from an AKS cluster.
|
17 |
| -- You must have the Monitoring Data Reader role on the Azure Monitor workspace. |
| 19 | +- You have the Monitoring Data Reader role assigned for the Azure Monitor workspace. |
18 | 20 |
|
19 | 21 | > [!NOTE]
|
20 |
| -> Querying data from an Azure Monitor workspace is a data plane operation, so even if you are an owner or have elevated control plane access, you must assign the Monitoring Data Reader role. Read more about [Azure control and data plane](../../azure-resource-manager/management/control-plane-and-data-plane.md). |
| 22 | +> Querying data from an Azure Monitor workspace is a data plane operation. Even if you are an owner or have elevated control plane access, you still need to assign the Monitoring Data Reader role. For more information, see [Azure control and data plane](../../azure-resource-manager/management/control-plane-and-data-plane.md). |
21 | 23 |
|
22 | 24 | ## Prometheus Explorer workbook
|
23 |
| -Every Azure Monitor workspace comes with an out of the box exploration workbook to query your Prometheus metrics. In the lefthand menu, there will be a menu item titled Prometheus Explorer as well as a workbook with the same name in the Workbooks gallery menu item. |
| 25 | +Azure Monitor workspaces include an exploration workbook to query your Prometheus metrics. |
| 26 | + |
| 27 | +1. From the Azure Monitor workspace overviw page, select **Workbooks** |
| 28 | +1. Select the **Prometheus Explorer** workbook tile. |
24 | 29 |
|
25 | 30 | 
|
26 | 31 |
|
27 |
| -Once you select the Prometheus Explorer, it will open up a workbook with the following input options: |
28 |
| -- Time Range |
29 |
| - - Allows you to change how far back you query the metrics |
30 |
| -- PromQL |
31 |
| - - The inputted query for pulling the Prometheus metrics. Learn more about [PromQL](https://aka.ms/azureprometheus-promio-promql). |
32 |
| -- Graph/Grid/Dimensions |
33 |
| - - Toggles between different output types to match your visualization needs |
| 32 | +A workbook has the following input options: |
| 33 | +- **Time Range**. Select the nuber of hours or days that you want to include in your query. Select *Custom* to set a start and end time. |
| 34 | +- **PromQL**. Enter the PromQL query to retrieve your data. For more information about PromQL, see Querying Prometheus]](https://prometheus.io/docs/prometheus/latest/querying/basics/#querying-prometheus). |
| 35 | +- **Graph**, **Grid**, and **Dimensions** tabs. Swithc between a graphic , tabular and dimensional view of the query output. |
34 | 36 |
|
35 | 37 | 
|
36 | 38 |
|
| 39 | +>>>>>>>>>>https://learn.microsoft.com/en-us/azure/azure-monitor/visualize/workbooks-getting-started |
37 | 40 | ## Create your own Prometheus workbook
|
38 | 41 |
|
39 | 42 | Workbooks supports many other great visualizations and Azure integrations, to set up your own workbook, learn more about [creating your own Azure Workbooks](../visualize/workbooks-create-workbook.md).
|
|
0 commit comments