Skip to content

Commit ac04ed1

Browse files
committed
review changes
1 parent 7107c21 commit ac04ed1

File tree

2 files changed

+98
-79
lines changed

2 files changed

+98
-79
lines changed

articles/cosmos-db/monitor-reference.md

Lines changed: 68 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Monitoring data reference for Azure Cosmos DB
33
description: This article contains important reference material you need when you monitor Azure Cosmos DB.
4-
ms.date: 02/14/2024
4+
ms.date: 02/24/2024
55
ms.custom: horz-monitor
66
ms.topic: reference
77
ms.author: esarroyo
@@ -64,100 +64,94 @@ The following tables list Azure Cosmos DB metrics categorized by metric type.
6464

6565
#### Request metrics
6666

67-
|Metric (Metric Display Name)|Unit (Aggregation Type) |Description|Dimensions| Time granularities| Legacy metric mapping | Usage |
68-
|---|---|---|---| ---| ---| ---|
69-
| TotalRequests (Total Requests) | Count (Count) | Number of requests made| DatabaseName, CollectionName, Region, StatusCode| All | TotalRequests, Http 2xx, Http 3xx, Http 400, Http 401, Internal Server error, Service Unavailable, Throttled Requests, Average Requests per Second | Used to monitor requests per status code, container at a minute granularity. To get average requests per second, use Count aggregation at minute and divide by 60. |
70-
| MetadataRequests (Metadata Requests) |Count (Count) | Count of Azure Resource Manager metadata requests. Metadata has request limits. See [Control Plane Limits](concepts-limits.md#control-plane) for more information. | DatabaseName, CollectionName, Region, StatusCode| All | | Used to monitor metadata requests in scenarios where requests are being throttled. See [Monitor Control Plane Requests](use-metrics.md#monitor-control-plane-requests) for more information. |
71-
| MongoRequests (Mongo Requests) | Count (Count) | Number of Mongo Requests Made | DatabaseName, CollectionName, Region, CommandName, ErrorCode| All |Mongo Query Request Rate, Mongo Update Request Rate, Mongo Delete Request Rate, Mongo Insert Request Rate, Mongo Count Request Rate| Used to monitor Mongo request errors, usages per command type. |
67+
- TotalRequests (Total Requests)
68+
- MetadataRequests (Metadata Requests)
69+
- MongoRequests (Mongo Requests)
7270

7371
#### Request Unit metrics
7472

75-
|Metric (Metric Display Name)|Unit (Aggregation Type)|Description|Dimensions| Time granularities| Legacy metric mapping | Usage |
76-
|---|---|---|---| ---| ---| ---|
77-
| MongoRequestCharge (Mongo Request Charge) | Count (Total) |Mongo Request Units Consumed| DatabaseName, CollectionName, Region, CommandName, ErrorCode| All |Mongo Query Request Charge, Mongo Update Request Charge, Mongo Delete Request Charge, Mongo Insert Request Charge, Mongo Count Request Charge| Used to monitor Mongo resource RUs in a minute.|
78-
| TotalRequestUnits (Total Request Units)| Count (Total) | Request Units consumed| DatabaseName, CollectionName, Region, StatusCode |All| TotalRequestUnits| Used to monitor Total RU usage at a minute granularity. To get average RU consumed per second, use Sum aggregation at minute interval/level and divide by 60.|
79-
| ProvisionedThroughput (Provisioned Throughput)| Count (Maximum) |Provisioned throughput at container granularity| DatabaseName, ContainerName| 5M| | Used to monitor provisioned throughput per container.|
80-
| AutoscaleMaxThroughput (Autoscale Max Throughput)| Count (Maximum) |Autoscale max throughput at container granularity| DatabaseName, ContainerName| 5M| | Used to monitor autoscale max throughput per container.|
81-
| PhysicalPartitionThroughputInfo (Physical Partition Throughput Info)| Count (Maximum) |Provisioned throughput at physical partition granularity| DatabaseName, ContainerName, PhysicalPartitionId, Region| 5M| | Used to monitor provisioned throughput per physical partition. If resource is autoscale, represents autoscale max RU/s per physical partition. To see provisioned throughput for all physical partitions, split by dimension Physical Partition Id.|
73+
- MongoRequestCharge (Mongo Request Charge)
74+
- TotalRequestUnits (Total Request Units)
75+
- ProvisionedThroughput (Provisioned Throughput)
76+
- AutoscaleMaxThroughput (Autoscale Max Throughput)
77+
- PhysicalPartitionThroughputInfo (Physical Partition Throughput Info)
8278

8379
#### Storage metrics
8480

85-
|Metric (Metric Display Name)|Unit (Aggregation Type)|Description|Dimensions| Time granularities| Legacy metric mapping | Usage |
86-
|---|---|---|---| ---| ---| ---|
87-
| AvailableStorage (Available Storage) |Bytes (Total) | Total available storage reported at 5-minutes granularity per region| DatabaseName, CollectionName, Region| 5M| Available Storage| Used to monitor available storage capacity (applicable only for fixed storage collections) Minimum granularity should be 5 minutes.|
88-
| DataUsage (Data Usage) |Bytes (Total) |Total data usage reported at 5-minutes granularity per region| DatabaseName, CollectionName, Region| 5M |Data size | Used to monitor total data usage at container and region, minimum granularity should be 5 minutes.|
89-
| IndexUsage (Index Usage) | Bytes (Total) |Total Index usage reported at 5-minutes granularity per region| DatabaseName, CollectionName, Region| 5M| Index Size| Used to monitor total data usage at container and region, minimum granularity should be 5 minutes. |
90-
| DocumentQuota (Document Quota) | Bytes (Total) | Total storage quota reported at 5-minutes granularity per region.| DatabaseName, CollectionName, Region| 5M |Storage Capacity| Used to monitor total quota at container and region, minimum granularity should be 5 minutes.|
91-
| DocumentCount (Document Count) | Count (Total) |Total document count reported at 5-minutes granularity per region| DatabaseName, CollectionName, Region| 5M |Document Count|Used to monitor document count at container and region, minimum granularity should be 5 minutes.|
92-
| PhysicalPartitionSizeInfo (Physical Partition Size Info) | Count (Maximum) | Storage at physical partition granularity| DatabaseName, ContainerName, PhysicalPartitionId, Region| 5M | |Used to monitor physical partition size (bytes) at physical partition granularity. To see storage for all physical partitions, split by dimension Physical Partition Id.|
81+
- AvailableStorage (Available Storage)
82+
- DataUsage (Data Usage)
83+
- IndexUsage (Index Usage)
84+
- DocumentQuota (Document Quota)
85+
- DocumentCount (Document Count)
86+
- PhysicalPartitionSizeInfo (Physical Partition Size Info)
9387

9488
#### Latency metrics
9589

96-
|Metric (Metric Display Name)|Unit (Aggregation Type)|Description|Dimensions| Time granularities| Usage |
97-
|---|---|---|---| ---| ---|
98-
| ReplicationLatency (Replication Latency)| MilliSeconds (Minimum, Maximum, Average) | P99 Replication Latency across source and target regions for geo-enabled account| SourceRegion, TargetRegion| All | Used to monitor P99 replication latency between any two regions for a geo-replicated account. |
99-
| Server Side Latency| MilliSeconds (Average) | Time taken by the server to process the request. | CollectionName, ConnectionMode, DatabaseName, OperationType, PublicAPIType, Region | All | Used to monitor the request latency on the Azure Cosmos DB server. |
90+
- ReplicationLatency (Replication Latency)
91+
- Server Side Latency
10092

10193
#### Availability metrics
10294

103-
|Metric (Metric Display Name) |Unit (Aggregation Type)|Description| Time granularities| Legacy metric mapping | Usage |
104-
|---|---|---|---| ---| ---|
105-
| ServiceAvailability (Service Availability)| Percent (Minimum, Maximum) | Account requests availability at one hour granularity| 1H | Service Availability | Represents the percent of total passed requests. A request is considered to be failed due to system error if the status code is 410, 500 or 503 Used to monitor availability of the account at hour granularity. |
95+
- ServiceAvailability (Service Availability)
10696

10797
#### API for Cassandra metrics
10898

109-
|Metric (Metric Display Name)|Unit (Aggregation Type)|Description|Dimensions| Time granularities| Usage |
110-
|---|---|---|---| ---| ---|
111-
| CassandraRequests (Cassandra Requests) | Count (Count) | Number of API for Cassandra requests made| DatabaseName, CollectionName, ErrorCode, Region, OperationType, ResourceType| All| Used to monitor Cassandra requests at a minute granularity. To get average requests per second, use Count aggregation at minute and divide by 60.|
112-
| CassandraRequestCharges (Cassandra Request Charges) | Count (Sum, Min, Max, Avg) | Request units consumed by the API for Cassandra | DatabaseName, CollectionName, Region, OperationType, ResourceType| All| Used to monitor RUs used per minute by a API for Cassandra account.|
113-
| CassandraConnectionClosures (Cassandra Connection Closures) |Count (Count) |Number of Cassandra Connections closed| ClosureReason, Region| All | Used to monitor the connectivity between clients and the Azure Cosmos DB API for Cassandra.|
99+
- CassandraRequests (Cassandra Requests)
100+
- CassandraRequestCharges (Cassandra Request Charges)
101+
- CassandraConnectionClosures (Cassandra Connection Closures)
114102

115103
<!-- ## Metric dimensions. Required section. -->
116104
[!INCLUDE [horz-monitor-ref-metrics-dimensions-intro](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-dimensions-intro.md)]
117105
<!-- Use one of the following includes, depending on whether you have metrics with dimensions.
118106
- If you have metrics with dimensions, use the following include and list the metrics with dimensions after the include. For an example, see https://learn.microsoft.com/azure/storage/common/monitor-storage-reference#metrics-dimensions. Questions: email [email protected]. -->
119107
[!INCLUDE [horz-monitor-ref-metrics-dimensions](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-dimensions.md)]
120-
|Namespace|Dimension|
121-
|---------|---------|
122-
|Microsoft.DocumentDB/DatabaseAccounts|ApiKind|
123-
|Microsoft.DocumentDB/DatabaseAccounts|ApiKindResourceType|
124-
|Microsoft.DocumentDB/DatabaseAccounts|APIType|
125-
|Microsoft.DocumentDB/DatabaseAccounts|ApplicationType|
126-
|Microsoft.DocumentDB/DatabaseAccounts|BuildType|
127-
|Microsoft.DocumentDB/DatabaseAccounts|CacheEntryType|
128-
|Microsoft.DocumentDB/DatabaseAccounts|CacheExercised|
129-
|Microsoft.DocumentDB/DatabaseAccounts|CacheHit|
130-
|Microsoft.DocumentDB/DatabaseAccounts|CapacityType|
131-
|Microsoft.DocumentDB/DatabaseAccounts|ChildResourceName|
132-
|Microsoft.DocumentDB/DatabaseAccounts|ClosureReason|
133-
|Microsoft.DocumentDB/DatabaseAccounts|CommandName|
134-
|Microsoft.DocumentDB/DatabaseAccounts|ConnectionMode|
135-
|Microsoft.DocumentDB/DatabaseAccounts|DiagnosticSettingsName|
136-
|Microsoft.DocumentDB/DatabaseAccounts|Error|
137-
|Microsoft.DocumentDB/DatabaseAccounts|ErrorCode|
138-
|Microsoft.DocumentDB/DatabaseAccounts|IsExternal|
139-
|Microsoft.DocumentDB/DatabaseAccounts|IsSharedThroughputOffer|
140-
|Microsoft.DocumentDB/DatabaseAccounts|IsThroughputRequest|
141-
|Microsoft.DocumentDB/DatabaseAccounts|KeyType|
142-
|Microsoft.DocumentDB/DatabaseAccounts|MetricType|
143-
|Microsoft.DocumentDB/DatabaseAccounts|NotStarted|
144-
|Microsoft.DocumentDB/DatabaseAccounts|OfferOwnerRid|
145-
|Microsoft.DocumentDB/DatabaseAccounts|PartitionKeyRangeId|
146-
|Microsoft.DocumentDB/DatabaseAccounts|PhysicalPartitionId|
147-
|Microsoft.DocumentDB/DatabaseAccounts|PhysicalPartitionId|
148-
|Microsoft.DocumentDB/DatabaseAccounts|PriorityLevel|
149-
|Microsoft.DocumentDB/DatabaseAccounts|PublicAPIType|
150-
|Microsoft.DocumentDB/DatabaseAccounts|ReplicationInProgress|
151-
|Microsoft.DocumentDB/DatabaseAccounts|ResourceGroupName|
152-
|Microsoft.DocumentDB/DatabaseAccounts|ResourceName|
153-
|Microsoft.DocumentDB/DatabaseAccounts|Role|
154-
|Microsoft.DocumentDB/DatabaseAccounts|SourceRegion|
155-
|Microsoft.DocumentDB/DatabaseAccounts|TargetContainerName|
156-
|Microsoft.DocumentDB/DatabaseAccounts|TargetRegion|
157-
|Microsoft.DocumentDB/cassandraClusters|cassandra_datacenter|
158-
|Microsoft.DocumentDB/cassandraClusters|cassandra_node|
159-
|Microsoft.DocumentDB/cassandraClusters|cache_name|
160-
|Microsoft.DocumentDB/mongoClusters|ServerName|
108+
109+
### Microsoft.DocumentDB/DatabaseAccounts
110+
111+
- ApiKindResourceType
112+
- APIType
113+
- ApplicationType
114+
- BuildType
115+
- CacheEntryType
116+
- CacheExercised
117+
- CacheHit
118+
- CapacityType
119+
- ChildResourceName
120+
- ClosureReason
121+
- CommandName
122+
- ConnectionMode
123+
- DiagnosticSettingsName
124+
- Error
125+
- ErrorCode
126+
- IsExternal
127+
- IsSharedThroughputOffer
128+
- IsThroughputRequest
129+
- KeyType
130+
- MetricType
131+
- NotStarted
132+
- OfferOwnerRid
133+
- PartitionKeyRangeId
134+
- PhysicalPartitionId
135+
- PhysicalPartitionId
136+
- PriorityLevel
137+
- PublicAPIType
138+
- ReplicationInProgress
139+
- ResourceGroupName
140+
- ResourceName
141+
- Role
142+
- SourceRegion
143+
- TargetContainerName
144+
- TargetRegion
145+
146+
### Microsoft.DocumentDB/cassandraClusters
147+
148+
- cassandra_datacenter
149+
- cassandra_node
150+
- cache_name
151+
152+
### Microsoft.DocumentDB/mongoClusters
153+
154+
- ServerName
161155

162156
<!-- ## Resource logs. Required section. -->
163157
[!INCLUDE [horz-monitor-ref-resource-logs](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-resource-logs.md)]

articles/cosmos-db/monitor.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Monitor Azure Cosmos DB
33
description: Start here to learn how to monitor Azure Cosmos DB.
4-
ms.date: 02/14/2024
4+
ms.date: 02/24/2024
55
ms.custom: horz-monitor
66
ms.topic: conceptual
77
ms.author: esarroyo
@@ -35,11 +35,19 @@ At a minimum your service should have the following two articles:
3535
<!-- Intro. Required. -->
3636
[!INCLUDE [horz-monitor-intro](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-intro.md)]
3737

38-
> [!NOTE]
39-
> Some parts of the Azure platform aren't case sensitive. This situation can result in confusion or collision of telemetry and actions on containers with such names.
38+
In the Azure portal, you can monitor Azure Cosmos DB from your Azure Cosmos DB account page or the Azure Monitor page.
4039

41-
<!-- ## Insights. Optional section. If your service has insights, add the following include and information. -->
40+
- **Azure Cosmos DB account page:** The **Overview** page for your Azure Cosmos DB account shows a brief view of the resource usage, such as total requests, requests that resulted in a specific HTTP status code, and hourly billing. Use the **Monitoring** section in the left menu of the page to access detailed **Insights**, **Alerts**, **Metrics**, **Logs**, and **Workbooks** for your account.
41+
42+
- **Azure Monitor:** You can also monitor metrics and logs and create dashboards for your Azure Cosmos DB account by using Azure Monitor in the Azure portal. Monitor collects most Azure Cosmos DB metrics by default. You can use Monitor to collect diagnostic logs and activity logs, capture event and trace data as logs, and analyze these logs by running queries on the gathered data.
43+
44+
Azure Cosmos DB monitoring includes server-side and client-side data. Server-side metrics include throughput, storage, availability, latency, consistency, and system level metrics. Client-side metrics include request charge, activity ID, exception and stack trace information, HTTP status and substatus code, and diagnostic string.
4245

46+
The following image shows available options to monitor your Azure Cosmos DB server-side metrics, client-side metrics, and logs through the Azure portal. You can also monitor Azure Cosmos DB programmatically by using the .NET, Java, Python, or Node.js SDKs, and the headers in REST API.
47+
48+
:::image type="content" source="media/monitor/monitoring-options-portal.png" alt-text="Diagram shows monitoring options available in Azure portal." border="false":::
49+
50+
<!-- ## Insights. Optional section. If your service has insights, add the following include and information. -->
4351
[!INCLUDE [horz-monitor-insights](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-insights.md)]
4452

4553
Azure Cosmos DB insights is a feature based on the [workbooks feature of Azure Monitor](/azure/azure-monitor/visualize/workbooks-overview). Use Azure Cosmos DB insights for a view of the overall performance, failures, capacity, and operational health of all your Azure Cosmos DB resources in a unified interactive experience.
@@ -65,6 +73,19 @@ For more information about the resource types for Azure Cosmos DB, see [Azure Co
6573
[!INCLUDE [horz-monitor-platform-metrics](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-platform-metrics.md)]
6674
For a list of available metrics for Azure Cosmos DB, see [Azure Cosmos DB monitoring data reference](monitor-reference.md#metrics).
6775

76+
### Azure Cosmos DB metrics
77+
78+
In Azure Cosmos DB, you can monitor your client-side and server-side metrics data by selecting **Metrics** on your Azure Cosmos DB portal page navigation. Server-side metrics include throughput, storage, availability, latency, consistency, and system level metrics. By default, these metrics have a retention period of seven days.
79+
80+
Azure Monitor also collects the Azure Cosmos DB metrics by default. Most of the metrics that are available from the Azure Cosmos DB portal page are also available in these metrics. You don't need to explicitly configure anything. The metrics are collected with one-minute granularity. The granularity might vary based on the metric you choose. By default, these metrics have a retention period of 30 days.
81+
82+
The dimension values for the metrics, such as container name, are case insensitive. Use case insensitive comparison when doing string comparisons on these dimension values.
83+
84+
> [!NOTE]
85+
> Some parts of the Azure platform aren't case sensitive. This situation can result in confusion or collision of telemetry and actions on containers with such names.
86+
87+
On the client side, you can collect the details for request charge, activity ID, exception and stack trace information, HTTP status and substatus code, and diagnostic string. You can use this data to debug issues or if you need to contact the Azure Cosmos DB support team.
88+
6889
<!-- Platform metrics service-specific information. Add service-specific information about your platform metrics here.-->
6990

7091
<!-- ## Prometheus/container metrics. Optional. If your service uses containers/Prometheus metrics, add the following include and information.
@@ -93,6 +114,10 @@ Custom imported service-specific information. Add service-specific information a
93114
- If your service collects resource logs, add the following include, statement, and service-specific information as appropriate. -->
94115
[!INCLUDE [horz-monitor-resource-logs](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-resource-logs.md)]
95116
For the available resource log categories, their associated Log Analytics tables, and the logs schemas for Azure Cosmos DB, see [Azure Cosmos DB monitoring data reference](monitor-reference.md#resource-logs).
117+
118+
### Azure Cosmos DB logs
119+
120+
You can monitor diagnostic logs from your Azure Cosmos DB account and create dashboards from Azure Monitor. Data such as events and traces that occur at a second granularity are stored as logs. For example, if the throughput of a container changes, the properties of an Azure Cosmos DB account change. The logs capture these events. You can analyze these logs by running queries on the gathered data.
96121
<!-- Resource logs service-specific information. Add service-specific information about your resource logs here.
97122
NOTE: Azure Monitor already has general information on how to configure and route resource logs. See https://learn.microsoft.com/azure/azure-monitor/platform/diagnostic-settings. Ideally, don't repeat that information here. You can provide a single screenshot of the diagnostic settings portal experience if you want. -->
98123

@@ -121,7 +146,7 @@ If your service has other logs that aren't resource logs or in the activity log,
121146
<a name="view-operation-level-metrics-for-azure-cosmos-db"></a>
122147
### Analyze Azure Cosmos DB metrics
123148

124-
You can use Azure Monitor Metrics Explorer to analyze metrics for Azure Cosmos DB with metrics from other Azure services by opening **Metrics** from the **Azure Monitor** menu. For more information about how to use metrics explorer, see [Analyze metrics with Azure Monitor metrics explorer](/azure/azure-monitor/essentials/analyze-metrics).
149+
You can use Azure Monitor Metrics Explorer to analyze metrics for Azure Cosmos DB with metrics from other Azure services by selecting **Metrics** under **Monitoring** in your Azure Cosmos DB account portal navigation. For more information about how to use metrics explorer, see [Analyze metrics with Azure Monitor metrics explorer](/azure/azure-monitor/essentials/analyze-metrics).
125150

126151
You can monitor server-side latency, request unit usage, and normalized request unit usage for your Azure Cosmos DB resources. You can select metrics specific to request units, storage, latency, availability, Cassandra, and others.
127152

0 commit comments

Comments
 (0)