Failure detection API - POST a detection rule

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.

Early Adopter

This request is an Early Adopter release and may be changed in non-compatible way.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/service/failureDetection/parameterSelection/rules
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/service/failureDetection/parameterSelection/rules
  • Environment ActiveGate https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/service/failureDetection/parameterSelection/rules

Authentication

To execute this request, you need the Write configuration (WriteConfig) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.

Parameters

To find all model variations that depend on the type of the model, see JSON models.

Parameter Type Description In Required
body FailureDetectionRule

The JSON body of the request. Contains the configuration of the new failure detection rule.

Dynatrace does not generate the ID automatically; you must specify it.

body optional

Body format

The FailureDetectionRule object

Configuration of the failure detection rule.

Element Type Description Required
id string

The ID of the rule.

The allowed characters are lowercase and uppercase letters, numbers, hyphens (-), and underscores (_). The length is limited to30 characters.

optional
name string

The display name of the rule.

The length of the name is limited to 150 characters.

optional
description string

A short description of the rule.

optional
enabled boolean

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

required
fdpId string

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.

required
conditions FailureDetectionCondition[]

A list of conditions of the rule.

The rule applies when all conditions are fulfilled.

required

The FailureDetectionCondition object

The condition of the failure detection rule.

Element Type Description Required
attribute string

The attribute to be checked.

optional
predicate FdcPredicate optional

The FdcPredicate object

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 models in the description of the type field and check the description of the model you need.

Element Type Description Required
type string

Defines the actual set of fields depending on the value. See one of the following objects:

  • STRING_EQUALS -> FdcPredicateStringEquals
  • STRING_STARTS_WITH -> FdcPredicateStringStartsWith
  • STRING_ENDS_WITH -> FdcPredicateStringEndsWith
  • STRING_CONTAINS_SUBSTRING -> FdcPredicateStringContains
  • INTEGER_EQUALS -> FdcPredicateIntegerEquals
  • INTEGER_LESS_THAN -> FdcPredicateIntegerLessThan
  • INTEGER_LESS_THAN_OR_EQUAL -> FdcPredicateIntegerLessThanOrEqual
  • INTEGER_GREATER_THAN -> FdcPredicateIntegerGreaterThan
  • INTEGER_GREATER_THAN_OR_EQUAL -> FdcPredicateIntegerGreaterThanOrEqual
  • LONG_EQUALS -> FdcPredicateLongEquals
  • LONG_LESS_THAN -> FdcPredicateLongLessThan
  • LONG_LESS_THAN_OR_EQUAL -> FdcPredicateLongLessThanOrEqual
  • LONG_GREATER_THAN -> FdcPredicateLongGreaterThan
  • LONG_GREATER_THAN_OR_EQUAL -> FdcPredicateLongGreaterThanOrEqual
  • TAG_KEY_EQUALS -> FdcPredicateTagKeyEquals
  • TAG_EQUALS -> FdcPredicateTagEquals
  • SERVICE_TYPE_EQUALS -> FdcPredicateServiceTypeEquals
  • MANAGEMENT_ZONES_CONTAINS_ALL -> FdcPredicateManagementZonesContainsAll
  • SET_OF_INTEGERS_CONTAINS_ANY -> FdcPredicateSetOfIntegersContainsAny
  • SET_OF_INTEGERS_CONTAINS_ALL -> FdcPredicateSetOfIntegersContainsAll
required

Response

Response codes

Code Description
201

Success. The new failure detection rule has been created. The response contains the ID of the new rule.

400

Failed. The input is invalid.

Response body

The EntityShortRepresentation object

The short representation of a Dynatrace entity.

Element Type Description
id string

The ID of the Dynatrace entity.

name string

The name of the Dynatrace entity.

description string

A short description of the 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.

Early Adopter

This request is an Early Adopter release and may be changed in non-compatible way.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/service/failureDetection/parameterSelection/rules/validator
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/service/failureDetection/parameterSelection/rules/validator
  • Environment ActiveGate https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/service/failureDetection/parameterSelection/rules/validator

Authentication

To execute this request, you need the Write configuration (WriteConfig) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.

Response

Response codes

Code Description
204

Success. The submitted configuration is valid. Response doesn't have a body.

400

Failed. The input is invalid.

Response body

A successful request doesn't return any content.