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
Copy file name to clipboardExpand all lines: articles/azure-monitor/essentials/prometheus-api-promql.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,14 +8,14 @@ ms.date: 09/28/2022
8
8
ms.reviewer: aul
9
9
---
10
10
11
-
# Query Prometheus metrics using the API and PromQL.
11
+
# Query Prometheus metrics using the API and PromQL
12
12
13
13
Azure Monitor managed service for Prometheus (preview), collects metrics from Azure Kubernetes Clusters and stores them in an Azure Monitor workspace. PromQL - Prometheus query language, is a functional query language that allows you to query and aggregate time series data. Use PromQL to query and aggregate metrics stored in an Azure Monitor workspace.
14
14
15
15
This article describes how to query an Azure Monitor workspace using PromQL via the REST API.
16
16
For more information on PromQL, see [Querying prometheus](https://prometheus.io/docs/prometheus/latest/querying/basics/).
17
17
18
-
## Prerequisites
18
+
## Prerequisites
19
19
To query an Azure monitor workspace using PromQL, you need the following prerequisites:
20
20
+ An Azure Kubernetes Cluster or remote Kubernetes cluster.
21
21
+ Azure Monitor managed service for Prometheus (preview) scraping metrics from a Kubernetes cluster
@@ -48,13 +48,13 @@ Allow your app to query data from your Azure Monitor workspace.
48
48
49
49
1. Select **Add**, then **Add role assignment** from the Access Control (IAM) page.
1. On the **Add role Assignment page**, search for *Monitoring*.
54
54
55
55
1. Select **Monitoring Data Reader**, then select the Members tab.
56
56
57
-
:::image type="content" source="./media/prometheus-api-promql/add-role-assignment.png" lightbox="./media/prometheus-api-promql/add-role-assignment.png" alt-text="A screenshot showing the Add role assignment page":::
57
+
:::image type="content" source="./media/prometheus-api-promql/add-role-assignment.png" lightbox="./media/prometheus-api-promql/add-role-assignment.png" alt-text="A screenshot showing the Add role assignment page.":::
58
58
59
59
1. Select **Select members**.
60
60
@@ -69,7 +69,7 @@ Allow your app to query data from your Azure Monitor workspace.
69
69
You've created your App registration and have assigned it access to query data from your Azure Monitor workspace. You can now generate a token and use it in a query.
70
70
71
71
72
-
### Request a Token
72
+
### Request a token
73
73
Send the following request in the command prompt or by using a client like Postman.
74
74
75
75
```shell
@@ -97,7 +97,7 @@ Sample response body:
97
97
98
98
Save the access token from the response for use in the following HTTP requests.
99
99
100
-
## Query Endpoint
100
+
## Query endpoint
101
101
102
102
Find your workspace's query endpoint on the Azure Monitor workspace overview page.
103
103
@@ -204,7 +204,7 @@ The following limitations are in addition to those detailed in the Prometheus sp
204
204
205
205
For more information on Prometheus metrics limits, see [Prometheus metrics](../../azure-monitor/service-limits.md#prometheus-metrics)
0 commit comments