You are developing a distributed application on Azure. The application components send telemetry to an Azure Application Insights instance. You need to configure an Azure Monitor Log Search Alert rule to monitor exception rates. The alert must trigger when the number of exceptions in a 15-minute window is greater than 50. When the alert triggers, it must execute a custom remediation API hosted on an Azure Function App. Which two of the following actions should you perform? (Choose two.)
- Create an Action Group containing an Azure Function receiver that is configured to invoke the HTTPS trigger of the remediation API.Answer
- Define the Log Search Alert rule condition using a KQL query that filters the exceptions using a time-relative clause, such as `where timestamp > ago(15m)`.Answer
- CConfigure the distributed application components to send telemetry to Application Insights by initializing the SDK using only the instrumentation key in the configuration file, leaving the connection string unconfigured.
- DConfigure the Action Group to authenticate to the remediation webhook by referencing an Azure Key Vault secret using the `@Microsoft.KeyVault` reference syntax, without granting GET permissions on the Key Vault secrets.
Answer
Create an Action Group containing an Azure Function receiver that is configured to invoke the HTTPS trigger of the remediation API, and define the Log Search Alert rule condition using a KQL query that filters the exceptions using a time-relative clause.
To invoke a custom remediation API hosted on an Azure Function App when a Log Search Alert triggers, you must create an Action Group that includes an Azure Function receiver pointing to the function's HTTP trigger. Additionally, the Log Search Alert rule's KQL query must evaluate exceptions over the target time window. Including an explicit time-relative filter in the KQL query, such as filtering for timestamps within the last 15 minutes, ensures the query executes efficiently and limits the scanned data.
Step-by-Step Solution
Key Concept
Log Search Alert rules rely on optimized KQL queries and use Action Groups with receivers like Azure Functions to execute automated remediation logic.