Creates a new failure detection rule.
The new rule is appended to the end of the rule list. Rules are evaluated from top to bottom; the first matching rule applies. To enforce a particular order, use the reorder request.
The failure detection parameter set used by the rule must exist at the time of rule creation.
The request produces and consumes an application/json
payload.
POST | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/service/failureDetection/parameterSelection/rules |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/service/failureDetection/parameterSelection/rules |
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 and returned as part of the response.
To find all model variations that depend on the type of the model, see JSON models.
The JSON body of the request. Contains the configuration of the new failure detection rule.
Dynatrace will generate a random UUID for you, if you don't specify an ID.
FailureDetectionRule
objectConfiguration of the failure detection rule.
A list of conditions of the rule.
The rule applies when all conditions are fulfilled.
A short description of the rule.
The rule is enabled (true
) or disabled (false
).
The failure detection parameter (FDP) set of the rule.
Specify the ID of the set here. The FDP set must exist at the time of rule creation.
The ID of the rule.
The display name of the rule.
The length of the name is limited to 150 characters.
FailureDetectionCondition
objectThe condition of the failure detection rule.
The attribute to be checked.
PG_NAME
PG_TAG
SERVICE_MANAGEMENT_ZONES
SERVICE_NAME
SERVICE_SERVICE_TYPE
SERVICE_TAG
The predicate that tests the value of the attribute.
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.
FdcPredicate
objectThe predicate that tests the value of the attribute.
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.
Defines the actual set of fields depending on the value. See one of the following objects:
STRING_EQUALS
-> FdcPredicateStringEqualsSTRING_STARTS_WITH
-> FdcPredicateStringStartsWithSTRING_ENDS_WITH
-> FdcPredicateStringEndsWithSTRING_CONTAINS_SUBSTRING
-> FdcPredicateStringContainsINTEGER_EQUALS
-> FdcPredicateIntegerEqualsINTEGER_LESS_THAN
-> FdcPredicateIntegerLessThanINTEGER_LESS_THAN_OR_EQUAL
-> FdcPredicateIntegerLessThanOrEqualINTEGER_GREATER_THAN
-> FdcPredicateIntegerGreaterThanINTEGER_GREATER_THAN_OR_EQUAL
-> FdcPredicateIntegerGreaterThanOrEqualLONG_EQUALS
-> FdcPredicateLongEqualsLONG_LESS_THAN
-> FdcPredicateLongLessThanLONG_LESS_THAN_OR_EQUAL
-> FdcPredicateLongLessThanOrEqualLONG_GREATER_THAN
-> FdcPredicateLongGreaterThanLONG_GREATER_THAN_OR_EQUAL
-> FdcPredicateLongGreaterThanOrEqualTAG_KEY_EQUALS
-> FdcPredicateTagKeyEqualsTAG_EQUALS
-> FdcPredicateTagEqualsSERVICE_TYPE_EQUALS
-> FdcPredicateServiceTypeEqualsMANAGEMENT_ZONES_CONTAINS_ALL
-> FdcPredicateManagementZonesContainsAllSET_OF_INTEGERS_CONTAINS_ANY
-> FdcPredicateSetOfIntegersContainsAnySET_OF_INTEGERS_CONTAINS_ALL
-> FdcPredicateSetOfIntegersContainsAllINTEGER_EQUALS
INTEGER_GREATER_THAN
INTEGER_GREATER_THAN_OR_EQUAL
INTEGER_LESS_THAN
INTEGER_LESS_THAN_OR_EQUAL
LONG_EQUALS
LONG_GREATER_THAN
LONG_GREATER_THAN_OR_EQUAL
LONG_LESS_THAN
LONG_LESS_THAN_OR_EQUAL
MANAGEMENT_ZONES_CONTAINS_ALL
SERVICE_TYPE_EQUALS
SET_OF_INTEGERS_CONTAINS_ALL
SET_OF_INTEGERS_CONTAINS_ANY
STRING_CONTAINS_SUBSTRING
STRING_ENDS_WITH
STRING_EQUALS
STRING_STARTS_WITH
TAG_EQUALS
TAG_KEY_EQUALS
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"conditions": [{"attribute": "SERVICE_NAME","predicate": {"ignoreCase": false,"type": "STRING_STARTS_WITH","values": ["shp","stg_shp"]}}],"description": "for requests from shipping module","enabled": true,"fdpId": "FDP_9","id": "R_5","name": "shipping"}
Success. The new failure detection rule has been created. The response contains the ID of the new rule.
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"}
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/rules/validator |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/service/failureDetection/parameterSelection/rules/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.
Success. The submitted configuration is valid. Response doesn't have a body.