AWS anomaly detection API - PUT configuration

Updates the configuration of anomaly detection for AWS.

The request consumes an application/json payload.

PUT
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/anomalyDetection/aws
  • SaaS https://{your-environment-id}.live.dexp.ae/api/config/v1/anomalyDetection/aws

Parameters

Parameter Type Description In Required
body AwsAnomalyDetectionConfig

JSON body of the request, containing parameters of the AWS anomaly detection configuration.

body optional

The AwsAnomalyDetectionConfig object

The configuration of anomaly detection for AWS.

Element Type Description Required
metadata ConfigurationMetadata

Metadata useful for debugging.

optional
rdsHighCpuDetection RdsHighCpuDetectionConfig

How to detect high CPU utilization on RDS.

required
rdsHighWriteReadLatencyDetection RdsHighWriteReadLatencyDetectionConfig

How to detect high RDS write/read latency.

required
rdsLowStorageDetection RdsLowStorageDetectionConfig

How to detect low free storage space on RDS.

required
rdsHighMemoryDetection RdsHighMemoryDetectionConfig

How to detect DRS running out of memory.

required
elbHighConnectionErrorsDetection ElbHighConnectionErrorsDetectionConfig

How to detect high number of backend connection errors on ELB.

required
rdsRestartsSequenceDetection RdsRestartsSequenceDetectionConfig

How to detect restarts sequence on RDS.

required
lambdaHighErrorRateDetection LambdaHighErrorRateDetectionConfig

How to detect AWS Lambda high error rate.

required
ec2CandidateCpuSaturationDetection Ec2CandidateCpuSaturationDetectionConfig

How to detect high CPU saturation on EC2 monitoring candidate. If null, then these settings won't be changed.

optional

The Ec2CandidateCpuSaturationDetectionConfig object

The configuration of the high CPU saturation on EC2 without installed agent (monitoring candidate). If null, then this configuration won't be changed.

Element Type Description Required
enabled boolean

The detection is enabled (true) or disabled (false).

required
customThresholds Ec2CandidateCpuSaturationThresholds

Custom thresholds for high CPU saturation on EC2 monitoring candidate. If not set, automatic mode is used.

optional

The Ec2CandidateCpuSaturationThresholds object

Custom thresholds for high CPU saturation on EC2 monitoring candidate. If not set, automatic mode is used.

Element Type Description Required
cpuUsagePercentage integer

Alert if CPU usage is higher than X% in 3 out of 5 samples.

required

The LambdaHighErrorRateDetectionConfig object

The configuration of the AWS Lambda high error rate detection.

Element Type Description Required
enabled boolean

The detection is enabled (true) or disabled (false).

required
customThresholds LambdaHighErrorRateThresholds

Custom thresholds for AWS Lambda high error rate. If not set, automatic mode is used.

optional

The LambdaHighErrorRateThresholds object

Custom thresholds for AWS Lambda high error rate. If not set, automatic mode is used.

Element Type Description Required
failedInvocationsRate integer

Alert if failed invocations rate is higher than X% in 3 out of 5 samples.

required

The RdsRestartsSequenceDetectionConfig object

The configuration of the restarts sequence on RDS detection.

Element Type Description Required
enabled boolean

The detection is enabled (true) or disabled (false).

required
customThresholds RdsRestartsThresholds

Custom thresholds for restarts sequence on RDS. If not set, automatic mode is used.

optional

The RdsRestartsThresholds object

Custom thresholds for restarts sequence on RDS. If not set, automatic mode is used.

Element Type Description Required
restartsPerMinute integer

Alert if number of restarts is X per minute or higher in 3 out of 20 samples.

required

The ElbHighConnectionErrorsDetectionConfig object

The configuration of the high number of backend connection errors on ELB detection.

Element Type Description Required
enabled boolean

The detection is enabled (true) or disabled (false).

required
customThresholds ElbHighConnectionErrorsThresholds

Custom thresholds for high number of backend connection errors on ELB. If not set, automatic mode is used.

optional

The ElbHighConnectionErrorsThresholds object

Custom thresholds for high number of backend connection errors on ELB. If not set, automatic mode is used.

Element Type Description Required
connectionErrorsPerMinute integer

Alert if number of backend connection errors is higher than X per minute in 3 out of 5 samples.

required

The RdsHighMemoryDetectionConfig object

The configuration of RDS running out of memory detection.

Element Type Description Required
enabled boolean

The detection is enabled (true) or disabled (false).

required
customThresholds RdsHighMemoryThresholds

Custom thresholds for RDS running out of memory. If not set, automatic mode is used.

All conditions must be fulfilled to trigger an alert.

optional

The RdsHighMemoryThresholds object

Custom thresholds for RDS running out of memory. If not set, automatic mode is used.

All conditions must be fulfilled to trigger an alert.

