Alerting profiles API - POST a profile

This API is deprecated. Use the Settings API instead. Look for the Problem alerting profiles (builtin:alerting.profile) schema.

Creates a new alerting profile.

The request consumes and produces an application/json payload.

POSTSaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/alertingProfiles
Environment ActiveGatehttps://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/alertingProfiles

Authentication

To execute this request, you need an access token with WriteConfig scope.

To learn how to obtain and use it, see Tokens and authentication.

Parameters

The body must not provide an ID. An ID is assigned automatically by Dynatrace.

ParameterTypeDescriptionInRequired
bodyAlertingProfile

The JSON body of the request. Contains parameters of the new alerting profile.

bodyoptional

Request body objects

The AlertingProfile object

Configuration of an alerting profile.

ElementTypeDescriptionRequired
displayNamestring

The name of the alerting profile, displayed in the UI.

required
eventTypeFiltersAlertingEventTypeFilter[]

The list of event filters.

For all filters that are negated inside of these event filters, that is all "Predefined" as well as "Custom" (Title and/or Description) ones the AND logic applies. For all non-negated ones the OR logic applies. Between these two groups, negated and non-negated, the AND logic applies.

If you specify both severity rule and event filter, the AND logic applies.

optional
idstring

The ID of the alerting profile.

optional
metadataConfigurationMetadata

Metadata useful for debugging

optional
mzIdstring

The ID of the management zone to which the alerting profile applies.

optional
rulesAlertingProfileSeverityRule[]

A list of severity rules.

The rules are evaluated from top to bottom. The first matching rule applies and further evaluation stops.

If you specify both severity rule and event filter, the AND logic applies.

optional

The AlertingEventTypeFilter object

Configuration of the event filter for the alerting profile.

You have two mutually exclusive options:

  • Select an event type from the list of the predefined events. Specify it in the predefinedEventFilter field.
  • Set a rule for custom events. Specify it in the customEventFilter field.
ElementTypeDescriptionRequired
customEventFilterAlertingCustomEventFilter

Configuration of a custom event filter.

Filters custom events by title or description. If both specified, the AND logic applies.

optional
predefinedEventFilterAlertingPredefinedEventFilter

Configuration of a predefined event filter.

optional

The AlertingCustomEventFilter object

Configuration of a custom event filter.

Filters custom events by title or description. If both specified, the AND logic applies.

ElementTypeDescriptionRequired
customDescriptionFilterAlertingCustomTextFilter

Configuration of a matching filter.

optional
customTitleFilterAlertingCustomTextFilter

Configuration of a matching filter.

optional

The AlertingCustomTextFilter object

Configuration of a matching filter.

ElementTypeDescriptionRequired
caseInsensitiveboolean

The condition is case sensitive (false) or case insensitive (true).

If not set, then false is used, making the condition case sensitive.

required
enabledboolean

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

required
negateboolean

Reverses the comparison operator. For example it turns the begins with into does not begin with.

required
operatorstring

Operator of the comparison.

You can reverse it by setting negate to true.

  • BEGINS_WITH
  • CONTAINS
  • CONTAINS_REGEX
  • ENDS_WITH
  • EQUALS
required
valuestring

The value to compare to.

required

The AlertingPredefinedEventFilter object

Configuration of a predefined event filter.

ElementTypeDescriptionRequired
eventTypestring

