Question

Difficulty: MediumImplement Azure Monitor Alerts and Action Groups

You are configuring a monitoring solution for an Azure Cosmos DB API for NoSQL account. You need to configure an Azure Monitor alert rule that triggers when client applications receive HTTP status code 429 (Request Rate Too Large) responses. When triggered, the alert must email the operations team and execute an Azure Automation runbook. Which of the following configurations should you implement?

  1. A
    Create a log search alert rule that runs a KQL query against the AzureDiagnostics table to count requests where the Status_s column equals '429', but omit any time-range filter (such as TimeGenerated > ago(5m)) from the query text, relying entirely on the alert rule's query frequency setting.
  2. B
    Configure the Application Insights SDK in the client application code to track dependency failures with status code 429, set up a metric alert in Application Insights, and do not define the Application Insights connection string in the application settings.
  3. Create a metric alert rule for the Cosmos DB resource targeting the 'Total Requests' metric, add a dimension filter where 'StatusCode' equals '429', and associate the rule with an action group containing Email and Automation Runbook actions.Answer
  4. D
    Configure an autoscale rule for the Cosmos DB account that monitors the throughput metric, sets a scale-out threshold to trigger the Automation runbook, and defines a scale-in threshold that is higher than the scale-out threshold.

Answer

Create a metric alert rule for the Cosmos DB resource targeting the 'Total Requests' metric, add a dimension filter where 'StatusCode' equals '429', and associate the rule with an action group containing Email and Automation Runbook actions.
The correct configuration is to create a metric alert rule targeting the 'Total Requests' metric on the Azure Cosmos DB resource, filter it using the 'StatusCode' dimension set to '429', and trigger an action group containing both Email and Automation Runbook actions. This utilizes native Azure Monitor capabilities to detect rate limiting and execute both notification and remediation steps efficiently.

Step-by-Step Solution

1
Identify the signal type and resource metric to monitor.
Select the 'Total Requests' metric for the Azure Cosmos DB resource.
This metric provides real-time transaction telemetry including response status codes.
2
Configure the alert logic using dimensions.
Add a dimension filter for 'StatusCode' with the value '429'.
This isolates rate-limiting events (Request Rate Too Large) from successful or other error requests.
3
Create and associate an Action Group.
Define an Action Group with an Email receiver for the operations team and an Automation Runbook receiver to scale the throughput.
Action groups allow multi-receiver routing to perform notifications and automated remediation simultaneously.

Key Concept

Azure Monitor Metric Alerts with dimension filters and Action Groups with multiple receivers
Rate this question