probeMonitoring

get_slo_budget

Answers the question, “How much of the error budget remained at the time of the measurement?”

Activity as code

Below are the details and signature of the activity Python module.

Typeprobe
Modulechaosgcp.monitoring.probes
Nameget_slo_budget
Returnlist

Usage

JSON

{
  "name": "get-slo-budget",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosgcp.monitoring.probes",
    "func": "get_slo_budget",
    "arguments": {
      "name": ""
    }
  }
}

YAML

name: get-slo-budget
provider:
  arguments:
    name: ''
  func: get_slo_budget
  module: chaosgcp.monitoring.probes
  type: python
type: probe

Arguments

NameTypeDefaultRequiredTitleDescription
namestringYesNameThe full path to the SLO name such as projects/PROJECT_ID/services/SVC_NAME/serviceLevelObjectives/SLO_ID
end_timestringnowNoEnd Window
windowstring5 minutesNoWindow Length

See https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/timeseries-selectors

Signature

def get_slo_budget(
        name: str,
        end_time: str = 'now',
        window: str = '5 minutes',
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> List[Dict[str, Any]]:
    pass