Skip to content

Commit f4c70ab

Browse files
committed
first pass cosmos db
1 parent d4731fb commit f4c70ab

File tree

2 files changed

+277
-177
lines changed

2 files changed

+277
-177
lines changed

articles/cosmos-db/monitor-reference.md

Lines changed: 106 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,62 @@
11
---
2-
title: Monitoring Azure Cosmos DB data reference | Microsoft Docs
3-
description: Important reference material needed when you monitor logs and metrics in Azure Cosmos DB.
2+
title: Monitoring data reference for Azure Cosmos DB
3+
description: This article contains important reference material you need when you monitor Azure Cosmos DB.
4+
ms.date: 02/14/2024
5+
ms.custom: horz-monitor
6+
ms.topic: reference
47
ms.author: esarroyo
58
author: StefArroyo
69
ms.service: cosmos-db
7-
ms.topic: how-to
8-
ms.date: 04/14/2023
9-
ms.custom: subject-monitoring
1010
---
1111

12-
# Monitoring Azure Cosmos DB data reference
13-
14-
[!INCLUDE[NoSQL, MongoDB, Cassandra, Gremlin, Table](includes/appliesto-nosql-mongodb-cassandra-gremlin-table.md)]
15-
16-
This article provides a reference of log and metric data collected to analyze the performance and availability of Azure Cosmos DB. See the [Monitor Azure Cosmos DB](monitor.md) article for details on collecting and analyzing monitoring data for Azure Cosmos DB.
17-
18-
## Metrics
19-
20-
All the metrics corresponding to Azure Cosmos DB are stored in the namespace **Azure Cosmos DB standard metrics**. For a list of all Azure Monitor support metrics (including Azure Cosmos DB), see [Azure Monitor supported metrics](../azure-monitor/essentials/metrics-supported.md). This section lists all the automatically collected platform metrics collected for Azure Cosmos DB.
12+
<!--
13+
IMPORTANT
14+
To make this template easier to use, first:
15+
1. Search and replace Azure Cosmos DB with the official name of your service.
16+
2. Search and replace [TODO-replace-with-service-filename] with the service name to use in GitHub filenames.-->
17+
18+
<!-- VERSION 3.0 2024_01_01
19+
For background about this template, see https://review.learn.microsoft.com/en-us/help/contribute/contribute-monitoring?branch=main -->
20+
21+
<!-- Most services can use the following sections unchanged. All headings are required unless otherwise noted.
22+
The sections use #included text you don't have to maintain, which changes when Azure Monitor functionality changes. Add info into the designated service-specific places if necessary. Remove #includes or template content that aren't relevant to your service.
23+
At a minimum your service should have the following two articles:
24+
1. The primary monitoring article (based on the template monitor-service-template.md)
25+
- Title: "Monitor Azure Cosmos DB"
26+
- TOC title: "Monitor"
27+
- Filename: "monitor.md"
28+
2. A reference article that lists all the metrics and logs for your service (based on this template).
29+
- Title: "Azure Cosmos DB monitoring data reference"
30+
- TOC title: "Monitoring data reference"
31+
- Filename: "monitor-reference.md".
32+
-->
33+
34+
# Azure Cosmos DB monitoring data reference
35+
36+
<!-- Intro. Required. -->
37+
[!INCLUDE [horz-monitor-ref-intro](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-intro.md)]
38+
39+
See [Monitor Azure Cosmos DB](monitor.md) for details on the data you can collect for Azure Cosmos DB and how to use it.
40+
41+
<!-- ## Metrics. Required section. -->
42+
[!INCLUDE [horz-monitor-ref-metrics-intro](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-intro.md)]
43+
For a list of all Azure Monitor supported metrics, including Azure Cosmos DB, see [Azure Monitor supported metrics](/azure/azure-monitor/essentials/metrics-supported).
44+
45+
<!-- Repeat the following section for each resource type/namespace in your service. -->
46+
### Supported metrics for Microsoft.DocumentDB/DatabaseAccounts
47+
The following table lists the metrics available for the Microsoft.DocumentDB/DatabaseAccounts resource type.
48+
[!INCLUDE [horz-monitor-ref-metrics-tableheader](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-tableheader.md)]
49+
[Microsoft.DocumentDB/DatabaseAccounts](~/azure-reference-other-repo/azure-monitor-ref/supported-metrics/includes/microsoft-documentdb-databaseaccounts-metrics-include.md)]
50+
51+
### Supported metrics for Microsoft.DocumentDB/cassandraClusters
52+
The following table lists the metrics available for the Microsoft.DocumentDB/cassandraClusters resource type.
53+
[!INCLUDE [horz-monitor-ref-metrics-tableheader](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-tableheader.md)]
54+
[Microsoft.DocumentDB/cassandraClusters](~/azure-reference-other-repo/azure-monitor-ref/supported-metrics/includes/microsoft-documentdb-cassandraclusters-metrics-include.md)]
55+
56+
### Supported metrics for Microsoft.DocumentDB/mongoClusters
57+
The following table lists the metrics available for the Microsoft.DocumentDB/mongoClusters resource type.
58+
[!INCLUDE [horz-monitor-ref-metrics-tableheader](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-tableheader.md)]
59+
[Microsoft.DocumentDB/mongoClusters](~/azure-reference-other-repo/azure-monitor-ref/supported-metrics/includes/microsoft-documentdb-mongoclusters-metrics-include.md)]
2160

