In this section, we will take a detailed look at configuring monitoring for API App endpoints. An API App can specify a URL endpoint/multiple endpoints that returns metadata for the API in Swagger JSON format. With BizTalk360, you can monitor the health of the API App as well as the configured endpoints. In this article, we will take an in-depth look at the API Apps endpoint monitoring screen. The pre-requisite to configure monitoring for API app endpoint is that you need to add your Azure subscription into BizTalk360 in order to allow BizTalk360 to retrieve the information from Azure (active directory). 


Click the links below to navigate to the corresponding section - 

API Apps screen

  1. Log in to BizTalk360
  2. Click Monitoring on the top of the left navigation menu
  3. Expand Manage Mapping and select Azure Services
  4. If 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.
  5. If there is an active Azure subscription available, you will see the list of API Apps in the grid
  6. If any API App has an active URL endpoint(s), you will notice an expand icon (v) on the grid against the API App grid row
    You will not see the expand icon if the API App does not have a URL endpoint(s)
  7. Click the expand icon. This will list the active endpoints under the particular API App.
    1. Select the checkbox to set up the Azure API App Endpoint monitoring
    2. API - Name of the API as defined in Azure API Apps
    3. Is Monitoring Enabled - The default status is set to No. Once you set up monitoring for the endpoint, you will see the status changing to Yes.
    4. API URL - Displays the URL of the API
    5. Current State - The default state is set to Unknown. When monitoring is enabled for the API App endpoint, the current state will display the exact status of the endpoint (Healthy or Error).
    6. Reason - The reason for the state (explained in step 5). For instance, the response time exceeded the time specified for warning and error.
    7. Summary - A detailed endpoint summary giving the condition and the current state of the endpoint. Return code alerts takes the first priority. Keyword/ XPath/ JSON/ Response time alerts will only be validated if Return code alerts are healthy. In case of multiple Return code alerts (Ex. Error and Warning), the alert with the highest priority (Error) will be considered as the result. In case of multiple high priority Return code alerts (Ex. Error, Error, Warning), the alert with the highest priority (Error) that occurred in the first instance will be considered as the result.

choosing azure subscription for api app endpoints alarms in biztalk360


Basic endpoint details configuration

In this section, we will take a detailed look at the basic endpoint details screen to enable monitoring of API App endpoints in BizTalk360. The basic details page is the first page that is displayed when you try to configure an API App endpoint monitor. Follow the steps as shown below to navigate to the basic details screen of API App endpoint monitoring.

  1. Log in to the BizTalk360 application
  2. Click 'Monitoring' in the navigation panel
  3. Click the + button against 'Manage Mapping' tab and select 'Azure Services'
  4. Select the Alarm name (see Creating an alarm) from the drop down for which you would like to associate the alerts
  5. Choose the Azure subscription from the drop down
    If 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.
  6. Select the API Apps tab. This will list the API Apps that are created under the selected subscription.
  7. Click the expand icon (v) against the API App
    If there are no endpoint URL associated with the API App, you will not see the (v) icon
  8. Select the check box against the API that you wish to monitor using BizTalk360. You will notice that the Configure API App Endpoints button will get activated when you select the API.
  9. Click the Configure API App Endpoints button. This will open a new blade with the following information -
    1. Friendly name - The friendly name will be pre-populated with the name of the API. You cannot edit the value in this field.
    2. Endpoint URL - The URL of the web endpoint, for e.g., http://www.microsoft.com, http://www.google.com. This will also be pre-populated with the URL of the API App endpoint, however, you can change the value of this field.
    3. Enable Monitoring - This toggle must be enabled in order to set up monitoring for the API App endpoint


how to configure azure api app endpoints for alarms in biztalk360

enabling web service endpoints monitoring

Optional details configuration

In this section, we will take a detailed look at the optional settings available in the second (blade) screen that is displayed when setting up monitoring for an API App endpoint URL. Follow the steps as shown below to navigate to the optional details screen of API app web endpoint monitoring. All the details on this page are optional. You can choose to skip them if they are not required. You also need to remember that skipping the details in this section will start monitoring the endpoint based on the default selection ("Response Time Alerts") in the next screen.

  1. Payload - You can use the Payload section to add external parameters to the endpoint URL (as appropriate). For example, let's assume you have an API that retrieves the description and id of the daily tasks you have to perform on your pet dog. Let's say, the first task is to feed the dog with an id of "0". The second task is to "take the dog on a walk" with id of "1". You can pass the id as a payload to the API URL to exactly retrieve the task specific to the id.
    The payload section has the following options that users can choose to monitor their preferred endpoint.
    • Request Methods - GET method to get the payload as input for the endpoint URL
    • HTTP Version - Choose the version of HTTP (HTTP/1.1 or HTTP/1.0)
    • Accept - The accepted content format such as application/json, application/xml, text/html, text/xml, application/javascript, text/plain
    • Get Parameters - The two parameters (Key and Value) that have to be passed along with the endpoint URL. For example, value of the id and the task to perform on the dog. Enter the values in the space provided. You can add multiple parameter values by clicking the button. Click the Delete icon to delete the parameter value.

      setting up payload details for azure web service endpoints monitoring in biztalk360

  2. Custom Header - You can pass custom headers along with your endpoint URL and monitor the endpoint based on the return code or keyword/response time alerts. You need to pass the Custom Header Name and Custom Header Value for the custom headers. You can add multiple custom header values as required by clicking the button.

    payload header details for web service endpoint monitoring in biztalk360


