paint-brush
Logic Apps Watch Monitor for Run Action Failuresby@mohannagaraj

Logic Apps Watch Monitor for Run Action Failures

by Mohan NagarajOctober 17th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

This use case is a simplified version of a production level issue faced by one of our potential customers. They have a logic <a href="https://hackernoon.com/tagged/app" target="_blank">app</a> playing a critical role in their business orchestration. The problem is that they are not aware of a failure in one of the <strong>Run Actions</strong> in the Logic App. A specific run action is failing due to OAuth token not being refreshed as expected from the authentication provider.

Company Mentioned

Mention Thumbnail
featured image - Logic Apps Watch Monitor for Run Action Failures
Mohan Nagaraj HackerNoon profile picture

This use case is a simplified version of a production level issue faced by one of our potential customers. They have a logic app playing a critical role in their business orchestration. The problem is that they are not aware of a failure in one of the Run Actions in the Logic App. A specific run action is failing due to OAuth token not being refreshed as expected from the authentication provider.

Hence, we proposed a solution to this scenario through the ‘Watch’ monitoring feature in Serverless360.

Every Logic App would have one or more trigger definitions which would be followed by a sequence of run actions that define the workflow. There could be scenarios where the trigger would have been successful but one of the run actions would have failed. This would break the workflow and an immediate notification of the run action failure with details would be of great help to bring the workflow up.

A Logic App with name “EmailProcessor” is created with a recurrence trigger that has a frequency of 5 minutes. It has a run action to send an email from a shared mailbox account. We have authenticated this with the email id that has necessary permissions on the shared mailbox account.

Logic Apps Watch Monitor

This Logic App is now associated with Serverless360 Composite Application and ‘Watch’ monitoring is enabled. From this moment the Logic App will be continuously watched, an alert will be forwarded to the configured notification channels within in 5 minutes of the failure (this is the default notification frequency in Serverless360, not to be confused with the Logic App Frequency set above).

This logic app is expected to trigger email to the recipient email at a frequency of 5 minutes. Unlike what the customer was mentioning, we did not face any failure in the logic app run actions. The OAuth token in our case was refreshed properly.

Hence, we forced the workflow to create an OAuth error. Therefore we can check if Serverless360 ‘Watch’ monitor can generate an alert. So we removed the API connection that will be used by the logic app to get the OAuth token. Now the attempt to get the token should fail for sure, and in turn, the run action will fail. As a result, we received a Logic Apps watch monitor alert from Serverless360 — “Failure report of Logic App, EmailProcessor”.

With Serverless360 you can get more clarity on the failure by looking deep into the run history of the logic app and identify the run with the run identifier. The output of the failed run action will have the failure reason in detail.

The run action failed at 2018–07–27 15:37:53

The Logic Apps watch monitor detected the failure and generated the alert at 2018–07–27 15:41:35 and most importantly, the alert is forwarded to the Notification Channels for corrective actions.

Likewise, you would have requirements to get notified of the failure of an invocation in Azure Function. Getting notified on the failure of Logic Apps and Azure Functions invocation in near real-time is now possible with Serverless360.

Other interesting use cases where you can use Serverless360 can be found here.

Serverless360 is a one platform tool to operate, manage and monitor Azure Serverless components. It provides efficient tooling that is not and likely to be not available in Azure Portal. Try Serverless360 free for 30 days!

Originally published at www.serverless360.com on July 30, 2018.