title | description | ms.date | ms.custom | ms.topic | ms.author | author | ms.service |
---|---|---|---|---|---|---|---|
Monitoring data reference for Azure Cosmos DB |
This article contains important reference material you need when you monitor Azure Cosmos DB. |
03/02/2024 |
horz-monitor |
reference |
esarroyo |
StefArroyo |
cosmos-db |
[!INCLUDE horz-monitor-ref-intro]
See Monitor Azure Cosmos DB for details on the data you can collect for Azure Cosmos DB and how to use it.
[!INCLUDE horz-monitor-ref-metrics-intro] For a list of all Azure Monitor supported metrics, including Azure Cosmos DB, see Azure Monitor supported metrics.
The following table lists the metrics available for the Microsoft.DocumentDB/DatabaseAccounts resource type. [!INCLUDE horz-monitor-ref-metrics-tableheader] [!INCLUDE Microsoft.DocumentDB/DatabaseAccounts]
The following table lists the metrics available for the Microsoft.DocumentDB/cassandraClusters resource type. [!INCLUDE horz-monitor-ref-metrics-tableheader] [!INCLUDE Microsoft.DocumentDB/cassandraClusters]
The following table lists the metrics available for the Microsoft.DocumentDB/mongoClusters resource type. [!INCLUDE horz-monitor-ref-metrics-tableheader] [!INCLUDE Microsoft.DocumentDB/mongoClusters]
The following tables list Azure Cosmos DB metrics categorized by metric type.
- TotalRequests (Total Requests)
- MetadataRequests (Metadata Requests)
- MongoRequests (Mongo Requests)
- MongoRequestCharge (Mongo Request Charge)
- TotalRequestUnits (Total Request Units)
- ProvisionedThroughput (Provisioned Throughput)
- AutoscaleMaxThroughput (Autoscale Max Throughput)
- PhysicalPartitionThroughputInfo (Physical Partition Throughput Info)
- AvailableStorage (Available Storage)
- DataUsage (Data Usage)
- IndexUsage (Index Usage)
- DocumentQuota (Document Quota)
- DocumentCount (Document Count)
- PhysicalPartitionSizeInfo (Physical Partition Size Info)
- ReplicationLatency (Replication Latency)
- Server Side Latency
- ServiceAvailability (Service Availability)
- CassandraRequests (Cassandra Requests)
- CassandraRequestCharges (Cassandra Request Charges)
- CassandraConnectionClosures (Cassandra Connection Closures)
[!INCLUDE horz-monitor-ref-metrics-dimensions-intro] [!INCLUDE horz-monitor-ref-metrics-dimensions]
- ApiKindResourceType
- APIType
- ApplicationType
- BuildType
- CacheEntryType
- CacheExercised
- CacheHit
- CapacityType
- ChildResourceName
- ClosureReason
- CommandName
- ConnectionMode
- DiagnosticSettingsName
- Error
- ErrorCode
- IsExternal
- IsSharedThroughputOffer
- IsThroughputRequest
- KeyType
- MetricType
- NotStarted
- OfferOwnerRid
- PartitionKeyRangeId
- PhysicalPartitionId
- PhysicalPartitionId
- PriorityLevel
- PublicAPIType
- ReplicationInProgress
- ResourceGroupName
- ResourceName
- Role
- SourceRegion
- TargetContainerName
- TargetRegion
- cassandra_datacenter
- cassandra_node
- cache_name
- ServerName
[!INCLUDE horz-monitor-ref-resource-logs]
[!INCLUDE Microsoft.DocumentDB/DatabaseAccounts]
[!INCLUDE Microsoft.DocumentDB/cassandraClusters]
[!INCLUDE Microsoft.DocumentDB/mongoClusters]
[!INCLUDE horz-monitor-ref-logs-tables]
Microsoft.DocumentDb/databaseAccounts
- AzureActivity
- CDBDataPlaneRequests
- CDBPartitionKeyStatistics
- CDBPartitionKeyRUConsumption
- CDBQueryRuntimeStatistics
- CDBMongoRequests
- CDBCassandraRequests
- CDBGremlinRequests
- CDBControlPlaneRequests
- AzureMetrics
- AzureDiagnostics. Logs are collected in the AzureDiagnostics table under the resource provider name of
MICROSOFT.DOCUMENTDB
.
Microsoft.DocumentDB/cassandraClusters
Microsoft.DocumentDB/mongoClusters
The following table lists properties of resource logs in Azure Cosmos DB. The resource logs are collected into Azure Monitor Logs or Azure Storage.
Azure Storage field or property | Azure Monitor Logs property | Description |
---|---|---|
time | TimeGenerated | The date and time (UTC) when the operation occurred. |
resourceId | Resource | The Azure Cosmos DB account for which logs are enabled. |
category | Category | For Azure Cosmos DB, DataPlaneRequests, MongoRequests, QueryRuntimeStatistics, PartitionKeyStatistics, PartitionKeyRUConsumption, ControlPlaneRequests, CassandraRequests, GremlinRequests are the available log types. |
operationName | OperationName | Name of the operation. The operation name can be Create , Update , Read , ReadFeed , Delete , Replace , Execute , SqlQuery , Query , JSQuery , Head , HeadFeed , or Upsert . |
properties | n/a | The contents of this field are described in the rows that follow. |
activityId | activityId_g | The unique GUID for the logged operation. |
userAgent | userAgent_s | A string that specifies the client user agent from which, the request was sent. The format of user agent is {user agent name}/{version} . |
requestResourceType | requestResourceType_s | The type of the resource accessed. This value can be database, container, document, attachment, user, permission, stored procedure, trigger, user-defined function, or an offer. |
statusCode | statusCode_s | The response status of the operation. |
requestResourceId | ResourceId | The resourceId that pertains to the request. Depending on the operation performed, this value may point to databaseRid , collectionRid , or documentRid . |
clientIpAddress | clientIpAddress_s | The client's IP address. |
requestCharge | requestCharge_s | The number of RUs that are used by the operation |
collectionRid | collectionId_s | The unique ID for the collection. |
duration | duration_d | The duration of the operation, in milliseconds. |
requestLength | requestLength_s | The length of the request, in bytes. |
responseLength | responseLength_s | The length of the response, in bytes. |
resourceTokenPermissionId | resourceTokenPermissionId_s | This property indicates the resource token permission ID that you have specified. To learn more about permissions, see the Secure access to your data article. |
resourceTokenPermissionMode | resourceTokenPermissionMode_s | This property indicates the permission mode that you have set when creating the resource token. The permission mode can have values such as "all" or "read". To learn more about permissions, see the Secure access to your data article. |
resourceTokenUserRid | resourceTokenUserRid_s | This value is non-empty when resource tokens are used for authentication. The value points to the resource ID of the user. |
responseLength | responseLength_s | The length of the response, in bytes. |
[!INCLUDE horz-monitor-ref-activity-log]
- See Monitor Azure Cosmos DB for a description of monitoring Azure Cosmos DB.
- See Monitor Azure resources with Azure Monitor for details on monitoring Azure resources.