Microsoft Certified: Azure Developer Associate (AZ-204)Monitor, troubleshoot, and optimize Azure solutionsMedium

A developer is building a high-traffic web application that uses Azure Cosmos DB as its backend. To optimize costs and ensure consistent performance, the developer needs to monitor the Request Units per second (RU/s) consumption and provisioned throughput of the Cosmos DB account. They want to set up an alert that triggers if the consumed RU/s consistently exceeds 80% of the provisioned throughput for more than 5 minutes. Which Azure Monitor feature should be used to configure this alert?

  1. AAzure Advisor recommendations
  2. BLog Analytics Workspaces queries
  3. CActivity Log alerts
  4. DMetric alerts
Show answer & explanation

Correct answer: D. Metric alerts

Metric alerts in Azure Monitor are designed to monitor numerical data, such as Cosmos DB's consumed RU/s and provisioned throughput. You can create a metric alert rule that compares the 'Total Request Units' metric against a threshold derived from 'Provisioned Throughput' over a specified time window (e.g., 5 minutes).

Why the other options are wrong

  • A. Azure Advisor provides proactive recommendations for cost, performance, reliability, etc., but it is not for real-time monitoring and alerting based on specific metric thresholds.
  • B. Log Analytics Workspaces are for collecting and querying logs. While you *could* query logs for RU/s data, creating real-time alerts based on aggregated metric thresholds is the primary function of Metric alerts, not Log Analytics directly.
  • C. Activity Log alerts trigger on events in the Azure Activity Log (e.g., resource creation, deletion), not on performance metrics like RU/s consumption.

Azure Monitor Metric Alerts

An Azure Monitor feature that triggers notifications or actions when a specific numerical metric crosses a predefined threshold over a specified period.

  • Monitors various Azure service metrics.
  • Can be configured with dynamic thresholds.
  • Supports multiple action groups for notifications.

Memory trick: For numbers that cross a line, metric alerts are truly divine.

More Monitor, troubleshoot, and optimize Azure solutions questions