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.
POST | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/alertingProfiles |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/alertingProfiles |
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 body must not provide an ID. An ID is assigned automatically by Dynatrace.
Parameter | Type | Description | In | Required |
---|---|---|---|---|
body | Alerting | The JSON body of the request. Contains parameters of the new alerting profile. | body | optional |
AlertingProfile
objectConfiguration of an alerting profile.
Element | Type | Description | Required |
---|---|---|---|
displayName | string | The name of the alerting profile, displayed in the UI. | required |
eventTypeFilters | Alerting | 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 |
id | string | The ID of the alerting profile. | optional |
metadata | Configuration | Metadata useful for debugging | optional |
mzId | string | The ID of the management zone to which the alerting profile applies. | optional |
rules | Alerting | 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 |
AlertingEventTypeFilter
objectConfiguration of the event filter for the alerting profile.
You have two mutually exclusive options:
Element | Type | Description | Required |
---|---|---|---|
customEventFilter | Alerting | Configuration of a custom event filter. Filters custom events by title or description. If both specified, the AND logic applies. | optional |
predefinedEventFilter | Alerting | Configuration of a predefined event filter. | optional |
AlertingCustomEventFilter
objectConfiguration of a custom event filter.
Filters custom events by title or description. If both specified, the AND logic applies.
Element | Type | Description | Required |
---|---|---|---|
customDescriptionFilter | Alerting | Configuration of a matching filter. | optional |
customTitleFilter | Alerting | Configuration of a matching filter. | optional |
AlertingCustomTextFilter
objectConfiguration of a matching filter.
Element | Type | Description | Required |
---|---|---|---|
caseInsensitive | boolean | The condition is case sensitive ( If not set, then | required |
enabled | boolean | The filter is enabled ( | required |
negate | boolean | Reverses the comparison operator. For example it turns the begins with into does not begin with. | required |
operator | string | Operator of the comparison. You can reverse it by setting negate to
| required |
value | string | The value to compare to. | required |
AlertingPredefinedEventFilter
objectConfiguration of a predefined event filter.
Element | Type | Description | Required |
---|---|---|---|
eventType | string | The type of the predefined event.
| required |
negate | boolean | The alert triggers when the problem of specified severity arises while the specified event is happening ( For example, if you chose the Slowdown ( Consider the following use case as an example. The Slowdown (
| required |
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 |
AlertingProfileSeverityRule
objectA 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.
Element | Type | Description | Required |
---|---|---|---|
delayInMinutes | integer | Send a notification if a problem remains open longer than X minutes. | required |
severityLevel | string | The severity level to trigger the alert.
| required |
tagFilter | Alerting | Configuration of the tag filtering of the alerting profile. | required |
AlertingProfileTagFilter
objectConfiguration of the tag filtering of the alerting profile.
Element | Type | Description | Required |
---|---|---|---|
includeMode | string | The filtering mode:
| required |
tagFilters | Tag | A list of required tags. | optional |
TagFilter
objectA tag-based filter of monitored entities.
Element | Type | Description | Required |
---|---|---|---|
context | string | The origin of the tag, such as AWS or Cloud Foundry. Custom tags use the
| required |
key | string | The key of the tag. Custom tags have the tag value here. | required |
value | string | The value of the tag. Not applicable to custom tags. | optional |
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"}]}}]}
Code | Type | Description |
---|---|---|
201 | Entity | Success. The new alerting profile has been created. The response contains the ID of the new alerting profile. |
400 | Error | Failed. The input is invalid. |
EntityShortRepresentation
objectThe short representation of a Dynatrace entity.
Element | Type | Description |
---|---|---|
description | string | A short description of the Dynatrace entity. |
id | string | The ID of the Dynatrace entity. |
name | string | The name of the Dynatrace entity. |
{"description": "Dynatrace entity for the REST API example","id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a","name": "Dynatrace entity"}
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/alertingProfiles/validator |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/alertingProfiles/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 alerting profile is valid. Response doesn't have a body |
400 | Error | Failed. The input is invalid. |
In this example, the request creates a new alerting profile with the following parameters:
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 -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 >}'
https://mySampleEnv.live.dynatrace.com/api/config/v1/alertingProfiles
{"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}}]}
{"id": "19e50c27-8aed-408f-ad44-d6a1bf856f49","name": "App availability"}
201
The new alerting profile looks like this in the UI: