probeMonitoring

get_slo_health

Answers the question, “During a given alignment period, what was the ratio of good requests to total requests?”

Activity as code

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

Typeprobe
Modulechaosgcp.monitoring.probes
Nameget_slo_health
Returnlist

Usage

JSON

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

YAML

name: get-slo-health
provider:
  arguments:
    name: ''
  func: get_slo_health
  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
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 get_slo_health(
        name: str,
        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) -> List[Dict[str, Any]]:
    pass