Skip to main content

SLO probe

Service Level Objective (SLO) probes let users validate the error budget for a given SLO when the corresponding application is under chaos, and determine the verdict based on the percentage change of the error budget. The probe leverages the API from the Service Reliability Management (SRM) module, and fetches the error budget values during the chaos execution time period. The success of a chaos probe can be defined based on the drop in the percentage of the error budget values. The percentage drop is defined by the user in the probe configuration.

Defining the probe

You can define the probes at .spec.experiments[].spec.probe path inside the chaos engine.

kind: Workflow
apiVersion: argoproj.io/v1alpha1
spec:
templates:
- inputs:
artifacts:
- raw:
data: |
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
spec:
experiments:
- spec:
probe:
####################################
Probes are defined here
####################################

Schema

Listed below is the probe schema for the SLO probe, with properties shared across all the probes and properties unique to the SLO probe.

FieldDescriptionTypeRangeNotes
nameFlag to hold the name of the probeMandatoryN/A type: stringThe name holds the name of the probe. It can be set based on the usecase.
typeFlag to hold the type of the probeMandatoryhttpProbe, k8sProbe, cmdProbe, promProbeThe type supports four types of probes. It can one of the httpProbe, k8sProbe, cmdProbe, promProbe.
modeFlag to hold the mode of the probeMandatory EOT, Edge, Continuous, OnChaosThe mode supports five modes of probes. SLO Probe supports EOT mode since the SRM API is called post the chaos execution.
platformEndpointFlag to hold the platfrom endpointMandatoryN/Atype: stringThe platformEndpoint stores the value of NG manager platform endpoint. ex: https://app.harness.io/gateway/cv/api
sloIdentifierFlag to hold the slo identifier of the SLOMandatoryN/Atype: stringThe sloIdentifier field consists of the SLO identifier for which the error budget is calculated.

Source Metadata

FieldDescriptionTypeRangeNotes
apiTokenSecretFlag to hold API Token secretMandatoryN/A type: stringThe apiTokenSecret contains the API Token. The secret should be added with X-API-KEY as the key and should be present in the same namespace where experiment is running.
accountIdentifierFlag to hold Account IDMandatoryN/A type: stringAccount ID of the entity
orgIdentifierFlag to hold Org IDMandatoryN/A type: stringOrganization ID of the entity
projectIdentifierFlag to hold Project IdentifierMandatoryN/A type: stringProject ID of the entity

Comparator

FieldDescriptionTypeRangeNotes
typeFlag to hold type of the data used for comparisonOptionalfloatThe type contains type of data, which should be compared as part of comparison operation.
criteriaFlag to hold criteria for the comparisonMandatoryIt supports >=, <=, ==, >, <, !=, oneOf, between for int & 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.
valueFlag to hold value for the comparisonMandatoryN/A type: stringThe value contains value of the comparison, which should follow the given criteria as part of comparison operation.

Run properties

FieldDescriptionTypeRangeNotes
probeTimeoutFlag to hold the timeout of the probeMandatoryN/A type: integerThe probeTimeout represents the time limit for the probe to execute the specified check and return the expected data.
attemptFlag to hold the attempt count of the probeMandatoryN/A type: integerThe retry contains the number of times a check is re-run upon failure in the first attempt before declaring the probe status as failed.
stopOnFailureFlags to hold the stop or continue the experiment on probe failureOptionalN/A type: booleanThe stopOnFailure can be set to true/false to stop or continue the experiment execution after probe fails.
evaluationTimeoutFlags to hold the total evaluation time for the probeOptionalN/A type: stringThe evaluationTimeout is the time period for which the error budget values are fetched and based on the chaos execution time period, the percentage change is calculated.

Definition

probe:
- name: "slo-probe"
type: "sloProbe"
sloProbe/inputs:
platformEndpoint: "<platform-endpoint>"
sloIdentifier: "<slo-identifier>"
sloSourceMetadata:
apiTokenSecret: "<api-token>"
scope:
accountIdentifier: "<account-identifier>"
orgIdentifier: "<org-idetifier>"
projectIdentifier: "<project-identifier>"
comparator:
type: float
criteria: <
value: "0.1"
mode: "EOT"
runProperties:
evaluationTimeout: 5m
attempt: 2
probeTimeout: 1000ms
stopOnFailure: false