Configure thresholds

You can configure the Prebuilt Dashboards to detect and raise alerts when unexpected situations occur using fixed thresholds. 

As risk criteria might differ according to the data monitored, you can set fixed threshold values at API Method level or Gateway Instance level depending on the metric evaluated.

Metric Dimension Analytic Threshold type
Response time (duration) API Method High response time High fixed threshold
Failure rate (decimal) API Method x Transaction Status ("failure") High failure rate

High fixed threshold

TPS (integer) API Method High TPS

High fixed threshold

Exception count (integer) API Method x Transaction Status ("exception") High exception count

High fixed threshold

CPU Usage Gateway Instance High CPU Usage

High fixed threshold

Disk Usage Gateway Instance High Disk Usage

High fixed threshold

Thresholds initialization

Threshold values are initialized at API Method creation. Default values are defined from the 04-API-Integration space properties but you can modify them.

For the changes to take effect, the route 04-API-Integration / CollectAndProcessEvents must be restarted. This change only impacts the newly created Method Instances though (API methods created after the route restart).

Thresholds settings

You can administer thresholds using configuration files that are put into directories located on the server hosting ADI.

Create configuration files

The corresponding file locations (each analytic has its own) are defined as properties in the 07-API-Configuration space.

Configuration files are .csv files that must contain:

  • A header
  • The API: name of the API
  • The API method: name of the method to be modified
  • The resolution time, from which the new threshold value must be effective
  • The comparison operator: > (Greater than) or >= (Greater than or equals) - Or "IGNORE" if you want to disable the fixed threshold evaluation. Does not have any impact in other cases.
  • The new high threshold value. Has no effect if the previous field = "IGNORE". Values are to be set as follows:
    • Duration in milliseconds for Response time
    • Decimal for Failure Rate (e.g 0.6 corresponds to 60,00%)
    • Integer for TPS and Exception

The following is an example of a configuration file:

API;API Method;Resolution date;Level-up;Critical-up (ms) 
Customer;getCustomerDetails;2016-02-01T00:00:00;>;900
Flight;FlightAvailability;2016-02-01T00:00:00;IGNORE;

Start the route

Routes are located in the 07-API-Configuration space. Start the updateMetricThresholds route to absorb the configuration file.

Recompute evaluation

If the modification is expected to be applied on old data (given the resolution date value), recalculation is not triggered instantly.

To achieve that, go to Configure and manage >> Platform menu, then go to Computing section and flush the pending events.

Thresholds view

You can check the threshold values in the API Method thresholds dashboard or the Gateway instance thresholds dashboards.

 

 

Related Links