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:
- Opening port 443 (HTTPS) to make API calls to the Dynatrace probe;
- 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
andtype
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
andprobeID
, and thetype
field is derived. These fields are generated and patched in the backend to the same manifest. However, in the UI, you will only see themode
andprobeID
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 thetask.probeRef
, you only need to specifyprobeID
andmode
fields.
Schema
Listed below is the Dynatrace Probe schema with common properties shared across all probes and properties unique to Dynatrace probe.
- Kubernetes
- Linux
Field | Description | Type | Range | Notes |
---|---|---|---|---|
Endpoint | Endpoint of the probe | Mandatory | type: string | Endpoint specified to access the Dynatrace probe. |
Metrics | Raw metric details of the probe | Mandatory | type: metrics | Provide the raw metrics that you want to query. |
TimeFrame | Timeframe associated with the metrics | Mandatory | 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. |
APITokenSecretName | Used for authentication with the Dynatrace platform | Mandatory | type: string | Secret created to use the Dynatrace API, refer creating secrets. |
Comparator | Checks for the correctness of the probe output | Mandatory | type: comparator | Various fields to compare the desired and obtained data, includes type, criteria and value. |
Metrics
Field | Description | Type | Range | Notes |
---|---|---|---|---|
MetricsSelector | Query to obtain the Dynatrace metrics | Mandatory | 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. |
Field | Description | Type | Range | Notes |
---|---|---|---|---|
Endpoint | Endpoint of the probe | Mandatory | type: string | Endpoint specified to access the Dynatrace probe. |
Metrics | Raw metric details of the probe | Mandatory | type: metrics | Provide the raw metrics that you want to query. |
TimeFrame | Timeframe associated with the metrics | Mandatory | type: string | Average or min or max of the timeframe specified. For example, now-5m provides average, min(now-5m) provides the minimum and max(now-5m) provides the maximum value. |
Comparator | Checks for the correctness of the probe output | Mandatory | type: comparator | Various fields to compare the desired and obtained data, includes type, criteria and value. |
Metrics
Field | Description | Type | Range | Notes |
---|---|---|---|---|
MetricsSelector | Query to obtain the Dynatrace metrics | Mandatory | type: string | Dynatrace metrics query to obtain the output from the endpoint. |
EntitySelector | Entity selector of the metrics | Mandatory | type: string | The entity selector type used by the Dynatrace query. |
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 | type: float | The value contains value of the comparison, which should follow the given criteria as part of comparison operation. |