Question

Difficulty: MediumImplement Azure Monitor Alerts and Action Groups

You are developing an Azure Function App that processes business orders. You configure the Function App to send telemetry to Application Insights. You must implement a monitoring solution using Azure Monitor to meet the following requirements:
- Automatically notify the operations team via email if any function execution takes longer than 10 seconds to complete.
- Execute a custom Azure Function to log details of the slow execution to an external auditing database.
- Optimize the alert query performance and minimize data scan costs.

Which two actions should you perform? (Choose two.)

  1. Create a log search alert rule with a query that filters the requests table using: `requests | where timestamp > ago(5m) and duration > 10000`Answer
  2. Create an action group containing an Email receiver to notify the operations team and an Azure Function receiver to invoke the logging functionAnswer
  3. C
    Create a log search alert rule with a query that filters the requests table using: `requests | where duration > 10000`
  4. D
    Configure the alert rule target scope using only the Application Insights instrumentation key string instead of the resource ID of the workspace or App Service

Answer

To meet the requirements, you must create a log search alert rule with a time-filtered KQL query (`requests | where timestamp > ago(5m) and duration > 10000`) and configure an action group that contains an Email receiver and an Azure Function receiver.
The correct actions involve configuring a Log Search alert rule that queries the `requests` table with a restricted time range (`timestamp > ago(5m)`) to maintain high performance and low costs, while detecting request durations greater than 10 seconds (`duration > 10000`). Additionally, you must configure an action group containing both an Email receiver to alert the operations team and an Azure Function receiver to execute the custom logging database logic.

Step-by-Step Solution

1
Write a KQL query to find requests exceeding 10 seconds with a time-range boundary.
`requests | where timestamp > ago(5m) and duration > 10000`
Using a time-range filter like `timestamp > ago(5m)` is required to limit data scanning, optimizing query execution speed and minimizing Azure Monitor costs.
2
Create an Azure Monitor Action Group with the appropriate notification and action receivers.
An Action Group featuring an Email receiver and an Azure Function receiver.
Action groups allow bundling different response mechanisms, satisfying the email notification and the automated custom function logging requirements simultaneously.

Key Concept

Implementing Log Search Alerts with KQL and configuring Action Groups with diverse receivers (Email and Azure Functions) in Azure Monitor.
Rate this question