|
| 1 | +--- |
| 2 | +title: Monitoring overview |
| 3 | +description: Start here to learn about monitoring for Azure Logic Apps. |
| 4 | +ms.date: 03/19/2024 |
| 5 | +ms.custom: horz-monitor |
| 6 | +ms.topic: conceptual |
| 7 | +ms.service: logic-apps |
| 8 | +--- |
| 9 | + |
| 10 | +# Overview: Monitor Azure Logic Apps |
| 11 | + |
| 12 | +[!INCLUDE [horz-monitor-intro](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-intro.md)] |
| 13 | + |
| 14 | +For a detailed guide describing how to monitor Azure Logic Apps workflow run status, review trigger and workflow run history, and set up alerts, see [Monitor workflows](monitor-logic-apps.md). |
| 15 | + |
| 16 | +[!INCLUDE [horz-monitor-insights](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-insights.md)] |
| 17 | + |
| 18 | +### Application Insights |
| 19 | + |
| 20 | +You can set up Application Insights for a workspace or for a logic app after creation. |
| 21 | + |
| 22 | +[Enable and view enhanced telemetry in Application Insights for Standard workflows in Azure Logic Apps](enable-enhanced-telemetry-standard-workflows.md) shows how to turn on enhanced telemetry collection for a Standard logic app in Application Insights and view the collected data after the workflow finishes a run. |
| 23 | + |
| 24 | +If your logic app's creation and deployment settings support using Application Insights, you can optionally enable diagnostics logging and tracing for your logic app's workflow. For more information, see [Enable or open Application Insights after deployment](create-single-tenant-workflows-azure-portal.md#enable-open-application-insights). |
| 25 | + |
| 26 | +[!INCLUDE [horz-monitor-resource-types](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-resource-types.md)] |
| 27 | +For more information about the resource types for Azure Logic Apps, see [Azure Logic Apps monitoring data reference](monitor-logic-apps-reference.md). |
| 28 | + |
| 29 | +[!INCLUDE [horz-monitor-data-storage](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-data-storage.md)] |
| 30 | + |
| 31 | +[!INCLUDE [horz-monitor-platform-metrics](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-platform-metrics.md)] |
| 32 | + |
| 33 | +- For a detailed guide showing how to check health and performance metrics for both Consumption and Standard logic app workflows, see [View metrics for workflow health and performance](view-workflow-metrics.md). |
| 34 | +- For a list of available metrics for Azure Logic Apps, see [Azure Logic Apps monitoring data reference](monitor-logic-apps-reference.md#metrics). |
| 35 | + |
| 36 | +[!INCLUDE [horz-monitor-resource-logs](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-resource-logs.md)] |
| 37 | + |
| 38 | +- For a detailed walkthrough showing how to set up Azure Monitor Logs and a Log Analytics workspace for Azure Logic Apps workflows, see [Monitor and collect diagnostic data for workflows in Azure Logic Apps](monitor-workflows-collect-diagnostic-data.md). |
| 39 | + |
| 40 | +- To learn how to set up diagnostic logging and monitor logic apps in Microsoft Defender for Cloud, see [Set up logging to monitor logic apps in Microsoft Defender for Cloud](healthy-unhealthy-resource.md). |
| 41 | + |
| 42 | +- For the available resource log categories, their associated Log Analytics tables, and the logs schemas for Azure Logic Apps, see [Azure Logic Apps monitoring data reference](monitor-logic-apps-reference.md#resource-logs). |
| 43 | + |
| 44 | +## Monitoring for B2B workflows |
| 45 | + |
| 46 | +Azure Logic Apps includes built-in tracking that you can enable for parts of your workflow. To help you monitor the successful delivery or receipt, errors, and properties for business-to-business (B2B) messages, you can create and use AS2, X12, and custom tracking schemas in your integration account. |
| 47 | + |
| 48 | +- To monitor an automated business-to-business (B2B) messaging workflow in Azure Logic Apps, see [Set up Azure Monitor logs and collect diagnostics data for B2B messages](monitor-b2b-messages-log-analytics.md). |
| 49 | +- For a reference guide to the syntax and attributes for the tracking schemas, see [Tracking schemas for monitoring B2B messages](tracking-schemas-as2-x12-custom.md). |
| 50 | + |
| 51 | +[!INCLUDE [horz-monitor-activity-log](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-activity-log.md)] |
| 52 | + |
| 53 | +[!INCLUDE [horz-monitor-analyze-data](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-analyze-data.md)] |
| 54 | + |
| 55 | +[!INCLUDE [horz-monitor-external-tools](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-external-tools.md)] |
| 56 | + |
| 57 | +[!INCLUDE [horz-monitor-kusto-queries](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-kusto-queries.md)] |
| 58 | + |
| 59 | +For a detailed guide showing how to view and create queries for Azure Logic Apps, see [View and create queries for monitoring and tracking](create-monitoring-tracking-queries.md). |
| 60 | + |
| 61 | +### Sample Kusto queries |
| 62 | + |
| 63 | +Here are some sample queries for analyzing Azure Logic Apps workflow executions. |
| 64 | + |
| 65 | +#### Total executions |
| 66 | + |
| 67 | +Total billable executions by operation name. |
| 68 | + |
| 69 | +```kusto |
| 70 | +AzureDiagnostics |
| 71 | +| where ResourceProvider == "MICROSOFT.LOGIC" |
| 72 | +| where Category == "WorkflowRuntime" |
| 73 | +| where OperationName has "workflowTriggerStarted" or OperationName has "workflowActionStarted" |
| 74 | +| summarize dcount(resource_runId_s) by OperationName, resource_workflowName_s |
| 75 | +``` |
| 76 | + |
| 77 | +#### Execution distribution |
| 78 | + |
| 79 | +Hourly time chart for logic app execution distribution by workflow. |
| 80 | + |
| 81 | +```kusto |
| 82 | +AzureDiagnostics |
| 83 | +| where ResourceProvider == "MICROSOFT.LOGIC" |
| 84 | +| where Category == "WorkflowRuntime" |
| 85 | +| where OperationName has "workflowRunStarted" |
| 86 | +| summarize dcount(resource_runId_s) by bin(TimeGenerated, 1h), resource_workflowName_s |
| 87 | +| render timechart |
| 88 | +``` |
| 89 | + |
| 90 | +#### Execution status summary |
| 91 | + |
| 92 | +Completed executions by workflow, status, and error. |
| 93 | + |
| 94 | +```kusto |
| 95 | +AzureDiagnostics |
| 96 | +| where ResourceProvider == "MICROSOFT.LOGIC" |
| 97 | +| where OperationName has "workflowRunCompleted" |
| 98 | +| summarize dcount(resource_runId_s) by resource_workflowName_s, status_s, error_code_s |
| 99 | +| project LogicAppName = resource_workflowName_s , NumberOfExecutions = dcount_resource_runId_s , RunStatus = status_s , Error = error_code_s |
| 100 | +``` |
| 101 | + |
| 102 | +#### Triggered failures count |
| 103 | + |
| 104 | +Action or trigger failures for all logic app workflow executions by resource name. |
| 105 | + |
| 106 | +```kusto |
| 107 | +AzureDiagnostics |
| 108 | +| where ResourceProvider == "MICROSOFT.LOGIC" |
| 109 | +| where Category == "WorkflowRuntime" |
| 110 | +| where status_s == "Failed" |
| 111 | +| where OperationName has "workflowActionCompleted" or OperationName has "workflowTriggerCompleted" |
| 112 | +| extend ResourceName = coalesce(resource_actionName_s, resource_triggerName_s) |
| 113 | +| extend ResourceCategory = substring(OperationName, 34, strlen(OperationName) - 43) | summarize dcount(resource_runId_s) by code_s, ResourceName, resource_workflowName_s, ResourceCategory, _ResourceId |
| 114 | +| project ResourceCategory, ResourceName , FailureCount = dcount_resource_runId_s , ErrorCode = code_s, LogicAppName = resource_workflowName_s, _ResourceId |
| 115 | +| order by FailureCount desc |
| 116 | +``` |
| 117 | + |
| 118 | +[!INCLUDE [horz-monitor-alerts](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-alerts.md)] |
| 119 | + |
| 120 | +[!INCLUDE [horz-monitor-insights-alerts](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-insights-alerts.md)] |
| 121 | + |
| 122 | +> [!NOTE] |
| 123 | +> Available alert signals differ between Consumption and Standard logic apps. For example, Consumption logic apps have many trigger-related signals, such as **Triggers Completed** and **Triggers Failed**, while Standard workflows have the **Workflow Triggers Completed Count** and **Workflow Triggers Failure Rate** signals. |
| 124 | +
|
| 125 | +### Azure Logic Apps alert rules |
| 126 | + |
| 127 | +The following table lists some alert rules for Azure Logic Apps. These alerts are just examples. You can set alerts for any metric, log entry, or activity log entry that's listed in the [Azure Logic Apps monitoring data reference](monitor-logic-apps-reference.md). |
| 128 | + |
| 129 | +| Alert type | Condition | Description | |
| 130 | +|:---|:---|:---| |
| 131 | +| Metric | Triggers Failed | Whenever the count for **Triggers Failed** is greater than or equal to 1 | |
| 132 | +| Activity Log | Workflow Deleted | Whenever the Activity Log has an event with **Category='Administrative', Signal name='Delete Workflow (Workflow)'** | |
| 133 | + |
| 134 | +[!INCLUDE [horz-monitor-advisor-recommendations](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-advisor-recommendations.md)] |
| 135 | + |
| 136 | +## Related content |
| 137 | + |
| 138 | +- For reference information about the metrics, logs, and other important values created for Azure Logic Apps, see [Azure Logic Apps monitoring data reference](monitor-logic-apps-reference.md). |
| 139 | +- For general details on monitoring Azure resources, see [Monitoring Azure resources with Azure Monitor](/azure/azure-monitor/essentials/monitor-azure-resource). |
0 commit comments