2261
### Request metrics
2362

@@ -69,11 +108,52 @@ All the metrics corresponding to Azure Cosmos DB are stored in the namespace **A
69108
| 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.|
70109
| 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.|
71110

72-
For more information, see a list of [all platform metrics supported in Azure Monitor](../azure-monitor/essentials/metrics-supported.md).
111+
<!-- ## Metric dimensions. Required section. -->
112+
[!INCLUDE [horz-monitor-ref-metrics-dimensions-intro](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-dimensions-intro.md)]
113+
<!-- Use one of the following includes, depending on whether you have metrics with dimensions.
114+
- 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]. -->
115+
[!INCLUDE [horz-monitor-ref-metrics-dimensions](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-dimensions.md)]
116+
**Microsoft.DocumentDB/DatabaseAccounts:** CollectionName, DatabaseName, OperationType, Region, StatusCode, ApiKind, ApiKindResourceType, APIType, ApplicationType, BuildType, CacheEntryType, CacheExercised, CacheHit, CapacityType, ChildResourceName, ClosureReason, CommandName, ConnectionMode, DiagnosticSettingsName, Error, ErrorCode, IsExternal, IsSharedThroughputOffer, IsThroughputRequest, KeyType, MetricType, NotStarted, OfferOwnerRid, PartitionKeyRangeId, PhysicalPartitionId, PriorityLevel, PublicAPIType, ReplicationInProgress, ResourceGroupName, ResourceName, Role, SourceRegion, TargetContainerName, TargetRegion
117+
118+
**Microsoft.DocumentDB/cassandraClusters:** cassandra_datacenter, cassandra_node, cache_name
119+
120+
**Microsoft.DocumentDB/mongoClusters:** ServerName
121+
122+
<!-- ## Resource logs. Required section. -->
123+
[!INCLUDE [horz-monitor-ref-resource-logs](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-resource-logs.md)]
73124

74-
## Resource logs
125+
<!-- Add at least one resource provider/resource type here. Repeat this section for each resource type/namespace in your service. Example: ### Supported resource logs for Microsoft.Storage/storageAccounts/blobServices -->
126+
### Supported resource logs for Microsoft.DocumentDB/DatabaseAccounts
127+
[!INCLUDE [Microsoft.DocumentDB/DatabaseAccounts](~/azure-reference-other-repo/azure-monitor-ref/supported-logs/includes/microsoft-documentdb-databaseaccounts-logs-include.md)]
75128

