Receive email notifications based on status of indicators

Learn how to configure email notifications based on Embedded Analytics metrics. This page uses the two configured sample use cases that are provided with the product as an example.

Introduction

Prebuilt Dashboards includes two configured sample use cases that trigger email alerts. These use cases demonstrate best practices to use to configure your own notification emails. In this page, learn how the two sample use cases were configured, so that you can configure your own email notifications.

  • In the first use case, Axway Decision Insight (DI) sends an email notification whenever at least one method receives a higher volume of exceptions than expected.
    The alert monitors the API Health - # transactions completed - last 1 h attribute of the API Method x Gateway Instance Type x Transaction Status  entity.
  • In the second use-case, DI monitors the latency of each API method for each Gateway instance type (Front-end or Back-end). 
    The alert monitors the API Health - Average response time - last 1 hour multi-dimensional attribute of the  API Method x Gateway Instance Type  entity.


For more information about how to send notifications, see also the Axway Decision Insight (DI) documentation:

Classifier attributes

You can configure notifications based on the status of classifier attributes. Classifier attributes are status attributes that can switch from one state to another, for example, from NORMAL to CRITICAL. You can configure DI to send an email when the value of such an attribute becomes CRITICAL.

In Embedded Analytics for API, the following attributes are provided for the two sample use cases:

  • API Infrastructure - High exception rate evaluation  attribute in Gateway Instance Type entity. Its value becomes CRITICAL whenever at least one API method generates more exceptions than a predefined threshold.
  • API Health -  Avg response time evaluation - last 1 hour attribute in API Method x Gateway Instance Type entity. Its value becomes CRITICAL whenever the response time of an API Method is higher than a predefined threshold.  

The value of these two classifier attribute depends on the thresholds defined in the exception thresholds (API Method x Transaction Status) and Response time thresholds (API Method)  attributes:

  • exception threshold values are provisioned by the 07-API-Configuration / updateExceptionThresholds route which loads thresholds values defined in a CSV file. The location of the CSV file loaded is defined in the 07-API-Configuration / In_ConfigurationFiles_Exception property.
  • response time threshold default values are provisioned through the 04-API-Integration / createGatewayInstance mapping which loads values defined in the 04-API-Integration / Default_High_Threshold_On_ResponseTime_ms property.

For more information about thresholds administration in Embedded Analytics for API, see Configure thresholds.

Events

A DI event is triggered each time the value of the classifier attributes specified above changes.

Two event generators are configured and located in DI > Data Integration> Events, in the 08-API-Alerts space:

  • HighExceptionRateEvaluation is configured to trigger an event each time the API  Infrastructure - High exception rate evaluation  attribute is updated.


  • AvgResponseTimeEvaluationLast1Hour is configured to trigger an event is triggered each time the API Health - Avg response time evaluation - last 1 h  attribute is updated.


Queries

When an event is triggered, it is forwarded to a route. The route supplements the event data with additional data provisioned from queries, then sends an email notification to the specified address. 

Two sample queries are available from DI  > Data Integration > Queries, in the 08-API-Alerts space:

In the context of an event triggered by HighExceptionRateEvaluation , the query getExceptions takes the following inputs: 

  • Gateway Instance Type Instance Id
  • Reference time

and outputs the following information about the methods that have a high number of exceptions:

  • Gateway Instance Type
  • API Method Id
  • Number of exceptions

 

In the context of events triggered by AvgResponseTimeEvaluationLast1Hour , the query getMethodLatency takes the following inputs: 

  • API Method Instance Id
  • Gateway Instance Type Instance Id
  • Reference time

and outputs the corresponding following information:

  • API Method Id
  • API Service Id
  • Average response time

Routes

Routes are used to receive the events, handle business logic and finally send notifications.

In DI Settings > Data Integration > Routes, in the 08-API-Alerts space, two routes are configured for that purpose: 

You must start the routes manually for the notifications to be sent.

Route Description
ExceptionRate

Sends an email each time the status of API   Infrastructure - High exception rate evaluation goes from NORMAL to CRITICAL.

The template of the email is defined in HTML in DI Settings > Data Integration > Resources in the 08-API-Alerts space > exceptionWarningMailContent.

HighResponseTime

Sends an email each time the status of API Health -  Avg response time evaluation - last 1 hour goes from NORMAL to CRITICAL.

Here, events are triggered for updates of a multi-dimensional classifier attribute, hence the extraction of the events data is slightly different.



Related Links