You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何为Logic App Standard工作流配置失败告警?

Hey there, I've dealt with this exact scenario before—Logic App Standard doesn't have that handy RunsFailed out-of-the-box metric like Consumption plans do, but you don't need to write custom logs to set up failure alerts. The key is leveraging the built-in telemetry that's automatically sent to your Log Analytics Workspace if you've configured it correctly. Here's how to set this up properly:

Option 1: Alert on Failed Workflow Runs (Broad Scope)

First, make sure your Logic App Standard instance is linked to a Log Analytics Workspace:

  • Go to your Logic App > Monitoring > Diagnostic settings
  • Create a new setting, select your Log Analytics Workspace, and check the WorkflowRuntimeLogs category (this captures all workflow run and activity events)

Once that's set up, create the alert rule:

  1. Navigate to Azure Monitor > Alerts > Create > Alert rule
  2. Under Resource, select your Log Analytics Workspace
  3. For Condition, choose "Custom log search" as the signal type, then paste this Kusto query to filter failed runs:
    WorkflowRuntimeLogs
    | where OperationName == "WorkflowRunCompleted"
    | where Status == "Failed"
    | project TimeGenerated, WorkflowName, RunId, Status
    
  4. Set your alert threshold (e.g., "Number of results greater than 0") and evaluation frequency (e.g., check every 5 minutes, look back 5 minutes)
  5. Configure your Action Group to send notifications (email, Teams, SMS) or trigger automated actions
  6. Finish by naming your alert rule and adding a description for context

Option 2: Alert on Specific Failed Activities (Granular Control)

If you need to target failures in individual activities rather than entire runs, adjust the Kusto query to focus on activity-level events:

WorkflowRuntimeLogs
| where OperationName == "ActivityCompleted"
| where Status == "Failed"
| project TimeGenerated, WorkflowName, ActivityName, RunId, ErrorMessage

This lets you get alerts only when a specific step (like an HTTP call or SQL query) fails, which is great for targeted troubleshooting.

Pro Tips for Optimization

  • Add dynamic details to notifications: Include fields like WorkflowName and RunId in your alert message so your team can jump straight to the failed run in the Logic App portal
  • Set alert suppression: Prevent spammy alerts by configuring a suppression period (e.g., don't send another alert for the same workflow failure within 15 minutes)
  • Automate remediation: Use Action Groups to trigger a Logic App or Azure Function that attempts to retry the failed run, or creates a ticket in your ITSM tool

内容的提问来源于stack exchange,提问作者AasthaK

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.28 09:57:44