Creates a new service-level objective (SLO) alert.
The request consumes an application/json
payload.
POST | SaaS | https://{your-environment-id}.live.dynatrace.com/api/v2/slo/{id}/alert |
Environment ActiveGateCluster ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v2/slo/{id}/alert |
To execute this request, you need an access token with slo.write
scope.
To learn how to obtain and use it, see Tokens and authentication.
The start of the requested timeframe.
You can use one of the following formats:
2021-01-25T05:57:01.123+01:00
. If no time zone is specified, UTC is used. You can use a space character instead of the T
. Seconds and fractions of a second are optional.now-NU/A
, where N
is the amount of time, U
is the unit of time, and A
is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w
is one year back, aligned by a week.
You can also specify relative timeframe without an alignment: now-NU
.
Supported time units for the relative timeframe are:
m
: minutesh
: hoursd
: daysw
: weeksM
: monthsy
: yearsIf not set, the relative timeframe of two weeks is used (now-2w
).
The end of the requested timeframe.
You can use one of the following formats:
2021-01-25T05:57:01.123+01:00
. If no time zone is specified, UTC is used. You can use a space character instead of the T
. Seconds and fractions of a second are optional.now-NU/A
, where N
is the amount of time, U
is the unit of time, and A
is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w
is one year back, aligned by a week.
You can also specify relative timeframe without an alignment: now-NU
.
Supported time units for the relative timeframe are:
m
: minutesh
: hoursd
: daysw
: weeksM
: monthsy
: yearsIf not set, the current timestamp is used.
The timeframe to calculate the SLO values:
CURRENT
: SLO's own timeframe.GTF
: timeframe specified by from and to parameters.If not set, the CURRENT
value is used.
CURRENT
GTF
The ID of the required SLO.
The JSON body of the request. Contains the parameters of the new SLO alert.
AbstractSloAlertDto
objectName of the alert.
Threshold of the alert. Status alerts trigger if they fall below this value, burn rate alerts trigger if they exceed the value.
Defines the actual set of fields depending on the value. See one of the following objects:
BURN_RATE
-> BurnRateAlertSTATUS
-> StatusAlertBURN_RATE
STATUS
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"alertName": "Payment service availability burn rate alert","alertThreshold": 10,"alertType": "BURN_RATE"}
Success. The new alert has been created. The response contains the parameters of the new alert. The location response header contains the ID of the new alert.
Precondition for creating an SLO alert not fulfilled. The SLO func metric cannot be created or is not created by the SLO.
EntityShortRepresentation
objectThe short representation of a Dynatrace entity.
A short description of the Dynatrace entity.
The ID of the Dynatrace entity.
The name of the Dynatrace entity.
{"description": "Dynatrace entity for the REST API example","id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a","name": "Dynatrace entity"}