Skip to content

Commit bb3f114

Browse files
Merge pull request #231827 from EdB-MSFT/api-promql-tweaks
small updates
2 parents 406f715 + 15a6aa7 commit bb3f114

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

articles/azure-monitor/essentials/prometheus-api-promql.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ To set up Azure Active Directory authentication, follow the steps below:
3838
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
### Allow your app access to your workspace
41-
Allow your app to query data from your Azure Monitor workspace.
41+
Assign the *Monitoring Data Reader* role your app so it can query data from your Azure Monitor workspace.
4242

4343
1. Open your Azure Monitor workspace in the Azure portal.
4444

@@ -78,7 +78,7 @@ curl -X POST 'https://login.microsoftonline.com/<tennant ID>/oauth2/token' \
7878
--data-urlencode 'grant_type=client_credentials' \
7979
--data-urlencode 'client_id=<your apps client ID>' \
8080
--data-urlencode 'client_secret=<your apps client secret' \
81-
--data-urlencode 'resource= https://prometheus.monitor.azure.com'
81+
--data-urlencode 'resource=https://prometheus.monitor.azure.com'
8282
```
8383

8484
Sample response body:
@@ -204,6 +204,8 @@ The following limitations are in addition to those detailed in the Prometheus sp
204204

205205
For more information on Prometheus metrics limits, see [Prometheus metrics](../../azure-monitor/service-limits.md#prometheus-metrics)
206206

207+
[!INCLUDE [prometheus-case-sensitivity.md](..//includes/prometheus-case-sensitivity.md)]
208+
207209
## Next steps
208210

209211
[Azure Monitor workspace overview (preview)](./azure-monitor-workspace-overview.md)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ See [Azure Monitor service limits](../service-limits.md#prometheus-metrics) for
4747
- Metrics addon doesn't work on AKS clusters configured with HTTP proxy.
4848
- Scraping and storing metrics at frequencies less than 1 second isn't supported.
4949

50-
50+
[!INCLUDE [prometheus-case-sensitivity.md](..//includes/prometheus-case-sensitivity.md)]
5151
## Prometheus references
5252
Following are links to Prometheus documentation.
5353

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
ms.service: azure-monitor
3+
ms.topic: include
4+
ms.date: 04/01/2023
5+
ms.author: edbaynash
6+
author: EdB-MSFT
7+
---
8+
9+
## Case sensitivity
10+
Azure managed Prometheus is a case insensitive system. If one time series differs from another only by a difference in the case of a string - metric name, label name, label value, etc. - it's treated as the same time series. This behavior is different from native open source Prometheus, which is a case sensitive system.
11+
12+
In Azure managed Prometheus the following time series are considered the same:
13+
14+
`diskSize(cluster="eastus", node="node1", filesystem="usr_mnt")`
15+
`diskSize(cluster="eastus", node="node1", filesystem="usr_MNT")`
16+
17+
The above examples are a single time series in a time series database.
18+
- Any samples ingested against them are stored as if they're scraped/ingested against a single time series.
19+
- If the examples above are ingested with the same timestamp, one of them is randomly dropped.
20+
- The casing that's stored in the time series database and returned in query, is unpredictable. Different casing may be returned at different times for the same time series.
21+
- Any metric name or label name/value matcher present in the query is retrieved from time series database by making a case-insensitive comparison. If there's a case sensitive matcher in a query, it's automatically treated as a case-insensitive matcher when making string comparisons.
22+
23+
It is best practice to ensure that a time series is produced or scraped using a single consistent case.
24+
25+
In OSS Prometheus, the above time series are treated as two different time series. Any samples scraped/ingested against them are stored separately.

0 commit comments

Comments
 (0)