Element Type Description Required
freeMemory number

Freeable memory is lower than X Megabytes in 3 out of 5 samples.

required
swapUsage number

Swap usage is higher than X Gigabytes in 3 out of 5 samples.

required

The RdsLowStorageDetectionConfig object

The configuration of the low free storage space on RDS detection.

Element Type Description Required
enabled boolean

The detection is enabled (true) or disabled (false).

required
customThresholds RdsLowStorageThresholds

Custom thresholds for low free storage space on RDS. If not set, automatic mode is used.

optional

The RdsLowStorageThresholds object

Custom thresholds for low free storage space on RDS. If not set, automatic mode is used.

Element Type Description Required
freeStoragePercentage integer

Alert if free storage space divided by allocated storage is lower than X% in 3 out of 5 samples.

required

The RdsHighWriteReadLatencyDetectionConfig object

The configuration of the high RDS write/read latency detection.

Element Type Description Required
enabled boolean

The detection is enabled (true) or disabled (false).

required
customThresholds RdsHighLatencyThresholds

Custom thresholds for high RDS write/read latency. If not set, automatic mode is used.

optional

The RdsHighLatencyThresholds object

Custom thresholds for high RDS write/read latency. If not set, automatic mode is used

Element Type Description Required
writeReadLatency integer

Alert if read/write latency is higher than X milliseconds in 3 out of 5 samples.

required

The RdsHighCpuDetectionConfig object

The configuration of the high CPU utilization on RDS detection.

Element Type Description Required
enabled boolean

The detection is enabled (true) or disabled (false).

required
customThresholds RdsHighCpuThresholds

Custom thresholds for high CPU utilization on RDS. If not set, automatic mode is used.

optional

The RdsHighCpuThresholds object

Custom thresholds for high CPU utilization on RDS. If not set, automatic mode is used.

Element Type Description Required
cpuUsagePercentage integer

Alert if CPU usage is higher than X% in 3 out of 5 samples.

required

The ConfigurationMetadata object

Metadata useful for debugging

Element Type Description Required
configurationVersions integer[]

A Sorted list of the version numbers of the configuration.

optional
clusterVersion string

DESK server version.

optional

Response format

A successful request doesn't return any content.

Validate payload

We recommend that you validate the payload before submitting it with an actual request. A response code of 204 indicates a valid payload.

The request consumes an application/json payload.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/anomalyDetection/aws/validator
  • SaaS https://{your-environment-id}.live.dexp.ae/api/config/v1/anomalyDetection/aws/validator

Response codes

Code Description
204 Validated. The submitted configuration is valid. Response doesn't have a body.
400 Failed. The input is invalid.

Example

In this example, the request updates the configuration of anomaly detection for AWS from the GET request example. It switches high CPU utilization on RDS detection to custom threshold mode and sets a threshold of 90%. It also disables RDS running out of memory detection.

The API token is passed in the Authorization header.

You can download or copy the example request body to try it out on your own. Be sure to create a backup copy of your current configuration with the GET AWS anomaly detection configuration call.

Curl

curl -X PUT \
  https://mySampleEnv.live.dexp.ae/api/config/v1/anomalyDetection/aws \
  -H 'Authorization: Api-token abcdefjhij1234567890' \  
  -H 'Content-Type: application/json' \  
  -d '{
  "rdsHighCpuDetection": {
    "enabled": true,
    "customThresholds": {
      "cpuUsagePercentage": 90
    }
  },
  "rdsHighWriteReadLatencyDetection": {
    "enabled": true
  },
  "rdsLowStorageDetection": {
    "enabled": true
  },
  "rdsHighMemoryDetection": {
    "enabled": false
  },
  "elbHighConnectionErrorsDetection": {
    "enabled": true
  },
  "rdsRestartsSequenceDetection": {
    "enabled": true
  },
  "lambdaHighErrorRateDetection": {
    "enabled": true
  }
}
'

Request URL

https://mySampleEnv.live.dexp.ae/api/config/v1/anomalyDetection/aws

Request body

api-examples/config/anomaly-detection/aws/put-config.json
Download
{
  "rdsHighCpuDetection": {
    "enabled": true,
    "customThresholds": {
      "cpuUsagePercentage": 90
    }
  },
  "rdsHighWriteReadLatencyDetection": {
    "enabled": true
  },
  "rdsLowStorageDetection": {
    "enabled": true
  },
  "rdsHighMemoryDetection": {
    "enabled": false
  },
  "elbHighConnectionErrorsDetection": {
    "enabled": true
  },
  "rdsRestartsSequenceDetection": {
    "enabled": true
  },
  "lambdaHighErrorRateDetection": {
    "enabled": true
  }
}

Response code

204

Result

The updated configuration has the following parameters:

Anomaly detection config - AWS - updated