Skip to main content

Dynatrace probe

Dynatrace probe is used to determine the health of your application by examining the entry or exit criteria.

Creating secrets

To use the APITokenSecretName, create a Kubernetes secret as shown below and reference the Kubernetes secret name in the Dynatrace probe schema. Ensure that you create the secret in the same namespace where you have set up your chaos infrastructure.

apiVersion: v1
kind: Secret
metadata:
name: dyna-secret
namespace: hce
type: Opaque
stringData:
X-API-KEY: <TOKEN>
tip
  • Connectivity requirements for the Dynatrace probe: You can establish a connection between the execution plane and Dynatrace by:
  1. Opening port 443 (HTTPS) to make API calls to the Dynatrace probe;
  2. Create a secret that has the Dynatrace access token with read permissions (that is, metrics.read scope).

In the case of Dedicated Chaos Infrastructure, the following apply:

  • The mode and type are mandatory fields in the probe schema when you define the entire configuration of the probe in the manifest (for Kubernetes (Legacy), Linux, and Windows infrastructure).
  • The name, mode, type and other input properties (depending on the probe) is required to rightly configure the resilience probe. If all the necessary details are not provided, the probe will not execute.

In the case of Harness Delegate, the following apply:

  • For Kubernetes (Harness Infrastructure) (also known as DDCR), the mandatory fields are mode and probeID, and the type field is derived. These fields are generated and patched in the backend to the same manifest. However, in the UI, you will only see the mode and probeID fields when configuring your experiment. This is because the manifest is minified in the UI.
  • If you define the entire probe in task.definition.chaos.probes, the entire configuration is required. If you use the task.probeRef, you only need to specify probeID and mode fields.

Schema

Listed below is the Dynatrace Probe schema with common properties shared across all probes and properties unique to Dynatrace probe.

FieldDescriptionTypeRangeNotes
EndpointEndpoint of the probeMandatory type: string Endpoint specified to access the Dynatrace probe.
MetricsRaw metric details of the probeMandatory type: metrics Provide the raw metrics that you want to query.
TimeFrameTimeframe associated with the metricsMandatory type: string Average or min or max of the timeframe specified. For example, now-5m provides average, minvaluefrom(now-5m) provides the minimum and maxvaluefrom(now-5m) provides the maximum value.
APITokenSecretNameUsed for authentication with the Dynatrace platformMandatory type: string Secret created to use the Dynatrace API, refer creating secrets.
ComparatorChecks for the correctness of the probe outputMandatory type: comparator Various fields to compare the desired and obtained data, includes type, criteria and value.

Metrics

FieldDescriptionTypeRangeNotes
MetricsSelector Query to obtain the Dynatrace metricsMandatory type: string Provide the MetricsSelector of the metrics you have provided in the Metrics field.
EntitySelector Entity selector of the metrics Mandatory type: string Provide the EntitySelector of the metrics you have provided in the Metrics field.

Comparator

Field Description Type Range Notes
type Flag to hold type of the data used for comparison Mandatory float The type contains type of data, which should be compared as part of comparison operation.
criteria Flag to hold criteria for the comparison Mandatory It supports >=, <=, ==, >, <, !=, oneOf, between for int and float type. And equal, notEqual, contains, matches, notMatches, oneOf for string type. The criteria contains criteria of the comparison, which should be fulfill as part of comparison operation.
value Flag to hold value for the comparison Mandatory N/A type: string The value contains value of the comparison, which should follow the given criteria as part of comparison operation.