Updates the configuration of anomaly detection for services.
The request consumes an application/json
payload.
PUT | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/anomalyDetection/services |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/anomalyDetection/services |
To execute this request, you need an access token with WriteConfig
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameter | Type | Description | In | Required |
---|---|---|---|---|
body | Service | The JSON body of the request. Contains parameters of the service anomaly detection configuration. | body | optional |
ServiceAnomalyDetectionConfig
objectDynatrace automatically detects service-related performance anomalies such as response time degradations and failure rate increases. Use these settings to configure detection sensitivity, set alert thresholds, or disable alerting for certain services.
Element | Type | Description | Required |
---|---|---|---|
failureRateIncrease | Failure | Configuration of failure rate increase detection. | required |
loadDrop | Load | The configuration of load drops detection. | optional |
loadSpike | Load | The configuration of load spikes detection. | optional |
metadata | Configuration | Metadata useful for debugging | optional |
responseTimeDegradation | Response | Configuration of response time degradation detection. | required |
FailureRateIncreaseDetectionConfig
objectConfiguration of failure rate increase detection.
Element | Type | Description | Required |
---|---|---|---|
automaticDetection | Failure | Parameters of failure rate increase auto-detection. Required if detectionMode is The absolute and relative thresholds both must exceed to trigger an alert. Example: If the expected error rate is 1.5%, and you set an absolute increase of 1%, and a relative increase of 50%, the thresholds will be: Absolute: 1.5% + 1% = 2.5% Relative: 1.5% + 1.5% * 50% = 2.25% | optional |
detectionMode | string | How to detect failure rate increase: automatically, or based on fixed thresholds, or do not detect.
| required |
thresholds | Failure | Fixed thresholds for failure rate increase detection. Required if detectionMode is | optional |
FailureRateIncreaseAutodetectionConfig
objectParameters of failure rate increase auto-detection. Required if detectionMode is DETECT_AUTOMATICALLY
. Not applicable otherwise.
The absolute and relative thresholds both must exceed to trigger an alert.
Example: If the expected error rate is 1.5%, and you set an absolute increase of 1%, and a relative increase of 50%, the thresholds will be: Absolute: 1.5% + 1% = 2.5% Relative: 1.5% + 1.5% * 50% = 2.25%
Element | Type | Description | Required |
---|---|---|---|
failingServiceCallPercentageIncreaseAbsolute | integer | Absolute increase of failing service calls to trigger an alert, %. | required |
failingServiceCallPercentageIncreaseRelative | integer | Relative increase of failing service calls to trigger an alert, %. | required |
FailureRateIncreaseThresholdConfig
objectFixed thresholds for failure rate increase detection.
Required if detectionMode is DETECT_USING_FIXED_THRESHOLDS
. Not applicable otherwise.
Element | Type | Description | Required |
---|---|---|---|
sensitivity | string | Sensitivity of the threshold. With With
| required |
threshold | integer | Failure rate during any 5-minute period to trigger an alert, %. | required |
LoadDropDetectionConfig
objectThe configuration of load drops detection.
Element | Type | Description | Required |
---|---|---|---|
enabled | boolean | The detection is enabled ( | required |
loadDropPercent | integer | Alert if the observed load is less than X % of the expected value. | optional |
minAbnormalStateDurationInMinutes | integer | Alert if the service stays in abnormal state for at least X minutes. | optional |
LoadSpikeDetectionConfig
objectThe configuration of load spikes detection.
Element | Type | Description | Required |
---|---|---|---|
enabled | boolean | The detection is enabled ( | required |
loadSpikePercent | integer | Alert if the observed load is more than X % of the expected value. | optional |
minAbnormalStateDurationInMinutes | integer | Alert if the service stays in abnormal state for at least X minutes. | optional |
ConfigurationMetadata
objectMetadata useful for debugging
Element | Type | Description | Required |
---|---|---|---|
clusterVersion | string | Dynatrace version. | optional |
configurationVersions | integer[] | A sorted list of the version numbers of the configuration. | optional |
currentConfigurationVersions | string[] | A sorted list of version numbers of the configuration. | optional |
ResponseTimeDegradationDetectionConfig
objectConfiguration of response time degradation detection.
Element | Type | Description | Required |
---|---|---|---|
automaticDetection | Response | Parameters of the response time degradation auto-detection. Required if the detectionMode is Violation of any criterion triggers an alert. | optional |
detectionMode | string | How to detect response time degradation: automatically, or based on fixed thresholds, or do not detect.
| required |
thresholds | Response | Fixed thresholds for response time degradation detection. Required if detectionMode is | optional |
ResponseTimeDegradationAutodetectionConfig
objectParameters of the response time degradation auto-detection. Required if the detectionMode is DETECT_AUTOMATICALLY
. Not applicable otherwise.
Violation of any criterion triggers an alert.
Element | Type | Description | Required |
---|---|---|---|
loadThreshold | string | Minimal service load to detect response time degradation. Response time degradation of services with smaller load won't trigger alerts.
| required |
responseTimeDegradationMilliseconds | integer | Alert if the response time degrades beyond X milliseconds. | required |
responseTimeDegradationPercent | integer | Alert if the response time degrades beyond X %. | required |
slowestResponseTimeDegradationMilliseconds | integer | Alert if the response time of the slowest 10% degrades beyond X milliseconds. | required |
slowestResponseTimeDegradationPercent | integer | Alert if the response time of the slowest 10% degrades beyond X %. | required |
ResponseTimeDegradationThresholdConfig
objectFixed thresholds for response time degradation detection.
Required if detectionMode is DETECT_USING_FIXED_THRESHOLDS
. Not applicable otherwise.
Element | Type | Description | Required |
---|---|---|---|
loadThreshold | string | Minimal service load to detect response time degradation. Response time degradation of services with smaller load won't trigger alerts.
| required |
responseTimeThresholdMilliseconds | integer | Response time during any 5-minute period to trigger an alert, in milliseconds. | required |
sensitivity | string | Sensitivity of the threshold. With With
| required |
slowestResponseTimeThresholdMilliseconds | integer | Response time of the 10% slowest during any 5-minute period to trigger an alert, in milliseconds. | required |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"failureRateIncrease": {"detectionMode": "DETECT_USING_FIXED_THRESHOLDS","thresholds": {"sensitivity": "LOW","threshold": 10}},"loadDrop": {"enabled": true,"loadDropPercent": 40,"minAbnormalStateDurationInMinutes": 5},"loadSpike": {"enabled": false},"metadata": {"clusterVersion": "Mock version","configurationVersions": [4,2]},"responseTimeDegradation": {"automaticDetection": {"loadThreshold": "ONE_REQUEST_PER_MINUTE","responseTimeDegradationMilliseconds": 250,"responseTimeDegradationPercent": 90,"slowestResponseTimeDegradationMilliseconds": 500,"slowestResponseTimeDegradationPercent": 200},"detectionMode": "DETECT_AUTOMATICALLY"}}
Code | Type | Description |
---|---|---|
204 | - | Success. Configuration has been updated. Response doesn't have a body. |
400 | Error | Failed. The input is invalid |
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/services/validator |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/anomalyDetection/services/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.
Code | Type | Description |
---|---|---|
204 | - | Validated. The submitted configuration is valid. Response doesn't have a body. |
400 | Error | Failed. The input is invalid |
In this example, the request updates the configuration of anomaly detection for services from the GET request example. It changes the Detect increase in failure rate mode to used fixed thresholds and sets the following threshold with high sensitivity:
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 services anomaly detection configuration call.
curl -X PUT \https://mySampleEnv.live.dynatrace.com/api/config/v1/anomalyDetection/services \-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \-H 'Content-Type: application/json' \-d '{"responseTimeDegradation": {"detectionMode": "DETECT_AUTOMATICALLY","automaticDetection": {"responseTimeDegradationMilliseconds": 100,"responseTimeDegradationPercent": 50,"slowestResponseTimeDegradationMilliseconds": 100,"slowestResponseTimeDegradationPercent": 100,"loadThreshold": "TEN_REQUESTS_PER_MINUTE"}},"failureRateIncrease": {"detectionMode": "DETECT_USING_FIXED_THRESHOLDS","thresholds": {"threshold": 3,"sensitivity": "HIGH"}}}'
PUT https://mySampleEnv.live.dynatrace.com/api/config/v1/anomalyDetection/services
{"responseTimeDegradation": {"detectionMode": "DETECT_AUTOMATICALLY","automaticDetection": {"responseTimeDegradationMilliseconds": 100,"responseTimeDegradationPercent": 50,"slowestResponseTimeDegradationMilliseconds": 100,"slowestResponseTimeDegradationPercent": 100,"loadThreshold": "TEN_REQUESTS_PER_MINUTE"}},"failureRateIncrease": {"detectionMode": "DETECT_USING_FIXED_THRESHOLDS","thresholds": {"threshold": 3,"sensitivity": "HIGH"}}}
204
The updated configuration has the following parameters: