Host anomaly detection API - PUT configuration

Updates the configuration of anomaly detection for applications.

The request consumes an application/json payload.

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

Parameters

Parameter Type Description In Required
body HostsAnomalyDetectionConfig

The JSON body of the request. Contains parameters of the host anomaly detection configuration.

body optional

The HostsAnomalyDetectionConfig object

Configuration of anomaly detection for hosts.

Element Type Description Required
metadata ConfigurationMetadata

Metadata useful for debugging.

optional
connectionLostDetection ConnectionLostDetectionConfig

How to detect lost connection.

required
highCpuSaturationDetection HighCpuSaturationDetectionConfig

How to detect high CPU saturation.

required
highMemoryDetection HighMemoryDetectionConfig

How to detect high memory usage.

required
highGcActivityDetection HighGcActivityDetectionConfig

How to detect high Garbage Collector activity.

required
outOfMemoryDetection OutOfMemoryDetectionConfig

How to detect Java out of memory problems.

required
outOfThreadsDetection OutOfThreadsDetectionConfig

How to detect Java out of threads problems.

required
networkDroppedPacketsDetection NetworkDroppedPacketsDetectionConfig

How to detect high number of dropped packets.

required
networkErrorsDetection NetworkErrorsDetectionConfig

How to detect high number of network errors.

required
highNetworkDetection HighNetworkDetectionConfig

How to detect high network utilization.

required
networkTcpProblemsDetection NetworkTcpProblemsDetectionConfig

How to detect TCP connectivity problems.

required
networkHighRetransmissionDetection NetworkHighRetransmissionDetectionConfig

How to detect high retransmission rate.

required
diskLowSpaceDetection DiskLowSpaceDetectionConfig

How to detect low disk space.

required
diskSlowWritesAndReadsDetection DiskSlowWritesAndReadsDetectionConfig

How to detect slow running disks.

required
diskLowInodesDetection DiskLowInodesDetectionConfig

How to detect low disk inodes number.

required

The DiskLowInodesDetectionConfig object

Configuration of low disk inodes number detection.

Element Type Description Required
enabled boolean

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

required
customThresholds DiskLowInodesThresholds

Custom thresholds for low disk inodes number. If not set, automatic mode is used.

optional

The DiskLowInodesThresholds object

Custom thresholds for low disk inodes number. If not set, automatic mode is used.

Element Type Description Required
freeInodesPercentage integer

Alert if percentage of available inodes is lower than X% in 3 out of 5 samples.

required

The DiskSlowWritesAndReadsDetectionConfig object

Configuration of slow running disks detection.

Element Type Description Required
enabled boolean

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

required
customThresholds DiskSlowWriteAndReadsThresholds

Custom thresholds for slow running disks. If not set, automatic mode is used.

optional

The DiskSlowWriteAndReadsThresholds object

Custom thresholds for slow running disks. If not set, the automatic mode is used.

Element Type Description Required
writeAndReadTime integer

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

required

The DiskLowSpaceDetectionConfig object

Configuration of low disk space detection.

Element Type Description Required
enabled boolean

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

required
customThresholds DiskLowSpaceThresholds

Custom thresholds for low disk space. If not set, automatic mode is used.

optional

The DiskLowSpaceThresholds object

Custom thresholds for low disk space. If not set, automatic mode is used.

Element Type Description Required
freeSpacePercentage integer

Alert if free disk space is lower than X% in 3 out of 5 samples.

required

The NetworkHighRetransmissionDetectionConfig object

Configuration of high retransmission rate detection.

Element Type Description Required
enabled boolean

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

required
customThresholds NetworkHighRetransmissionThresholds

Custom thresholds for high retransmission rate. If not set, automatic mode is used.

All of these conditions must be met to trigger an alert.

optional

The NetworkHighRetransmissionThresholds object

Custom thresholds for high retransmission rate. If not set, automatic mode is used.

All of these conditions must be met to trigger an alert.

Element Type Description Required
retransmissionRatePercentage integer

Retransmission rate is higher than X% in 3 out of 5 samples.

required
retransmittedPacketsNumberPerMinute integer

Number of retransmitted packets is higher than X packets per minute in 3 out of 5 samples.

required

The NetworkTcpProblemsDetectionConfig object

Configuration of TCP connectivity problems detection.

Element Type Description Required
enabled boolean

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

