Skip to content

Commit d75a7e9

Browse files
committed
fixes
1 parent 0cee444 commit d75a7e9

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

articles/azure-monitor/essentials/query-azure-monitor-workspaces.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ To set up Azure Active Directory authentication, follow the steps below:
3535

3636
### Register an app with Azure Active Directory
3737

38-
1. To register an app, follow the steps in [Register an App to request authorization tokens and work with APIs](../logs/api/register-app-for-token?tabs=portal)
38+
1. To register an app, follow the steps in [Register an App to request authorization tokens and work with APIs](../logs/api/register-app-for-token.md?tabs=portal)
3939

4040
<<<<Is this required ?>>>>>
4141
1. On the app's overview page, select API permissions.
@@ -107,31 +107,32 @@ Save the access token from the response for use in the following HTTP requests.
107107

108108
### GET/query
109109

110-
```
111-
GET https://management.azure.com/subscriptions/<subscriptionId>/resourcegroups/<resourceGroupName>/providers/microsoft.monitor/accounts/<workspace name>/api/v1/label/__name__/values?api-version=2021-06-01-preview
112-
--header 'Authorization: Bearer <access token>'
113-
```
114-
When using the management end point, request a token using `--data-urlencode 'resource= https://management.azure.com'`
110+
```
111+
GET https://management.azure.com/subscriptions/<subscriptionId>/resourcegroups/<resourceGroupName>/providers/microsoft.monitor/accounts/<workspace name>/api/v1/label/__name__/values?api-version=2021-06-01-preview
112+
--header 'Authorization: Bearer <access token>'
113+
```
114+
When using the management end point, request a token using `--data-urlencode 'resource= https://management.azure.com'`
115115

116116
### POST / query
117117

118118
POST uses the Azure Monitor workspace query endpoint
119119

120-
```http
121-
https://k8s-02-workspace-abcd.eastus.prometheus.monitor.azure.com/api/v1/query
120+
```http
121+
https://k8s-02-workspace-abcd.eastus.prometheus.monitor.azure.com/api/v1/query
122+
123+
--header 'Authorization: Bearer <access token>'
124+
--header 'Content-Type: application/x-www-form-urlencoded'
125+
--data-urlencode 'query=sum(
126+
container_memory_working_set_bytes
127+
* on(namespace,pod)
128+
group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{ workload_type="deployment"}) by (pod)'
122129
123-
--header 'Authorization: Bearer <access token>'
124-
--header 'Content-Type: application/x-www-form-urlencoded'
125-
--data-urlencode 'query=sum(
126-
container_memory_working_set_bytes
127-
* on(namespace,pod)
128-
group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{ workload_type="deployment"}) by (pod)'
130+
```
129131

130-
```
131-
When using the Azure Monitor workspace query endpoint, request a token using `--data-urlencode 'resource= https://prometheus.monitor.azure.com'`
132+
When using the Azure Monitor workspace query endpoint, request a token using `--data-urlencode 'resource= https://prometheus.monitor.azure.com'`
132133

133134
Find your workspace's query endpoint on the overview page.
134-
:::image type="content" source="./media/query-azure-monitor-workspaces/find-query-endpoint.png" lightbox='./media/query-azure-monitor-workspaces/find-query-endpoint.png" alt-text="A screenshot sowing the query endpoin on the Azure Monitor workspace overview page.":::
135+
:::image type="content" source="./media/query-azure-monitor-workspaces/find-query-endpoint.png" lightbox="./media/query-azure-monitor-workspaces/find-query-endpoint.png" alt-text="A screenshot sowing the query endpoin on the Azure Monitor workspace overview page.":::
135136
## Supported APIs
136137
The following queries are supported:
137138

@@ -169,7 +170,7 @@ For the full specification of OSS prom APIs, see [Prometheus HTTP API](https://p
169170
+ Experimental features
170171
The experimental features such as exemplars aren't supported.
171172

172-
For more information on Prometheus metrics limits, see [Prometheus metrics](https://learn.microsoft.com/en-us/azure/azure-monitor/service-limits#prometheus-metrics)
173+
For more information on Prometheus metrics limits, see [Prometheus metrics](../../azure-monitor/service-limits.md#prometheus-metrics)
173174

174175
>[!NOTE]
175-
> Some of the limits can be increased. Please contact [PromWebApi]([email protected]) to request an increase for these limits on your Azure Monitor workspace.
176+
> Some of the limits can be increased. Please contact [PromWebApi](mailto:[email protected]) to request an increase for these limits on your Azure Monitor workspace.

0 commit comments

Comments
 (0)