Database anomaly detection API - GET configuration
Gets the configuration of anomaly detection for database services.
The request produces an application/json
payload.
GET | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/config/v1/anomalyDetection/databaseServices |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/anomalyDetection/databaseServices | |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/anomalyDetection/databaseServices |
Authentication
To execute this request, you need an access token with ReadConfig
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameters
The request doesn't provide any configurable parameters.
Response
Response codes
Code | Type | Description |
---|---|---|
200 | Database | Success |
Response body objects
The DatabaseAnomalyDetectionConfig
object
The configuration of the anomaly detection for database services.
Element | Type | Description |
---|---|---|
metadata | Configuration | Metadata useful for debugging |
responseTimeDegradation | Response | Configuration of response time degradation detection. |
loadDrop | Load | The configuration of load drops detection. |
loadSpike | Load | The configuration of load spikes detection. |
failureRateIncrease | Failure | Configuration of failure rate increase detection. |
databaseConnectionFailureCount | Database | Parameters of the failed database connections detection. The alert is triggered when failed connections number exceeds connectionFailsCount during any timePeriodMinutes minutes period. |
The ConfigurationMetadata
object
Metadata useful for debugging
Element | Type | Description |
---|---|---|
currentConfigurationVersions | string[] | A sorted list of version numbers of the configuration. |
configurationVersions | integer[] | A sorted list of the version numbers of the configuration. |
clusterVersion | string | Dynatrace version. |
The ResponseTimeDegradationDetectionConfig
object
Configuration of response time degradation detection.
Element | Type | Description |
---|---|---|
detectionMode | string | How to detect response time degradation: automatically, or based on fixed thresholds, or do not detect. |
automaticDetection | Response | Parameters of the response time degradation auto-detection. Required if the detectionMode is Violation of any criterion triggers an alert. |
thresholds | Response | Fixed thresholds for response time degradation detection. Required if detectionMode is |
The ResponseTimeDegradationAutodetectionConfig
object
Parameters 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 |
---|---|---|
responseTimeDegradationMilliseconds | integer | Alert if the response time degrades beyond X milliseconds. |
responseTimeDegradationPercent | integer | Alert if the response time degrades beyond X %. |
slowestResponseTimeDegradationMilliseconds | integer | Alert if the response time of the slowest 10% degrades beyond X milliseconds. |
slowestResponseTimeDegradationPercent | integer | Alert if the response time of the slowest 10% degrades beyond X %. |
loadThreshold | string | Minimal service load to detect response time degradation. Response time degradation of services with smaller load won't trigger alerts. |
The ResponseTimeDegradationThresholdConfig
object
Fixed thresholds for response time degradation detection.
Required if detectionMode is DETECT_USING_FIXED_THRESHOLDS
. Not applicable otherwise.
Element | Type | Description |
---|---|---|
responseTimeThresholdMilliseconds | integer | Response time during any 5-minute period to trigger an alert, in milliseconds. |
slowestResponseTimeThresholdMilliseconds | integer | Response time of the 10% slowest during any 5-minute period to trigger an alert, in milliseconds. |
loadThreshold | string | Minimal service load to detect response time degradation. Response time degradation of services with smaller load won't trigger alerts. |
sensitivity | string | Sensitivity of the threshold. With With |
The LoadDropDetectionConfig
object
The configuration of load drops detection.
Element | Type | Description |
---|---|---|
enabled | boolean | The detection is enabled ( |
loadDropPercent | integer | Alert if the observed load is less than X % of the expected value. |
minAbnormalStateDurationInMinutes | integer | Alert if the service stays in abnormal state for at least X minutes. |
The LoadSpikeDetectionConfig
object
The configuration of load spikes detection.
Element | Type | Description |
---|---|---|
enabled | boolean | The detection is enabled ( |
loadSpikePercent | integer | Alert if the observed load is more than X % of the expected value. |
minAbnormalStateDurationInMinutes | integer | Alert if the service stays in abnormal state for at least X minutes. |
The FailureRateIncreaseDetectionConfig
object
Configuration of failure rate increase detection.
Element | Type | Description |
---|---|---|
detectionMode | string | How to detect failure rate increase: automatically, or based on fixed thresholds, or do not detect. |
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% |
thresholds | Failure | Fixed thresholds for failure rate increase detection. Required if detectionMode is |
The FailureRateIncreaseAutodetectionConfig
object
Parameters 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 |
---|---|---|
failingServiceCallPercentageIncreaseAbsolute | integer | Absolute increase of failing service calls to trigger an alert, %. |
failingServiceCallPercentageIncreaseRelative | integer | Relative increase of failing service calls to trigger an alert, %. |
The FailureRateIncreaseThresholdConfig
object
Fixed thresholds for failure rate increase detection.
Required if detectionMode is DETECT_USING_FIXED_THRESHOLDS
. Not applicable otherwise.
Element | Type | Description |
---|---|---|
threshold | integer | Failure rate during any 5-minute period to trigger an alert, %. |
sensitivity | string | Sensitivity of the threshold. With With |
The DatabaseConnectionFailureDetectionConfig
object
Parameters of the failed database connections detection.
The alert is triggered when failed connections number exceeds connectionFailsCount during any timePeriodMinutes minutes period.
Element | Type | Description |
---|---|---|
enabled | boolean | The detection is enabled ( |
connectionFailsCount | integer | Number of failed database connections during any timePeriodMinutes minutes period to trigger an alert. |
timePeriodMinutes | integer | The X minutes time period during which the connectionFailsCount is evaluated. |
Response body JSON model
{
"responseTimeDegradation": {
"detectionMode": "DETECT_AUTOMATICALLY",
"automaticDetection": {
"responseTimeDegradationMilliseconds": 250,
"responseTimeDegradationPercent": 90,
"slowestResponseTimeDegradationMilliseconds": 500,
"slowestResponseTimeDegradationPercent": 200,
"loadThreshold": "ONE_REQUEST_PER_MINUTE"
}
},
"loadDrop": {
"enabled": true,
"loadDropPercent": 40,
"minAbnormalStateDurationInMinutes": 5
},
"loadSpike": {
"enabled": false
},
"failureRateIncrease": {
"detectionMode": "DETECT_USING_FIXED_THRESHOLDS",
"thresholds": {
"threshold": 10,
"sensitivity": "LOW"
}
},
"databaseConnectionFailureCount": {
"enabled": "true",
"connectionFailsCount": 5,
"timePeriodMinutes": 5
}
}
Example
In this example, the request lists the current configuration of anomaly detection for database services.
The API token is passed in the Authorization header.
The configuration has the following settings:
Curl
curl -X GET \
https://mySampleEnv.live.dynatrace.com/api/config/v1/anomalyDetection/databaseServices \
-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'
Request URL
https://mySampleEnv.live.dynatrace.com/api/config/v1/anomalyDetection/databaseServices
Response body
{
"metadata": {
"clusterVersion": "1.163.2.20190201-072431",
"configurationVersions": [
3
]
},
"responseTimeDegradation": {
"detectionMode": "DONT_DETECT"
},
"failureRateIncrease": {
"detectionMode": "DETECT_USING_FIXED_THRESHOLDS",
"thresholds": {
"threshold": 0,
"sensitivity": "LOW"
}
},
"databaseConnectionFailureCount": {
"enabled": true,
"connectionFailsCount": 5,
"timePeriodMinutes": 5
}
}
Response code
200