Skip to content

Commit e8b1b93

Browse files
author
Jill Grant
authored
Merge pull request #279952 from khelanmodi/origin/requestmetrics
Added Customer Metrics doc for CBD mongo vcore
2 parents 862d56c + 10af1d8 commit e8b1b93

File tree

6 files changed

+82
-3
lines changed

6 files changed

+82
-3
lines changed

articles/cosmos-db/mongodb/vcore/TOC.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,12 @@
9696
href: how-to-restore-cluster.md
9797
- name: Manage replication
9898
href: how-to-cluster-replica.md
99-
- name: Monitor diagnostics logs
100-
href: how-to-monitor-diagnostics-logs.md
99+
- name: Monitor
100+
items:
101+
- name: Monitor metrics
102+
href: monitor-metrics.md
103+
- name: Monitor diagnostics logs
104+
href: how-to-monitor-diagnostics-logs.md
101105
- name: Use Azure Private Link
102106
href: how-to-private-link.md
103107
- name: Reference

articles/cosmos-db/mongodb/vcore/index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ landingContent:
9393
- linkListType: sample
9494
links:
9595
- text: AI-Enhanced Advertisement Generation
96-
url: ai-advertisement-generation.md
96+
url: ai-advertisement-generation.md
59.1 KB
Loading
96.2 KB
Loading
47.3 KB
Loading
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
title: Monitor metrics in Azure Cosmos DB for MongoDB (vCore)
3+
description: Discover how to monitor memory or CPU usage for operations in Azure Cosmos DB. Account owners can identify resource-intensive operations.
4+
ms.service: cosmos-db
5+
ms.topic: how-to
6+
ms.author: khelanmodi
7+
author: KhelanModi
8+
ms.date: 07/02/2024
9+
---
10+
11+
# Explore Azure Monitor in vCore-based Azure Cosmos DB for MongoDB (vCore)
12+
[!INCLUDE[MongoDB vCore](~/reusable-content/ce-skilling/azure/includes/cosmos-db/includes/appliesto-mongodb-vcore.md)]
13+
14+
Azure Monitor for vCore-based Azure Cosmos DB for MongoDB provides a metrics view to monitor your account and create dashboards. The Azure Cosmos DB metrics are collected by default, however this feature is only accessible to M40 and above cluster tiers. The **CPU percent** metric is used to get the consumption for different types of operations. Later you can analyze which operations used most of the committed memory. By default, the consumption data is aggregated at five-minute interval. However, you can change the aggregation unit by changing the time granularity option.
15+
16+
## Introduction
17+
18+
Before you begin, you should understand how information is presented and visualized.
19+
20+
It delivers:
21+
22+
* **At-scale perspective** of your Azure Cosmos DB for MongoDB (vCore) resources across all your subscriptions in a single location. You can selectively scope to only the subscriptions and resources that you're interested in evaluating.
23+
* **Drill-down analysis** of a particular Azure Cosmos DB for MongoDB (vCore) resource. You can diagnose issues or perform detailed analysis by using the categories of utilization, failures, capacity, and operations. Selecting any one of the options provides an in-depth view of the relevant Azure Cosmos DB for MongoDB (vCore) metrics.
24+
* **Customizable** experience built on top of Azure Monitor workbook templates. You can change what metrics are displayed, modify or set thresholds that align with your limits, and then save into a custom workbook. Charts in the workbooks can then be pinned to Azure dashboards.
25+
26+
## Metrics available today
27+
### System Metrics (available on all cluster tiers)
28+
- **Committed memory percent**: Shows the percentage of the committed memory limit that is allocated by applications on a shard. This metric helps in monitoring the memory usage against the allocated limit.
29+
- **CPU percent**: Indicates the CPU utilization on a shard.
30+
- **High CPU Utilization**: If you notice a spike in CPU utilization on average, the best option to maximize performance is to increase the cluster tier. After increasing the tier, monitor the usage to see if it stabilizes.
31+
- **Low CPU Utilization**: Conversely, if the CPU utilization is consistently low, it is recommended to scale down to a lower cluster tier to save on cost.
32+
- **Memory percent**: Shows the memory utilization on a shard. For read-heavy workloads, consider using cluster tiers with more RAM to optimize performance and ensure smoother operations.
33+
- **Storage percent:** Displays the available storage percentage on a shard.
34+
- **Storage used**: Represents the actual amount of storage used on a shard. This metric is crucial for understanding the storage consumption trends and managing storage resources.
35+
- **Monitoring and Management**: If storage utilization increases above 80%, users should monitor this more closely. It is recommended to increase the SKU size of the disk to manage storage more effectively.
36+
- **Performance Optimization**: If write performance is not at the desired level, particularly when running at scale, increasing the disk size can enhance write performance.
37+
- **IOPS:** Measures the disk IO operations per second on a shard. It provides insights into the read and write performance of the storage system, helping to optimize disk usage.
38+
- **Write Heavy Workloads**: IOPS is particularly important for write-heavy workloads, especially when operating at scale. If write performance needs to be improved, it is recommended to upgrade the storage disk SKU size rather than increasing the cluster tier.
39+
40+
### Database metrics
41+
- **Mongo request duration**: Captures the end-to-end duration in milliseconds of client MongoDB requests handled by the Mongo cluster, updated every 60 seconds. This metric is vital for assessing the responsiveness and latency of the database operations.
42+
43+
>[!NOTE]
44+
>There's no charge to access Database metrics. However, you'll have to be on the M40 cluster tier or higher to access the metrics. For more information on upgrading, please refer to [this guide](./how-to-scale-cluster.md).
45+
46+
47+
## View metrics
48+
49+
1. Sign in to the [Azure portal](https://portal.azure.com).
50+
51+
2. Navigate to the existing Azure Cosmos DB for MongoDB vCore cluster page.
52+
53+
3. From the Azure Cosmos DB for MongoDB vCore cluster page, select the **Metrics** navigation menu option.
54+
55+
:::image type="content" source="./media/monitor/monitor-metrics-blade.png" alt-text="Screenshot of metrics blade in Azure Cosmos DB.":::
56+
57+
1. Next select the **Monogo request duration** metric from the list of available metrics. In this example, let's select **Mongo request duration** and **Avg** as the aggregation value. In addition to these details, you can also select the **Time range** and **Time granularity** of the metrics. At max, you can view metrics for the past 30 days. After you apply the filter, a chart is displayed based on your filter. You can see the average number of request units consumed per minute for the selected period.
58+
59+
:::image type="content" source="./media/monitor/monitor-metric-mongo-request-duration.png" alt-text="Screenshot of choosing a metric from the Azure portal." border="true":::
60+
61+
## Filters for database metrics
62+
63+
- You can also filter metrics and get the charts displayed by a specific **CollectionName**, **DatabaseName**, **Operation**, and **StatusCode**. The **Add filter** and **Apply splitting** options allows you to filter the usage and group the metrics.
64+
65+
- If you want to see the usage by collection, select **Apply splitting** and choose the collection name as a filter. You will see a chart like the following with a choice of collections within the dashboard. You can then select a specific collection name to view more details:
66+
67+
:::image type="content" source="./media/monitor/monitor-metrics-filtering.png" alt-text="Azure Cosmos DB memory request duration for all operations by the collection in Azure monitor" border="true":::
68+
69+
## Next steps
70+
71+
* Configure [metric alerts](../../../azure-monitor/alerts/alerts-metric.md) to set up automated alerting to aid in detecting issues.
72+
* [Migrate your data](./migration-options.md) to vCore-based Azure Cosmos DB for MongoDB
73+
74+
75+

0 commit comments

Comments
 (0)