In this article, we will take a detailed look at the end-to-end working scenario of setting up monitoring of an Azure Logic App with a real time scenario.
Let's say we have two Logic Apps (MyFirstLogicApp and MySecondLogicApp) that are up and running (Enabled) in the Azure Portal. You can set up monitoring on the Logic App (say, MyFirstLogicApp) and get updates from BizTalk360 when the Logic App is in a different state (disabled). Follow the steps as shown below to monitor the health of the Logic App.
- Log in to the BizTalk360 application
- Create a New Alarm. Select For Threshold Monitoring from the drop down.
- Enter the Alarm Name as "Monitor Azure Services", enter the email id's to which you want to send the notifications in case of any threshold violation (say, email@example.com), a description for the alarm. Click Next.
- Toggle the Alert on Threshold Violation icon to set the threshold violation. Set the threshold violation persist duration to 10 minutes. Select the "Limit number of alerts per violation to" checkbox to 3. Select the "Notify when things become normal after violation" checkbox to receive an email notification when things become normal after the violation is resolved. Click OK to set up the alarm.
Click 'Monitoring' in the navigation panel. Click the + button against 'Manage Mapping' tab and select 'Azure Services'. Select the Alarm name (Monitor API app) from the drop down.
- Choose the Azure subscription from the drop downIf there are no Azure subscriptions mapped to your environment, you will see a warning message as "No Azure Subscriptions Found/Enabled". Click "Go to Settings to Add/Enable". Refer this article to know the details of adding a new Azure subscription.
- Select the Logic Apps tab. This will list the Logic Apps that are created under the selected subscription.
- Let's say, we want to monitor the MyFirstLogicApp Logic App from the list of available Logic Apps. Select the check box against the MyFirstLogicApp Logic App.
- From the Expected State drop-down, choose the expected state of the Logic App in order to set up monitoring. Let's say, we expect the Logic App to be Enabled at all time.
- Setting the expected state will automatically start monitoring the Logic App. BizTalk360 monitoring service will automatically compare the current state of the Logic App with the expected state and display the status (as Healthy or Error). If the expected state matches with the current state, you will notice the status of the Logic App as Healthy (in green color). If there is a state mismatch, the status of the Logic App will be displayed as Error (in red color).
- To auto correct the state of the Logic App, select the check box against the Logic App and click the AutoCorrect box. Select Enable from the drop-down. If at any time the current status of the Logic App becomes Disabled (opposite of the expected status), the auto correct logic will start functioning and the BizTalk360 monitoring service will try to automatically enable the Logic App (based on the number of retries defined in the Max Retry section).
- The Last Run section will display the last time when the Logic App actually executed
- In order to receive email notifications from BizTalk360 on the threshold violation alerts (and auto correction alerts), you need to configure the SMTP settings under BizTalk360 Settings. Follow the steps in this article to be able to configure the SMTP settings in BizTalk360. You will receive an email notification with the exact details of the status of the Logic App with the auto correction details (as shown in the email below)
- The monitoring dashboard will reflect the health of the Azure services as shown in the image below.