required
customThresholds NetworkTcpProblemsThresholds

Custom thresholds for TCP connection problems. If not set, automatic mode is used.

All of these conditions must be met to trigger an alert.

optional

The NetworkTcpProblemsThresholds object

Custom thresholds for TCP connection problems. If not set, automatic mode is used.

All of these conditions must be met to trigger an alert.

Element Type Description Required
newConnectionFailuresPercentage integer

Percentage of new connection failures is higher than X% in 3 out of 5 samples.

required
failedConnectionsNumberPerMinute integer

Number of failed connections is higher than X connections per minute in 3 out of 5 samples.

required

The HighNetworkDetectionConfig object

Configuration of high network utilization detection.

Element Type Description Required
enabled boolean

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

required
customThresholds HighNetworkThresholds

Custom thresholds for high network utilization. If not set, automatic mode is used.

optional

The HighNetworkThresholds object

Custom thresholds for high network utilization. If not set, automatic mode is used.

Element Type Description Required
utilizationPercentage integer

Alert if sent/received traffic utilization is higher than X% in 3 out of 5 samples.

required

The NetworkErrorsDetectionConfig object

Configuration of high number of network errors detection.

Element Type Description Required
enabled boolean

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

required
customThresholds NetworkErrorsThresholds

Custom thresholds for network errors. If not set, automatic mode is used.

All of these conditions must be met to trigger an alert.

optional

The NetworkErrorsThresholds object

Custom thresholds for network errors. If not set, automatic mode is used.

All of these conditions must be met to trigger an alert.

Element Type Description Required
errorsPercentage integer

Receive/transmit error packet percentage is higher than X% in 3 out of 5 samples.

required
totalPacketsRate integer

Total receive/transmit packets rate is higher than X packets per second in 3 out of 5 samples.

required

The NetworkDroppedPacketsDetectionConfig object

Configuration of high number of dropped packets detection.

Element Type Description Required
enabled boolean

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

required
customThresholds NetworkDroppedPacketsThresholds

Custom thresholds for dropped packets. If not set, automatic mode is used.

All of these conditions must be met to trigger an alert.

optional

The NetworkDroppedPacketsThresholds object

Custom thresholds for dropped packets. If not set, automatic mode is used.

All of these conditions must be met to trigger an alert.

Element Type Description Required
droppedPacketsPercentage integer

Receive/transmit dropped packet percentage is higher than X% in 3 out of 5 samples.

required
totalPacketsRate integer

Total receive/transmit packets rate is higher than X packets per second in 3 out of 5 samples.

required

The OutOfThreadsDetectionConfig object

Configuration of Java out of threads problems detection.

Element Type Description Required
enabled boolean

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

required
customThresholds OutOfThreadsThresholds

Custom thresholds for Java out of threads detection. If not set, automatic mode is used.

optional

The OutOfThreadsThresholds object

Custom thresholds for Java out of threads detection. If not set, automatic mode is used.

Element Type Description Required
outOfThreadsExceptionsNumber integer

Alert if the number of Java out of threads exceptions is X per minute or higher.

required

The OutOfMemoryDetectionConfig object

Configuration of Java out of memory problems detection.

Element Type Description Required
enabled boolean

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

required
customThresholds OutOfMemoryThresholds

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

optional

The OutOfMemoryThresholds object

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

Element Type Description Required
outOfMemoryExceptionsNumber integer

Alert if the number of Java out of memory exceptions is X per minute or higher.

required

The HighGcActivityDetectionConfig object

Configuration of high Garbage Collector activity detection.

Element Type Description Required
enabled boolean

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

required
customThresholds HighGcActivityThresholds

Custom thresholds for high GC activity. If not set, automatic mode is used.

Meeting any of these conditions triggers an alert.

optional

The HighGcActivityThresholds object

Custom thresholds for high GC activity. If not set, automatic mode is used.

Meeting any of these conditions triggers an alert.

Element Type Description Required
gcTimePercentage integer

GC time is higher than X% in 3 out of 5 samples.

required
gcSuspensionPercentage integer

GC suspension is higher than X% in 3 out of 5 samples.

required

The HighMemoryDetectionConfig object

Configuration of high memory usage detection.

Element Type Description Required
enabled boolean

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

required
customThresholds HighMemoryThresholds