The type of the predefined event.

  • APPLICATION_ERROR_RATE_INCREASED
  • APPLICATION_SLOWDOWN
  • APPLICATION_UNEXPECTED_HIGH_LOAD
  • APPLICATION_UNEXPECTED_LOW_LOAD
  • AWS_LAMBDA_HIGH_ERROR_RATE
  • CUSTOM_APPLICATION_ERROR_RATE_INCREASED
  • CUSTOM_APPLICATION_SLOWDOWN
  • CUSTOM_APPLICATION_UNEXPECTED_HIGH_LOAD
  • CUSTOM_APPLICATION_UNEXPECTED_LOW_LOAD
  • CUSTOM_APP_CRASH_RATE_INCREASED
  • DATABASE_CONNECTION_FAILURE
  • EBS_VOLUME_HIGH_LATENCY
  • EC2_HIGH_CPU
  • ELB_HIGH_BACKEND_ERROR_RATE
  • ESXI_GUEST_ACTIVE_SWAP_WAIT
  • ESXI_GUEST_CPU_LIMIT_REACHED
  • ESXI_HOST_CPU_SATURATION
  • ESXI_HOST_DATASTORE_LOW_DISK_SPACE
  • ESXI_HOST_DISK_QUEUE_SLOW
  • ESXI_HOST_DISK_SLOW
  • ESXI_HOST_MEMORY_SATURATION
  • ESXI_HOST_NETWORK_PROBLEMS
  • ESXI_HOST_OVERLOADED_STORAGE
  • ESXI_VM_IMPACT_HOST_CPU_SATURATION
  • ESXI_VM_IMPACT_HOST_MEMORY_SATURATION
  • EXTERNAL_SYNTHETIC_TEST_OUTAGE
  • EXTERNAL_SYNTHETIC_TEST_SLOWDOWN
  • HOST_OF_SERVICE_UNAVAILABLE
  • HTTP_CHECK_GLOBAL_OUTAGE
  • HTTP_CHECK_LOCAL_OUTAGE
  • HTTP_CHECK_TEST_LOCATION_SLOWDOWN
  • MOBILE_APPLICATION_ERROR_RATE_INCREASED
  • MOBILE_APPLICATION_SLOWDOWN
  • MOBILE_APPLICATION_UNEXPECTED_HIGH_LOAD
  • MOBILE_APPLICATION_UNEXPECTED_LOW_LOAD
  • MOBILE_APP_CRASH_RATE_INCREASED
  • MONITORING_UNAVAILABLE
  • MULTI_PROTOCOL_GLOBAL_OUTAGE
  • MULTI_PROTOCOL_LOCAL_OUTAGE
  • MULTI_PROTOCOL_LOCATION_SLOWDOWN
  • OSI_DISK_LOW_INODES
  • OSI_GRACEFULLY_SHUTDOWN
  • OSI_HIGH_CPU
  • OSI_HIGH_MEMORY
  • OSI_LOW_DISK_SPACE
  • OSI_NIC_DROPPED_PACKETS_HIGH
  • OSI_NIC_ERRORS_HIGH
  • OSI_NIC_UTILIZATION_HIGH
  • OSI_SLOW_DISK
  • OSI_UNEXPECTEDLY_UNAVAILABLE
  • PGI_OF_SERVICE_UNAVAILABLE
  • PGI_UNAVAILABLE
  • PG_LOW_INSTANCE_COUNT
  • PROCESS_CRASHED
  • PROCESS_HIGH_GC_ACTIVITY
  • PROCESS_MEMORY_RESOURCE_EXHAUSTED
  • PROCESS_NA_HIGH_CONN_FAIL_RATE
  • PROCESS_NA_HIGH_LOSS_RATE
  • PROCESS_THREADS_RESOURCE_EXHAUSTED
  • RDS_HIGH_CPU
  • RDS_HIGH_LATENCY
  • RDS_LOW_MEMORY
  • RDS_LOW_STORAGE_SPACE
  • RDS_OF_SERVICE_UNAVAILABLE
  • RDS_RESTART_SEQUENCE
  • SERVICE_ERROR_RATE_INCREASED
  • SERVICE_SLOWDOWN
  • SERVICE_UNEXPECTED_HIGH_LOAD
  • SERVICE_UNEXPECTED_LOW_LOAD
  • SYNTHETIC_GLOBAL_OUTAGE
  • SYNTHETIC_LOCAL_OUTAGE
  • SYNTHETIC_NODE_OUTAGE
  • SYNTHETIC_PRIVATE_LOCATION_OUTAGE
  • SYNTHETIC_TEST_LOCATION_SLOWDOWN
required
negateboolean

The alert triggers when the problem of specified severity arises while the specified event is happening (false) or while the specified event is not happening (true).

For example, if you chose the Slowdown (PERFORMANCE) severity and Unexpected high traffic (APPLICATION_UNEXPECTED_HIGH_LOAD) event with negate set to true, the alerting profile will trigger only when the slowdown problem is raised while there is no unexpected high traffic event.

Consider the following use case as an example. The Slowdown (PERFORMANCE) severity rule is set. Depending on the configuration of the event filter (Unexpected high traffic (APPLICATION_UNEXPECTED_HIGH_LOAD) event is used as an example), the behavior of the alerting profile is one of the following:* negate is set to false: The alert triggers when the slowdown problem is raised while unexpected high traffic event is happening.

  • negate is set to true: The alert triggers when the slowdown problem is raised while there is no unexpected high traffic event.

  • no event rule is set: The alert triggers when the slowdown problem is raised, regardless of any events.

required

The ConfigurationMetadata object

Metadata useful for debugging

ElementTypeDescriptionRequired
clusterVersionstring

Dynatrace version.

optional
configurationVersionsinteger[]

A sorted list of the version numbers of the configuration.

optional
currentConfigurationVersionsstring[]

A sorted list of version numbers of the configuration.

optional

The AlertingProfileSeverityRule object

A severity rule of the alerting profile.

A severity rule defines the level of severity that must be met before an alert is sent our for a detected problem. Additionally it restricts the alerting to certain monitored entities.

ElementTypeDescriptionRequired
delayInMinutesinteger

Send a notification if a problem remains open longer than X minutes.

required
severityLevelstring

The severity level to trigger the alert.

  • AVAILABILITY
  • CUSTOM_ALERT
  • ERROR
  • MONITORING_UNAVAILABLE
  • PERFORMANCE
  • RESOURCE_CONTENTION
