When working on and maintaining Logic Apps, you want to be notified if a certain action or complete Logic App (workflows) fails. Setting this up can be done by using Azure Monitoring.
By following the below steps you will create an Alert on your Logic App and specify when this alert will be triggered.
- Open the Azure portal and navigate to the Logic App for which an alert needs to be specified.
- Within the menu blade click on “Alert Rules”.
- A list of currently configured alerts on the resource will be opened.
- For specifying a new alert click on “Add metric alert” at the top of the screen.
- On the “Add Rule” blade that appears you will need to fill in the correct information. The most important information is prefilled. Prefilling is done regarding the context we created the alert in. Besides the resource that is prefilled it is important to fill in the following information:
- Metric: Example of metrics that are available:
- Run latency: The average time between when a run starts an when it ends
- Run rate: How many runs start per second
- Run success latency: The average time between start and end, but only for successful runs
- Run success percentage: The number of successful runs divided by the total
- Runs cancelled: The number of runs you've cancelled
- Runs completed: The number of completed runs, irrespective of status
- Runs failed: The number of runs that failed
- Runs started: The number of runs that started in that minute
- Runs succeeded: The number of runs that completed successfully
- Actions failed: The number of actions failed.
- Condition: Set it to “Greater than or equal to” this will make sure you will receive an alert when there is 1 failure.
- Threshold: Specify the value 1
- Period: The period of time in which you would like to check the condition.
- Press “OK”. To save the rule.
Now that the rule is saved the list of alerts will be shown. From this list you can monitor the alerts and check the status as shown in the image below.
As a result of configuring the rule the filled in users and the owners will receive a alert when it is triggered. The alert it self will look similar to the below e-mail.