An organization hosts a critical Web API on an Azure App Service. You are tasked with implementing a monitoring and alerting strategy using Azure Monitor.
The API must trigger an alert whenever its average response time exceeds 500 milliseconds over a rolling 5-minute window. When the alert fires, it must notify the support team via email and automatically invoke an Azure Function app containing a custom diagnostics logging script. The solution must minimize administrative overhead and avoid hardcoded credentials or manual key rotation.
Which two configurations should you implement to meet these requirements? Select two.
- Create an Azure Monitor Metric Alert rule targeting the App Service resource, and configure the condition to evaluate the Response Time metric with an aggregation type of Average, operator set to Greater Than, and threshold set to 500 milliseconds over a 5-minute granularity.Answer
- Create an Azure Monitor Action Group containing an Email receiver and an Azure Function receiver, configuring the Azure Function receiver by directly selecting the subscription, the target Function App, and the HTTP-triggered function name.Answer
- CCreate an Azure Monitor Log Search Alert rule that runs a Kusto Query Language (KQL) query targeting HTTP logs where the HTTP status code is greater than 500, omitting any time-range filter from the KQL query.
- DCreate an Azure Monitor Action Group containing an Email receiver and a Webhook receiver, configuring the Webhook URL to retrieve the Function App host key dynamically using Azure Key Vault reference syntax.
Answer
Configure an Azure Monitor Metric Alert rule evaluating the App Service Response Time metric with an Average aggregation, and an Action Group using the native Azure Function receiver to target the HTTP-triggered function.
To monitor average response times, a Metric Alert rule must be configured targeting the App Service resource with the Response Time metric aggregated as an Average over the desired time window. To trigger a function securely without managing credentials or rotation, the Action Group should utilize the native Azure Function receiver, which automatically connects to the resource via Azure Resource Manager.
Step-by-Step Solution
Key Concept
Azure Monitor Alert Rules and Action Groups integration