required
tagFilterAlertingProfileTagFilter

Configuration of the tag filtering of the alerting profile.

required

The AlertingProfileTagFilter object

Configuration of the tag filtering of the alerting profile.

ElementTypeDescriptionRequired
includeModestring

The filtering mode:

  • INCLUDE_ANY: The rule applies to monitored entities that have at least one of the specified tags. You can specify up to 100 tags.
  • INCLUDE_ALL: The rule applies to monitored entities that have all of the specified tags. You can specify up to 10 tags.
  • NONE: The rule applies to all monitored entities.
  • INCLUDE_ALL
  • INCLUDE_ANY
  • NONE
required
tagFiltersTagFilter[]

A list of required tags.

optional

The TagFilter object

A tag-based filter of monitored entities.

ElementTypeDescriptionRequired
contextstring

The origin of the tag, such as AWS or Cloud Foundry.

Custom tags use the CONTEXTLESS value.

  • AWS
  • AWS_GENERIC
  • AZURE
  • CLOUD_FOUNDRY
  • CONTEXTLESS
  • ENVIRONMENT
  • GOOGLE_CLOUD
  • KUBERNETES
required
keystring

The key of the tag.

Custom tags have the tag value here.

required
valuestring

The value of the tag.

Not applicable to custom tags.

optional

Request body JSON model

This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.

{
"displayName": "sampleAlertingProfile",
"eventTypeFilters": [
{
"predefinedEventFilter": {
"eventType": "OSI_HIGH_CPU",
"negate": true
}
},
{
"customEventFilter": {
"customDescriptionFilter": {
"caseInsensitive": false,
"enabled": false,
"negate": true,
"operator": "CONTAINS",
"value": "filterValue"
},
"customTitleFilter": {
"caseInsensitive": true,
"enabled": true,
"negate": false,
"operator": "EQUALS",
"value": "filterValue"
}
}
}
],
"id": "12345678-abcd-1234-abcd-1234567890ab",
"mzId": "1",
"rules": [
{
"delayInMinutes": 60,
"severityLevel": "AVAILABILITY",
"tagFilter": {
"includeMode": "INCLUDE_ALL",
"tagFilters": [
{
"context": "AWS",
"key": "tagKey",
"value": "tagValue"
}
]
}
}
]
}

Response

Response codes

CodeTypeDescription
201EntityShortRepresentation

Success. The new alerting profile has been created. The response contains the ID of the new alerting profile.

400ErrorEnvelope

Failed. The input is invalid.

Response body objects

The EntityShortRepresentation object

The short representation of a Dynatrace entity.

ElementTypeDescription
descriptionstring

A short description of the Dynatrace entity.

idstring

The ID of the Dynatrace entity.

namestring

The name of the Dynatrace entity.

Response body JSON model

{
"description": "Dynatrace entity for the REST API example",
"id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a",
"name": "Dynatrace entity"
}

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.

POSTSaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/alertingProfiles/validator
Environment ActiveGatehttps://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/alertingProfiles/validator

Authentication

To execute this request, you need an access token with WriteConfig scope.

To learn how to obtain and use it, see Tokens and authentication.

Response

Response codes

CodeTypeDescription
204-

Validated. The submitted alerting profile is valid. Response doesn't have a body

400ErrorEnvelope

Failed. The input is invalid.

Example

In this example, the request creates a new alerting profile with the following parameters:

  • Severity level: Availability, triggers after 2 minutes
  • Applies to monitored entities with MainApp tag.
  • Triggers when the Browser monitor global outage event is occurring.

The API token is passed in the Authorization header.

Because the request body is lengthy, it is truncated in this example Curl section. See the full body in the Request body section. You can download or copy the example request body to try it out on your own. Before using it, make sure that you're using tags that are available in your environment.

Curl

curl -X POST \
https://mySampleEnv.live.dynatrace.com/api/config/v1/alertingProfiles \
-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \
-H 'Content-Type: application/json' \
-d '{<truncated - see the Request body section >}'

Request URL

https://mySampleEnv.live.dynatrace.com/api/config/v1/alertingProfiles

Request body

{
"displayName": "App availability",
"rules": [
{
"severityLevel": "AVAILABILITY",
"tagFilter": {
"includeMode": "INCLUDE_ANY",
"tagFilters": [
{
"context": "CONTEXTLESS",
"key": "MainApp"
}
]
},
"delayInMinutes": 2
}
],
"mzId": "9130632296508575249",
"eventTypeFilters": [
{
"predefinedEventFilter": {
"eventType": "SYNTHETIC_GLOBAL_OUTAGE",
"negate": false
}
}
]
}

Response body

{
"id": "19e50c27-8aed-408f-ad44-d6a1bf856f49",
"name": "App availability"
}

Response code

201

Result

The new alerting profile looks like this in the UI:

POST example