You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: View and create queries for logic apps in Azure Monitor logs
3
+
description: View and create queries in Azure Monitor logs for Azure Logic Apps
4
+
services: logic-apps
5
+
ms.suite: integration
6
+
ms.reviewer: divswa, logicappspm
7
+
ms.topic: article
8
+
ms.date: 01/30/2020
9
+
---
10
+
11
+
# View and create queries for monitoring and tracking in Azure Monitor logs for Azure Logic Apps
12
+
13
+
You can view the underlying queries that produce the results from [Azure Monitor logs](../log-analytics/log-analytics-overview.md) and create queries that filter the results based your specific criteria. For example, you can find messages based on a specific interchange control number. Queries use the [Kusto query language](https://aka.ms/LogAnalyticsLanguageReference), which you can edit if you want to view different results. For more information, see [Azure Monitor log queries](../azure-monitor/log-query/query-language.md).
14
+
15
+
## Prerequisites
16
+
17
+
* A Log Analytics workspace. If you don't have a Log Analytics workspace, learn [how to create a Log Analytics workspace](../azure-monitor/learn/quick-create-workspace.md).
18
+
19
+
* A logic app that's set up with Azure Monitor logging and sends that information to a Log Analytics workspace. Learn [how to set up Azure Monitor logs for your logic app](../logic-apps/monitor-logic-apps.md).
20
+
21
+
* If you're using an integration account, make sure that you've set up the account with Azure Monitor logging to send that information to a Log Analytics workspace. Learn how to [set up Azure Monitor logging for your integration account](../logic-apps/monitor-b2b-messages-log-analytics.md).
22
+
23
+
## View queries behind results
24
+
25
+
To view or edit the query that produces the results in your workspace summary, follow these steps:
26
+
27
+
1. On any results page, at the bottom, select **See All**.
28
+
29
+

30
+
31
+
The Logs page opens and shows the query behind the previous results page.
1. On the **Logs** page, you can select these options:
36
+
37
+
* To view the query results as a table, under the query editor, select **Table**.
38
+
39
+
* To change the query, update the query string and select **Run** to view the results in the table.
40
+
41
+
## Create your own query
42
+
43
+
To find or filter results based on specific properties or values, you can create your own query by starting from an empty query or use an existing query. For more information, see [Get started with log queries in Azure Monitor](../azure-monitor/log-query/get-started-queries.md).
44
+
45
+
1. In the [Azure portal](https://portal.azure.com), find and select your Log Analytics workspace.
46
+
47
+
1. On your workspace menu, under **General**, select **Logs**.
48
+
49
+
1. Start from an empty query or any available existing queries.
50
+
51
+
* To check whether any existing queries are available, on the query toolbar, select either **Samples queries** > **History**, which shows queries from previous query runs, or select **Query explorer**, which shows prebuilt queries.
52
+
53
+
For example, the Logic Apps B2B solution provides these prebuilt queries:
54
+
55
+

56
+
57
+
* To start from an empty query, in the query editor, start typing the [Kusto query language](../azure-monitor/log-query/query-language.md) for your query.
58
+
59
+

Copy file name to clipboardExpand all lines: articles/logic-apps/logic-apps-create-logic-apps-from-templates.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ If you don't have an Azure subscription,
51
51
|**Subscription**|*your-Azure-subscription-name*| Select the Azure subscription that you want to use. |
52
52
|**Resource group**|*your-Azure-resource-group-name*| Create or select an [Azure resource group](../azure-resource-manager/management/overview.md) for this logic app and to organize all resources associated with this app. |
53
53
|**Location**|*your-Azure-datacenter-region*| Select the datacenter region for deploying your logic app, for example, West US. |
54
-
|**Log Analytics**|**Off** (default) or **On**|Turn on[diagnostic logging](../logic-apps/logic-apps-monitor-your-logic-apps.md#turn-on-diagnostics-logging-for-your-logic-app) for your logic app through[Azure Monitor logs](../log-analytics/log-analytics-overview.md). Requires that you already have a Log Analytics workspace. |
54
+
|**Log Analytics**|**Off** (default) or **On**|Set up[diagnostic logging](../logic-apps/monitor-logic-apps-log-analytics.md) for your logic app by using[Azure Monitor logs](../log-analytics/log-analytics-overview.md). Requires that you already have a Log Analytics workspace. |
55
55
||||
56
56
57
57
4. When you're ready, select **Pin to dashboard**.
# Troubleshoot and diagnose workflow failures in Azure Logic Apps
12
12
13
-
Your logic app generates information that can help you
14
-
diagnose and debug problems in your app.
15
-
You can diagnose a logic app by reviewing
16
-
each step in the workflow through the Azure portal.
17
-
Or you can add some steps to a workflow for runtime debugging.
13
+
Your logic app generates information that can help you diagnose and debug problems in your app. You can diagnose a logic app by reviewing each step in the workflow through the Azure portal. Or, you can add some steps to a workflow for runtime debugging.
18
14
19
-
## Review triggerhistory
15
+
<aname="check-trigger-history"></a>
20
16
21
-
Each logic app starts with trigger. If the trigger doesn't fire,
22
-
first check the trigger history. This history lists all the
23
-
trigger attempts that your logic app made and details about
24
-
inputs and outputs for each trigger attempt.
17
+
## Check trigger history
25
18
26
-
1. To check whether the trigger fired,
27
-
on your logic app menu, choose **Overview**. Under
28
-
**Trigger History**, review the trigger's status.
19
+
Each logic app run starts with a trigger attempt, so if the trigger doesn't fire, follow these steps:
29
20
30
-
> [!TIP]
31
-
> If you don't see the logic app menu,
32
-
> try returning to the Azure dashboard,
33
-
> and reopen your logic app.
21
+
1. Check the trigger's status by [checking the trigger history](../logic-apps/monitor-logic-apps.md#review-trigger-history). To view more information about the trigger attempt, select that trigger event, for example:

36
24
37
-
> [!TIP]
38
-
> * If you don't find the data that you expect,
39
-
> try selecting **Refresh** on the toolbar.
40
-
> * If the list shows many trigger attempts,
41
-
> and you can't find the entry you want,
42
-
> try filtering the list.
43
-
44
-
Here are the possible statuses for a trigger attempt:
45
-
46
-
| Status | Description |
47
-
| ------ | ----------- |
48
-
|**Succeeded**| The trigger checked the endpoint and found available data. Usually, a "Fired" status also appears alongside this status. If not, the trigger definition might have a condition or `SplitOn` command that wasn't met. <p>This status can apply to a manual trigger, recurrence trigger, or polling trigger. A trigger can run successfully, but the run itself might still fail when the actions generate unhandled errors. |
49
-
|**Skipped**| The trigger checked the endpoint but found no data. |
50
-
|**Failed**| An error occurred. To review any generated error messages for a failed trigger, select that trigger attempt and choose **Outputs**. For example, you might find inputs that aren't valid. |
51
-
|||
52
-
53
-
You might have multiple trigger entries with the same date and time,
54
-
which happens when your logic app finds multiple items.
55
-
Each time the trigger fires, the Logic Apps engine creates
56
-
a logic app instance to run your workflow. By default,
57
-
each instance runs in parallel so that no workflow
58
-
has to wait before starting a run.
25
+
1. Check the trigger's inputs to confirm that they appear as you expect. Under **Inputs link**, select the link, which shows the **Inputs** pane.
59
26
60
-
> [!TIP]
61
-
> You can recheck the trigger without waiting for the next recurrence.
62
-
> On the overview toolbar, choose **Run trigger**,
63
-
> and select the trigger, which forces a check.
64
-
> Or, select **Run** on Logic Apps Designer toolbar.
27
+
Trigger inputs include the data that the trigger expects and requires to start the workflow. Reviewing these inputs can help you determine whether the trigger inputs are correct and whether the condition was met so that the workflow can continue.
65
28
66
-
3. To examine the details for a trigger attempt,
67
-
under **Trigger History**, select that trigger attempt.
29
+
For example, the `feedUrl` property here has an incorrect RSS feed value:
68
30
69
-

31
+

70
32
71
-
4. Review the inputs and any outputs that the trigger generated.
72
-
Trigger outputs show the data that came from the trigger.
73
-
These outputs can help you determine whether all properties
74
-
returned as expected.
33
+
1. Check the triggers outputs, if any, to confirm that they appear as you expect. Under **Outputs link**, select the link, which shows the **Outputs** pane.
75
34
76
-
> [!NOTE]
77
-
> If you find any content that you don't understand,
78
-
> learn how Azure Logic Apps
79
-
> [handles different content types](../logic-apps/logic-apps-content-type.md).
35
+
Trigger outputs include the data that the trigger passes to the next step in your workflow. Reviewing these outputs can help you determine whether the correct or expected values passed on to the next step in your workflow, for example:

82
38
83
-
## Review run history
39
+
> [!TIP]
40
+
> If you find any content that you don't recognize, learn more about
41
+
> [different content types](../logic-apps/logic-apps-content-type.md) in Azure Logic Apps.
84
42
85
-
Each fired trigger starts a workflow run.
86
-
You can review what happened during that run,
87
-
including the status for each step in the workflow,
88
-
plus the inputs and outputs for each step.
43
+
<aname="check-runs-history"></a>
89
44
90
-
1. On the logic app menu, choose **Overview**.
91
-
Under **Runs history**, review the run for the fired trigger.
45
+
## Check runs history
92
46
93
-
> [!TIP]
94
-
> If you don't see the logic app menu,
95
-
> try returning to the Azure dashboard,
96
-
> and reopen your logic app.
47
+
Each time that the trigger fires for an item or event, the Logic Apps engine creates and runs a separate workflow instance for each item or event. If a run fails, follow these steps to review what happened during that run, including the status for each step in the workflow plus the inputs and outputs for each step.
1. Check the workflow's run status by [checking the runs history](../logic-apps/monitor-logic-apps.md#review-runs-history). To view more information about a failed run, including all the steps in that run in their status, select the failed run.
99
50
100
-
> [!TIP]
101
-
> * If you don't find the data that you expect,
102
-
> try selecting **Refresh** on the toolbar.
103
-
> * If the list shows many runs,
104
-
> and you can't find the entry you want,
105
-
> try filtering the list.
51
+

106
52
107
-
Here are the possible statuses for a run:
53
+
1. After all the steps in the run appear, expand the first failed step.
108
54
109
-
| Status | Description |
110
-
| ------ | ----------- |
111
-
|**Succeeded**| All actions succeeded. <p>If any failures happened in a specific action, a following action in the workflow handled that failure. |
112
-
|**Failed**| At least one action failed, and no later actions in the workflow were set up to handle the failure. |
113
-
|**Cancelled**| The workflow was running but received a cancel request. |
114
-
|**Running**| The workflow is currently running. <p>This status might happen for throttled workflows, or due to the current pricing plan. For more information, see the [action limits on the pricing page](https://azure.microsoft.com/pricing/details/logic-apps/). If you set up [diagnostics logging](../logic-apps/logic-apps-monitor-your-logic-apps.md), you can also get information about any throttle events that happen. |
115
-
|||
55
+

116
56
117
-
2. Review the details for each step in a specific run.
118
-
Under **Runs history**, select the run that you want to examine.
57
+
1. Check the failed step's inputs to confirm whether they appear as you expect.

127
64
128
-
3. To examine the inputs, outputs, and any error messages for a specific step, choose that step so that the shape expands and shows the details. For example:
65
+
1. To examine the inputs, outputs, and any error messages for a specific step, choose that step so that the shape expands and shows the details. For example:
To help with debugging, you can add diagnostic steps to a workflow,
135
-
along with reviewing the trigger and runs history. For example,
136
-
you can add steps that use the [Webhook Tester](https://webhook.site/)
137
-
service so that you can inspect HTTP requests and determine
138
-
their exact size, shape, and format.
71
+
To help with debugging, you can add diagnostic steps to a logic app workflow, along with reviewing the trigger and runs history. For example, you can add steps that use the [Webhook Tester](https://webhook.site/) service so that you can inspect HTTP requests and determine their exact size, shape, and format.
139
72
140
-
1.Visit [Webhook Tester](https://webhook.site/) and copy the unique URL created
73
+
1.Go to the [Webhook Tester](https://webhook.site/)site and copy the generated unique URL.
141
74
142
-
2. In your logic app, add an HTTP POST action with the
143
-
body content that you want to test,
144
-
for example, an expression or another step output.
75
+
1. In your logic app, add an HTTP POST action plus the body content that you want to test, for example, an expression or another step output.
145
76
146
-
3. Paste the URL for your Webhook Tester into the HTTP POST action.
77
+
1. Paste your URL from Webhook Tester into the HTTP POST action.
147
78
148
-
4. To review how a request is formed when generated from the Logic Apps engine,
149
-
run the logic app, and see Webhook Tester for details.
79
+
1. To review how a request is formed when generated from the Logic Apps engine, run the logic app, and revisit the Webhook Tester site for more details.
150
80
151
81
## Next steps
152
82
153
-
[Monitor your logic app](../logic-apps/logic-apps-monitor-your-logic-apps.md)
83
+
*[Monitor your logic app](../logic-apps/monitor-logic-apps.md)
0 commit comments