Updates the configuration of anomaly detection for hosts.
The request consumes an application/json
payload.
PUT | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/anomalyDetection/hosts |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/anomalyDetection/hosts |
To execute this request, you need an access token with WriteConfig
scope.
To learn how to obtain and use it, see Tokens and authentication.
The JSON body of the request. Contains parameters of the host anomaly detection configuration.
HostsAnomalyDetectionConfig
objectConfiguration of anomaly detection for hosts.
Configuration of lost connection detection.
Configuration of low disk inodes number detection.
Configuration of slow running disks detection.
Configuration of high CPU saturation detection
Configuration of high Garbage Collector activity detection.
Configuration of high network utilization detection.
Configuration of high number of dropped packets detection.
Configuration of high number of network errors detection.
Configuration of high retransmission rate detection.
Configuration of TCP connectivity problems detection.
Configuration of Java out of memory problems detection.
Configuration of Java out of threads problems detection.
ConnectionLostDetectionConfig
objectConfiguration of lost connection detection.
The detection is enabled (true
) or disabled (false
).
Alert (true
) on graceful host shutdowns.
DiskLowInodesDetectionConfig
objectConfiguration of low disk inodes number detection.
Custom thresholds for low disk inodes number. If not set, automatic mode is used.
The detection is enabled (true
) or disabled (false
).
DiskLowInodesThresholds
objectCustom thresholds for low disk inodes number. If not set, automatic mode is used.
Alert if percentage of available inodes is lower than X% in 3 out of 5 samples.
DiskLowSpaceDetectionConfig
objectConfiguration of low disk space detection.
Custom thresholds for low disk space. If not set, automatic mode is used.
The detection is enabled (true
) or disabled (false
).
DiskLowSpaceThresholds
objectCustom thresholds for low disk space. If not set, automatic mode is used.
Alert if free disk space is lower than X% in 3 out of 5 samples.
DiskSlowWritesAndReadsDetectionConfig
objectConfiguration of slow running disks detection.
Custom thresholds for slow running disks. If not set, the automatic mode is used.
The detection is enabled (true
) or disabled (false
).
DiskSlowWriteAndReadsThresholds
objectCustom thresholds for slow running disks. If not set, the automatic mode is used.
Alert if disk read/write time is higher than X milliseconds in 3 out of 5 samples.
HighCpuSaturationDetectionConfig
objectConfiguration of high CPU saturation detection
Custom thresholds for high CPU saturation. If not set then the automatic mode is used.
The detection is enabled (true
) or disabled (false
).
HighCpuSaturationThresholds
objectCustom thresholds for high CPU saturation. If not set then the automatic mode is used.
Alert if CPU usage is higher than X% in 3 out of 5 samples.
HighGcActivityDetectionConfig
objectConfiguration of high Garbage Collector activity detection.
Custom thresholds for high GC activity. If not set, automatic mode is used.
Meeting any of these conditions triggers an alert.
The detection is enabled (true
) or disabled (false
).
HighGcActivityThresholds
objectCustom thresholds for high GC activity. If not set, automatic mode is used.
Meeting any of these conditions triggers an alert.
GC suspension is higher than X% in 3 out of 5 samples.
GC time is higher than X% in 3 out of 5 samples.
HighMemoryDetectionConfig
objectConfiguration of high memory usage detection.
Custom thresholds for high memory usage. If not set then the automatic mode is used.
Both conditions must be met to trigger an alert.
The detection is enabled (true
) or disabled (false
).
HighMemoryThresholds
objectCustom thresholds for high memory usage. If not set then the automatic mode is used.
Both conditions must be met to trigger an alert.
Memory page fault rate is higher than X faults per second on Linux.
Memory page fault rate is higher than X faults per second on Windows.
Memory usage is higher than X% on Linux.
Memory usage is higher than X% on Windows.
HighNetworkDetectionConfig
objectConfiguration of high network utilization detection.
Custom thresholds for high network utilization. If not set, automatic mode is used.
The detection is enabled (true
) or disabled (false
).
HighNetworkThresholds
objectCustom thresholds for high network utilization. If not set, automatic mode is used.
Alert if sent/received traffic utilization is higher than X% in 3 out of 5 samples.
ConfigurationMetadata
objectMetadata useful for debugging
Dynatrace version.
A sorted list of the version numbers of the configuration.
A sorted list of version numbers of the configuration.
NetworkDroppedPacketsDetectionConfig
objectConfiguration of high number of dropped packets detection.
Custom thresholds for dropped packets. If not set, automatic mode is used.
All of these conditions must be met to trigger an alert.
The detection is enabled (true
) or disabled (false
).
NetworkDroppedPacketsThresholds
objectCustom thresholds for dropped packets. If not set, automatic mode is used.
All of these conditions must be met to trigger an alert.
Receive/transmit dropped packet percentage is higher than X% in 3 out of 5 samples.
Total receive/transmit packets rate is higher than X packets per second in 3 out of 5 samples.
NetworkErrorsDetectionConfig
objectConfiguration of high number of network errors detection.
Custom thresholds for network errors. If not set, automatic mode is used.
All of these conditions must be met to trigger an alert.
The detection is enabled (true
) or disabled (false
).
NetworkErrorsThresholds
objectCustom thresholds for network errors. If not set, automatic mode is used.
All of these conditions must be met to trigger an alert.
Receive/transmit error packet percentage is higher than X% in 3 out of 5 samples.
Total receive/transmit packets rate is higher than X packets per second in 3 out of 5 samples.
NetworkHighRetransmissionDetectionConfig
objectConfiguration of high retransmission rate detection.
Custom thresholds for high retransmission rate. If not set, automatic mode is used.
All of these conditions must be met to trigger an alert.
The detection is enabled (true
) or disabled (false
).
NetworkHighRetransmissionThresholds
objectCustom thresholds for high retransmission rate. If not set, automatic mode is used.
All of these conditions must be met to trigger an alert.
Retransmission rate is higher than X% in 3 out of 5 samples.
Number of retransmitted packets is higher than X packets per minute in 3 out of 5 samples.
NetworkTcpProblemsDetectionConfig
objectConfiguration of TCP connectivity problems detection.
Custom thresholds for TCP connection problems. If not set, automatic mode is used.
All of these conditions must be met to trigger an alert.
The detection is enabled (true
) or disabled (false
).
NetworkTcpProblemsThresholds
objectCustom thresholds for TCP connection problems. If not set, automatic mode is used.
All of these conditions must be met to trigger an alert.
Number of failed connections is higher than X connections per minute in 3 out of 5 samples.
Percentage of new connection failures is higher than X% in 3 out of 5 samples.
OutOfMemoryDetectionConfig
objectConfiguration of Java out of memory problems detection.
Custom thresholds for Java out of memory. If not set, automatic mode is used.
The detection is enabled (true
) or disabled (false
).
OutOfMemoryThresholds
objectCustom thresholds for Java out of memory. If not set, automatic mode is used.
Alert if the number of Java out of memory exceptions is X per minute or higher.
OutOfThreadsDetectionConfig
objectConfiguration of Java out of threads problems detection.
Custom thresholds for Java out of threads detection. If not set, automatic mode is used.
The detection is enabled (true
) or disabled (false
).
OutOfThreadsThresholds
objectCustom thresholds for Java out of threads detection. If not set, automatic mode is used.
Alert if the number of Java out of threads exceptions is X per minute or higher.
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"connectionLostDetection": {"enabled": true,"enabledOnGracefulShutdowns": true},"diskLowInodesDetection": {"customThresholds": {"freeInodesPercentage": 10},"enabled": true},"diskLowSpaceDetection": {"customThresholds": {"freeSpacePercentage": 10},"enabled": true},"diskSlowWritesAndReadsDetection": {"customThresholds": {"writeAndReadTime": 300},"enabled": true},"highCpuSaturationDetection": {"customThresholds": {"cpuSaturation": 90},"enabled": true},"highGcActivityDetection": {"customThresholds": {"gcSuspensionPercentage": 20,"gcTimePercentage": 35},"enabled": true},"highMemoryDetection": {"customThresholds": {"pageFaultsPerSecondNonWindows": 10,"pageFaultsPerSecondWindows": 50,"usedMemoryPercentageNonWindows": 85,"usedMemoryPercentageWindows": 85},"enabled": true},"highNetworkDetection": {"customThresholds": {"utilizationPercentage": 88},"enabled": true},"metadata": {"clusterVersion": "Mock version","configurationVersions": [4,2]},"networkDroppedPacketsDetection": {"customThresholds": {"droppedPacketsPercentage": 8,"totalPacketsRate": 8},"enabled": true},"networkErrorsDetection": {"customThresholds": {"errorsPercentage": 9,"totalPacketsRate": 9},"enabled": true},"networkHighRetransmissionDetection": {"customThresholds": {"retransmissionRatePercentage": 15,"retransmittedPacketsNumberPerMinute": 15},"enabled": true},"networkTcpProblemsDetection": {"customThresholds": {"failedConnectionsNumberPerMinute": 5,"newConnectionFailuresPercentage": 5},"enabled": true},"outOfMemoryDetection": {"customThresholds": {"outOfMemoryExceptionsNumber": 2},"enabled": true},"outOfThreadsDetection": {"customThresholds": {"outOfThreadsExceptionsNumber": 2},"enabled": true}}
Success. Configuration has been updated. Response doesn't have a body.
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 | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/anomalyDetection/hosts/validator |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/anomalyDetection/hosts/validator |
To execute this request, you need an access token with WriteConfig
scope.
To learn how to obtain and use it, see Tokens and authentication.
Validated. The submitted configuration is valid. Response doesn't have a body.
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:
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 -X PUT \https://mySampleEnv.live.dynatrace.com/api/config/v1/anomalyDetection/hosts \-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \-H 'Content-Type: application/json' \-d '{<truncated - see the Request body section below>}'
https://mySampleEnv.live.dynatrace.com/api/config/v1/anomalyDetection/hosts
{"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}}
204
The updated configuration has the following parameters: