Use resilience probe
This topic describes the steps you can follow to create and use a resilience probe in your chaos experiment.
Before you begin, review the following
- Go to probe overview to understand about probes.
- Go to chaos faults to understand the application of resilience probes.
Prerequisite
- Permissions to edit a chaos experiment.
Currently, resilience probes are behind the feature flag CHAOS_PROBE_ENABLED
. Contact Harness support to enable it.
- If you are an existing customer, you will see the old flow of control in resilience probes by default and you have the choice to upgrade to the new flow.
- If you are a new customer, the feature flag is turned on by default and you will see the new flow of control in the resilience probes.
Create a Resilience Probe from UI
-
Select the Chaos module and navigate to Resilience probes. Click New probe.
-
Select the desired infrastructure (Kubernetes or Linux) and the probe type.
-
Based on the probe type you choose, the fields will vary. You can find details about every probe in their respective documentation ((Command, Datadog, Dynatrace, HTTP, Kubernetes, Prometheus, and SLO)). After entering the details, click Configure properties. Enter further details and click Configure details.
-
Enter URL, authorization type, and click Setup Probe. Click Confirm when the screen prompts you to confirm creating the probe with specified details.
If you are a first-time chaos module user or a Platform user who has not used resilience probes, you can create a resilience probe directly from the Chaos Studio drawer (from within an experiment). For this, you will see an option to add a system probe (which is a health check system probe) as a one-click button. This will not be present if you have configured at least one resilience probe.
Edit a Resilience Probe
You can edit a resilience probe by navigating to the probe you wish to edit. Click the three vertical dot menu to the extreme right of the probe, and choose Edit probe. Modify the properties you wish to, and click Save.
Resilience probe names act as unique identifiers for a probe, which means you can't edit them. If you manually add the name of a probe in the manifest, this same name should be entered in the annotation as ID.
When you want to enter the probe name in the manifest (manually) as a probeRef annotation, follow the below format:
probeRef: '[{"probeID":"ID","mode":"SOT"}]'
Here, ID
is the unique ID of your probe.
This step is not required if you use the user interface.
Enable a Probe
-
Go to Chaos module, select Resilience Probes and select the : icon of the probe to enable. Select Enable.
-
Click Confirm.
-
Choose between Bulk Enable and Enable Only. If you choose Bulk Enable, this option modifies the entire manifest and references to the probe. If you choose Enable Only, it enables the probe functionality without affecting the manifest.
- By default, Enable Only is applied in case you close the modal when selecting between the options Bulk Enable and Enable Only.
- You need to enable a probe if it is in the disabled state.
- A probe is enabled by default.
Use a Resilience Probe
-
Go to the chaos experiment for wish you wish to set up probe/s. Move to probes tab and click +Select or Add new probes.
-
You can choose to create a new probe or add a probe that you created earlier.
-
Once you select a probe, click Add to Fault to associate the resilience probe with a chaos fault.
-
Click Apply changes or continue to add or create probes based on your requirement.
-
Based on the type of probe you select, enter the values to set up the probe.
You can:
- Use any number of probes within a chaos experiment.
- Use the same probes for two faults within the same chaos experiment.
- Use Kubernetes-based probes for Kubernetes experiments.
- Use Linux-based probes for Linux experiments.
You can't:
- Repeat the same probe multiple times in the same fault in the same experiment.
Add Probes to ChaosHub
Adding probes to ChaosHub helps you to templatize the resilience probe. With this, you can import the probes directly from ChaosHub and reference it in a chaos experiment.
-
To add a resilience probe to ChaosHub, go to Resilience Probes tab. Go to the resilience probe that you want to add to ChaosHub and click the : button. Click Push to ChaosHub.
-
Choose the ChaosHub to which you want to add the probe, and click Apply. Click Save.
Disable a Probe
You can follow the steps similar to that as Enable a Probe, except that you select the Disable option. You can delete a probe only after you disable it.