Custom thresholds for high memory usage. If not set, automatic mode is used.

Both conditions must be met to trigger an alert.

optional

The HighMemoryThresholds object

Custom thresholds for high memory usage. If not set then the automatic mode is used.

Both conditions must be met to trigger an alert.

Element Type Description Required
pageFaultsPerSecondWindows integer

Memory page fault rate is higher than X faults per second on Windows.

required
usedMemoryPercentageWindows integer

Memory usage is higher than X% on Windows.

required
pageFaultsPerSecondNonWindows integer

Memory page fault rate is higher than X faults per second on Linux.

required
usedMemoryPercentageNonWindows integer

Memory usage is higher than X% on Linux.

required

The HighCpuSaturationDetectionConfig object

Configuration of high CPU saturation detection

Element Type Description Required
enabled boolean

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

required
customThresholds HighCpuSaturationThresholds

Custom thresholds for high CPU saturation. If not set, automatic mode is used.

optional

The HighCpuSaturationThresholds object

Custom thresholds for high CPU saturation. If not set then the automatic mode is used.

Element Type Description Required
cpuSaturation integer

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

required

The ConnectionLostDetectionConfig object

Configuration of lost connection detection.

Element Type Description Required
enabled boolean

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

required
enabledOnGracefulShutdowns boolean

Alert (true) on graceful host shutdowns.

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/databaseServices/validator
  • SaaS https://{your-environment-id}.live.dexp.ae/api/config/v1/anomalyDetection/databaseServices/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 database services from the GET request example. It activates the Alert on graceful host shutdowns feature. It also changes Detect CPU saturation on host mode to based on custom settings and sets the following threshold:

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

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. First, be sure to create a backup copy of your current configuration with the GET host anomaly detection configuration call.

Curl

curl -X PUT \
  https://mySampleEnv.live.dexp.ae/api/config/v1/anomalyDetection/hosts \
  -H 'Authorization: Api-token abcdefjhij1234567890' \  
  -H 'Content-Type: application/json' \  
  -d '{
  "connectionLostDetection": {
    "enabled": true,
    "enabledOnGracefulShutdowns": true
  },
  "highCpuSaturationDetection": {
    "enabled": true,
    "customThresholds": {
      "cpuSaturation": 90
    }
  },
  "highMemoryDetection": {
    "enabled": true
  },
  "highGcActivityDetection": {
    "enabled": true
  },
  "outOfMemoryDetection": {
    "enabled": true
  },
  "outOfThreadsDetection": {
    "enabled": true
  },
  "networkDroppedPacketsDetection": {
    "enabled": true
  },
  "networkErrorsDetection": {
    "enabled": true
  },
  "highNetworkDetection": {
    "enabled": true
  },
  "networkTcpProblemsDetection": {
    "enabled": true
  },
  "networkHighRetransmissionDetection": {
    "enabled": true
  },
  "diskLowSpaceDetection": {
    "enabled": true
  },
  "diskSlowWritesAndReadsDetection": {
    "enabled": true
  },
  "diskLowInodesDetection": {
    "enabled": true
  }
}
'

Request URL

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

Request body

api-examples/config/anomaly-detection/hosts/put-config.json
Download
{
  "connectionLostDetection": {
    "enabled": true,
    "enabledOnGracefulShutdowns": true
  },
  "highCpuSaturationDetection": {
    "enabled": true,
    "customThresholds": {
      "cpuSaturation": 90
    }
  },
  "highMemoryDetection": {
    "enabled": true
  },
  "highGcActivityDetection": {
    "enabled": true
  },
  "outOfMemoryDetection": {
    "enabled": true
  },
  "outOfThreadsDetection": {
    "enabled": true
  },
  "networkDroppedPacketsDetection": {
    "enabled": true
  },
  "networkErrorsDetection": {
    "enabled": true
  },
  "highNetworkDetection": {
    "enabled": true
  },
  "networkTcpProblemsDetection": {
    "enabled": true
  },
  "networkHighRetransmissionDetection": {
    "enabled": true
  },
  "diskLowSpaceDetection": {
    "enabled": true
  },
  "diskSlowWritesAndReadsDetection": {
    "enabled": true
  },
  "diskLowInodesDetection": {
    "enabled": true
  }
}

Response code

204

Result

The updated configuration has the following parameters:

Anomaly detection config - hosts - updated