You are implementing Azure Monitor alerts and notifications for an Azure App Service web application. You need to configure a Log Search alert rule to detect failed dependency calls in Application Insights. When the alert fires, it must execute a custom workflow using an Azure Logic App. Which two configurations should you implement?
- Configure the alert rule to use an Action Group that includes a Logic App receiver.Answer
- Include a time-range filter in the KQL query, such as `where timestamp > ago(5m)`, to scope the Log Search alert rule.Answer
- COmit time range filters from the KQL query so the alert evaluation engine can dynamically query all historical tables.
- DInitialize the Application Insights telemetry SDK in your application code without specifying the connection string.
Answer
Configure the alert rule to use an Action Group that includes a Logic App receiver, and include a time-range filter in the KQL query, such as `where timestamp > ago(5m)`, to scope the Log Search alert rule.
To execute a custom workflow using an Azure Logic App when an alert is triggered, you must configure the alert rule with an Action Group that contains a Logic App receiver. Additionally, Log Search alert rules in Azure Monitor require a KQL query that includes a time-range filter (such as `where timestamp > ago(5m)`) to scope the query and prevent scanning the entire history of telemetry data, which ensures optimal performance and prevents execution limits from being exceeded.
Step-by-Step Solution
Key Concept
Azure Monitor Log Search Alerts and Action Group Receivers