Response Alert Configuration

In this section, we will take a detailed look at the different options that are available in the third screen that is displayed when configuring monitoring for an API App endpoint URL.

  1. Response Format - You need to select the type of response format that you will receive when the monitoring service tries to access the API App URL web endpoint. The different options available are - Plain TextXML, and JSON
  2. Depending on the Response format selection, the second option in the response alert configuration will change automatically. For Plain Text, you will notice Keyword Alerts, for XML, it will be _XPath Alerts, and for JSON, it will be _JSON path Alerts.

    response alert configuration for biztalk360 web endpoint monitoring

  3. Return Code Alerts - You can set up monitoring for the API App URL web endpoint and set up alerting based on the return code that is generated by the endpoint. You can define monitoring such as "Set up a monitor on the API App URL endpoint and the status should be Healthy if the return code is 200. Otherwise, throw a warning/error and set the status appropriately." To achieve this, you need to define 3 parameters - 
    • Status Code - This is the return code that you expect from the endpoint if it is active
    • Expected Status - This expected status of the return code in the response alert. You can choose between Must be Present and Must be Absent
    • Else - This section will get triggered when the logic fails for the expected status value. For instance, if you set the expected status code (200) to "Must be Present", and the actual return code from the web endpoint is 404, then in this case the else section will get executed and the health status of the web endpoint will be displayed as Error or Warning depending on the value selected.

      web service monitoring alerts in biztalk360

  4. _JSON Path Alerts / _XPath Alerts - Similar to return code alerts, you can set up monitoring and set the alert configuration to the _JSON Path and _XPath Alerts. You need to define the following 3 parameters -
    • XPath / JSON Path - Enter the XPath/JSON Path in the space provided. You can find a sample example format given in the text box. You need to enter the path in the specified format only.
    • Expected value - Enter the expected value that the XPath/JSON Path will return. If the actual returned value is the same as the expected value, you will notice the endpoint health status to be Healthy. However, if the returned value is different from the expected value, the endpoint health status will be displayed as Error or Warning depending on the status defined in the Else section (shown below).
    • Else - This section will get triggered when the logic fails for the expected status value. For instance, if you set the expected value to $7.95, and the actual value returned by the XPath or JSON path is $5.95, then the else section will get executed and the health status of the web endpoint will be displayed as Error or Warning depending on the value selected.

      xml format for response alerts in biztalk360

      json alerts for web service monitoring responses in biztalk360

  5. Response Time Alerts - You can set up monitoring for the API App URL web endpoint based on the response time alert. You can specify the minimum and maximum time by which the end point should send a response back. If the time exceeds the minimum/maximum time, the endpoint will be shown in the Error state. The default warning time is 2 seconds, and the error time is 7 seconds.
    The Response Time Alerts will be selected by default. Even if you do not choose the Return Code Alerts or _JSON Path alerts/XPath alerts, the web endpoint will be monitored against the response time alert values. In case you try to disable the response time alerts toggle bar, you will see an error message as "Please Make sure atleast one Alert section is enabled."

    response time alerts for web service monitoring in biztalk360

Endpoint Summary

Depending of the endpoint configuration, you will see the current status of the endpoint monitor as either Error, Warning, or Healthy. In case of the Warning or Error status, the Reason field will display the reason for the current status. Click the eye icon in the Summary column to view the endpoint summary information.

The Endpoint Summary will be displayed based on the priority order of the alerts. The Return Code Alerts takes the highest priority. If the return code alert is configured and in healthy state, the priority moves to the _XML Alerts / JSON Alerts section. If this section also is configured and in a healthy state, the priority moves to the third section (Response Time Alerts). If this section is also in the Healthy state, the final endpoint state will be in the Healthy state. However, if the endpoint state is in an Error state in any of the three sections, then the health status would automatically display the status of the endpoint as Error or Warning depending on the value selected. Also, if the endpoint status becomes Error or Warning in either the Return Code Alerts section or _JSON Path Alerts/_XPath Alerts section, the next section will display the Current State information as Not Validated. This means that the final section will not be considered by the monitoring service when triggering the response.

choosing alarms for biztalk360 with azure

endpoint summary for response time alerts in biztalk360