probeMonitoring

valid_slo_ratio_during_window

Verifies that SLO is matching expectation over a period of time

Activity as code

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

Typeprobe
Modulechaosgcp.monitoring.probes
Namevalid_slo_ratio_during_window
Returnlist

Usage

JSON

{
  "name": "valid-slo-ratio-during-window",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosgcp.monitoring.probes",
    "func": "valid_slo_ratio_during_window",
    "arguments": {
      "name": ""
    }
  }
}

YAML

name: valid-slo-ratio-during-window
provider:
  arguments:
    name: ''
  func: valid_slo_ratio_during_window
  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
expected_ratiofloat0.5NoSuccessful Intervals RatioRatio of intervals in that window which have successfully reached at least the minimal level. For instance, 0.5 means 50% have reached the level
min_levelfloat0.9NoMinimal LevelSLO value to be reached by each interval to be considered successful
end_timestringnowNoEnd Window
windowstring5 minutesNoWindow Length
alignment_periodinteger60NoAlignment PeriodInterval, in seconds, that is used to divide the data into consistent blocks of time
per_series_alignerstringALIGN_MEANNoPer Series AlignerDescribes how to bring the data points in a single time series into temporal alignment
cross_series_reducerstringREDUCE_MEANNoCross Series ReducerReduction operation to be used to combine time series into a single time series
group_by_fieldsstring""NoGroup By FieldsComma-separated set of fields to preserve when Cross Series Reducer is specified

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

For aggregation, see also this

Signature

def valid_slo_ratio_during_window(
        name: str,
        expected_ratio: float = 0.9,
        min_level: float = 0.9,
        end_time: str = 'now',
        window: str = '5 minutes',
        alignment_period: int = 60,
        per_series_aligner: str = 'ALIGN_MEAN',
        cross_series_reducer: int = 'REDUCE_COUNT',
        group_by_fields: Union[str, List[str], NoneType] = None,
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> bool:
    pass