Failure detection API - POST a parameter set
Creates a new failure detection parameter set.
The request consumes and produces an application/json
payload.
POST | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/service/failureDetection/parameterSelection/parameterSets |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/service/failureDetection/parameterSelection/parameterSets |
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 and returned as part of the response.
To find all model variations that depend on the type of the model, see JSON models.
Parameter | Type | Description | In | Required |
---|---|---|---|---|
body | Failure | The JSON body of the request. Contains the new failure detection parameter set. Dynatrace will generate a random UUID for you, if you don't specify an ID. | body | optional |
Request body objects
The FailureDetectionParameterSet
object
A set of failure detection parameters (FDP).
These parameters define the conditions of failure and success.
Element | Type | Description | Required |
---|---|---|---|
brokenLinkDomains | string[] | A list of domains for the special handling of the 404 HTTP response code. If the top domain of the Referer is presented in the list OR equals the top domain of the request's host, the 404 code is considered a failure. Only applicable when isHttp404NotFoundFailureEnabled is set to | optional |
clientSideMissingHttpCodeIsFailure | boolean | The missing HTTP response code on the client side is a failure ( If not set, | optional |
description | string | A short description of the FDP set. | optional |
exceptionOnAnyNodeExceptionPatterns | Exception | A list of faulty exceptions. If an exception on any node of the service matches any of these patterns it is considered a failure. | optional |
failingHttpCodesClientSide | string | A list of client side HTTP response codes that are considered a failure. The format is a list of ranges and individual values (for example, If not set, the range of | optional |
failingHttpCodesServerSide | string | A list of server side HTTP response codes that are considered a failure. The format is a list of ranges and individual values (for example, | optional |
http404NotFoundFailureEnabled | boolean | Special handling of the 404 HTTP response code is enabled ( Only applicable when 404 is NOT in the list of failing HTTP response codes and only for the server side. If not set, | optional |
id | string | The ID of the parameter set. | optional |
ignoreAllExceptions | boolean | If set to true all exceptions will be ignored. Which means defined exception patterns will not have any effect. | optional |
ignoreSpanFailureDetection | boolean | If set to true span failure detection will be ignored. | optional |
ignoredExceptionPatterns | Exception | A list of ignored exceptions. If an exception on the entry node of the service matches any of these patterns it is ignored by failure detection. | optional |
name | string | The display name of the FDP set. The length of the name is limited to 150 characters. | optional |
serverSideMissingHttpCodeIsFailure | boolean | The missing HTTP response code on the server side is a failure ( If not set, | optional |
successForcingExceptionPatterns | Exception | A list of success exceptions. If an exception on the entry node of the service matches any of these patterns it is considered a success. | optional |
tagConditions | Fdp | A list of tag-based conditions. If any condition is fulfilled the request is considered a failure. | optional |
The ExceptionPattern
object
A list of faulty exceptions.
If an exception on any node of the service matches any of these patterns it is considered a failure.
Element | Type | Description | Required |
---|---|---|---|
classPattern | string | - | optional |
messagePattern | string | - | optional |
The FdpTagCondition
object
Configuration of the tag condition in the FDP set.
Element | Type | Description | Required |
---|---|---|---|
predicate | Fdp | The predicate that tests the value of the tag. The actual set of fields depends on the type of the predicate. Find the list of actual objects in the description of the type field or see Failure detection API - JSON models. | required |
tagKey | string | The key of the tag to be checked. | required |
The FdpTagPredicate
object
The predicate that tests the value of the tag.
The actual set of fields depends on the type of the predicate. Find the list of actual objects in the description of the type field or see Failure detection API - JSON models.
Element | Type | Description | Required |
---|---|---|---|
type | string | Defines the actual set of fields depending on the value. See one of the following objects:
| required |
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.
{"brokenLinkDomains": ["mydomain.com"],"clientSideMissingHttpCodeIsFailure": false,"description": "for requests from shipping module","failingHttpCodesClientSide": "400-599","failingHttpCodesServerSide": "500-599","http404NotFoundFailureEnabled": false,"id": "FDP_9","name": "shipping","serverSideMissingHttpCodeIsFailure": false,"successForcingExceptionPatterns": [{"classPattern": "NullPointerException","messagePattern": ""}],"tagConditions": [{"predicate": {"ignoreCase": true,"type": "STRING_EQUALS","value": "NG"},"tagKey": "myTag"}]}
Response
Response codes
Code | Type | Description |
---|---|---|
201 | Entity | Success. The new failure detection parameter set has been created. The response contains the ID of the new set. |
400 | Error | Failed. The input is invalid. |
Response body objects
The EntityShortRepresentation
object
The 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. |
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.
POST | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/service/failureDetection/parameterSelection/parameterSets/validator |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/service/failureDetection/parameterSelection/parameterSets/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
Code | Type | Description |
---|---|---|
204 | - | Success. The configuration has been updated. Response doesn't have a body. |
400 | Error | Failed. The input is invalid. |