logicapps icon indicating copy to clipboard operation
logicapps copied to clipboard

What's the best way to create Alerts for failed workflows (Logic App Standard)?

Open rubenaster opened this issue 2 years ago • 2 comments

We're currently looking for a possibility to create Alerts that notify us when a specific amount of workflows fail. Since there's no build-in Alert (like for consumption-based Logic Apps) we're currently using Kusto query:

traces | extend RunId_s = tostring(parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).resource)).runId) | extend workflowName = tostring(parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).resource)).workflowName) | extend endState = customDimensions.prop__status | where message startswith "Workflow run end" or message startswith "Workflow run disp" | where endState == "Failed" | sort by timestamp | distinct RunId_s

But honestly, it feels unsatisfying to create such a query for such a simple task plus not all workflows have a trace with the last failed action - which is weird but another topic.

Does anybody have some better solution?

rubenaster avatar Jun 02 '22 13:06 rubenaster

We also tried this query:

customMetrics | where name == "Runs Failed" or operation_Name == "FlowRunLastJob" | order by timestamp

But unfortunately this doesn't give us any information about which workflow failed.

rubenaster avatar Jun 02 '22 13:06 rubenaster

You can catch LA Standard workflow errors based on http status codes, most likely the Http Server Errors and Http 4xx signal names is what you're looking for. Personally i would catch all errors where possible and handle them before the workflow fails.

image

erwinkramer avatar Jun 07 '22 19:06 erwinkramer

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Oct 20 '22 21:10 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] avatar Oct 27 '22 22:10 github-actions[bot]

Please reopen. There's currently no way to find all workflow executions on the logs and no guidance on how to exploit these logs.

xaviergxf avatar Oct 28 '22 06:10 xaviergxf

Closing this but keeping #558 open as a duplicate

hartra344 avatar Oct 30 '22 22:10 hartra344

This is 558 and is marked as closed. Can you please reopen?

xaviergxf avatar Oct 31 '22 07:10 xaviergxf

Sorry, did not mean to close this one, it's also flagged so it won't get auto closed. I'll get someone from the back end to take a look at this and see what options we have.

hartra344 avatar Nov 01 '22 07:11 hartra344

The support for Logic Apps metrics is coming by the end of the year. This will include metrics for runs, actions and trigger level events that you can use for monitoring and alerting.

rohithah avatar Nov 16 '22 07:11 rohithah