76-
The following table lists the properties of resource logs in Azure Cosmos DB. The resource logs are collected into Azure Monitor Logs or Azure Storage. In Azure Monitor, logs are collected in the **AzureDiagnostics** table under the resource provider** name of `MICROSOFT.DOCUMENTDB`.
129+
### Supported resource logs for Microsoft.DocumentDB/cassandraClusters
130+
[!INCLUDE [Microsoft.DocumentDB/cassandraClusters](~/azure-reference-other-repo/azure-monitor-ref/supported-logs/includes/microsoft-documentdb-cassandraclusters-logs-include.md)]
131+
132+
### Supported resource logs for Microsoft.DocumentDB/DatabaseAccounts
133+
[!INCLUDE [Microsoft.DocumentDB/mongoClusters](~/azure-reference-other-repo/azure-monitor-ref/supported-logs/includes/microsoft-documentdb-mongoclusters-logs-include.md)]
134+
135+
<!-- ## Azure Monitor Logs tables. Required section. -->
136+
[!INCLUDE [horz-monitor-ref-logs-tables](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-logs-tables.md)]
137+
138+
### Azure Cosmos DB
139+
Microsoft.DocumentDb/databaseAccounts
140+
141+
- [AzureActivity](/azure/azure-monitor/reference/tables/AzureActivity#columns)
142+
- [CDBDataPlaneRequests](/azure/azure-monitor/reference/tables/CDBDataPlaneRequests#columns)
143+
- [CDBPartitionKeyStatistics](/azure/azure-monitor/reference/tables/CDBPartitionKeyStatistics#columns)
144+
- [CDBPartitionKeyRUConsumption](/azure/azure-monitor/reference/tables/CDBPartitionKeyRUConsumption#columns)
145+
- [CDBQueryRuntimeStatistics](/azure/azure-monitor/reference/tables/CDBQueryRuntimeStatistics#columns)
146+
- [CDBMongoRequests](/azure/azure-monitor/reference/tables/CDBMongoRequests#columns)
147+
- [CDBCassandraRequests](/azure/azure-monitor/reference/tables/CDBCassandraRequests#columns)
148+
- [CDBGremlinRequests](/azure/azure-monitor/reference/tables/CDBGremlinRequests#columns)
149+
- [CDBControlPlaneRequests](/azure/azure-monitor/reference/tables/CDBControlPlaneRequests#columns)
150+
- [AzureMetrics](/azure/azure-monitor/reference/tables/AzureMetrics#columns)
151+
- [AzureDiagnostics](/azure/azure-monitor/reference/tables/AzureDiagnostics#columns)
152+
Logs are collected in the **AzureDiagnostics** table under the resource provider name of `MICROSOFT.DOCUMENTDB`.
153+
154+
## Azure CosmosDB resource logs properties
155+
156+
The following table lists the properties of resource logs in Azure Cosmos DB. The resource logs are collected into Azure Monitor Logs or Azure Storage.
77157

78158
| Azure Storage field or property | Azure Monitor Logs property | Description |
79159
| --- | --- | --- |
@@ -98,13 +178,15 @@ The following table lists the properties of resource logs in Azure Cosmos DB. Th
98178
| **resourceTokenUserRid** | **resourceTokenUserRid_s** | This value is non-empty when [resource tokens](./secure-access-to-data.md#resource-tokens) are used for authentication. The value points to the resource ID of the user. |
99179
| **responseLength** | **responseLength_s** | The length of the response, in bytes.|
100180

101-
For a list of all Azure Monitor log categories and links to associated schemas, see [Azure Monitor Logs categories and schemas](../azure-monitor/essentials/resource-logs-schema.md).
102-
103-
## Azure Monitor Logs tables
181+
<!-- ## Activity log. Required section. -->
182+
[!INCLUDE [horz-monitor-ref-activity-log](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-activity-log.md)]
183+
- [Microsoft.DocumentDB resource provider operations](/azure/role-based-access-control/resource-provider-operations#microsoftdocumentdb)
104184

105-
Azure Cosmos DB uses Kusto tables from Azure Monitor Logs. You can query these tables with Log analytics. For a list of Kusto tables Azure Cosmos DB uses, see the [Azure Monitor Logs table reference](/azure/azure-monitor/reference/tables/tables-resourcetype#azure-cosmos-db) article.
185+
<!-- ## Other schemas. Optional section. Please keep heading in this order. If your service uses other schemas, add the following include and information.
186+
[!INCLUDE [horz-monitor-ref-other-schemas](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-other-schemas.md)]
187+
List other schemas and their usage here. These can be resource logs, alerts, event hub formats, etc. depending on what you think is important. You can put JSON messages, API responses not listed in the REST API docs, and other similar types of info here. -->
106188

107-
## See Also
189+
## Related content
108190

109-
- See [Monitoring Azure Cosmos DB](monitor.md) for a description of monitoring Azure Cosmos DB.
110-
- See [Monitoring Azure resources with Azure Monitor](../azure-monitor/essentials/monitor-azure-resource.md) for details on monitoring Azure resources.
191+
- See [Monitor Azure Cosmos DB](monitor.md) for a description of monitoring Azure Cosmos DB.
192+
- See [Monitor Azure resources with Azure Monitor](/azure/azure-monitor/essentials/monitor-azure-resource) for details on monitoring Azure resources.

0 commit comments

Comments
 (0)