probe Monitoring

get_metrics

Fetch metrics from the Cloud Monitoring service

Run it now
View details
Typeprobe
Modulechaosgcp.monitoring.probes
Nameget_metrics
Returnlist

Usage

JSON

{
  "name": "get-metrics",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosgcp.monitoring.probes",
    "func": "get_metrics",
    "arguments": {
      "metric_type": ""
    }
  }
}

YAML

name: get-metrics
provider:
  arguments:
    metric_type: ''
  func: get_metrics
  module: chaosgcp.monitoring.probes
  type: python
type: probe

Arguments

NameTypeDefaultRequiredTitleDescription
metric_typestringYesTypeThe metric type
metric_labels_filtersstringNoMetrics Labels Filter
resource_labels_filtersstringNoResource Labels Filter
end_timestringnowNoEnd Time
windowstring5 minutesNoWindow
alignerinteger0NoAligner
aligner_minutesinteger1NoAligner Minutes
reducerinteger0NoReducer
reducer_group_bylistnullNoReducer Group By

Signature

def get_metrics(
        metric_type: str,
        metric_labels_filters: Optional[Dict[str, str]] = None,
        resource_labels_filters: Optional[Dict[str, str]] = None,
        end_time: str = 'now',
        window: str = '5 minutes',
        aligner: int = 0,
        aligner_minutes: int = 1,
        reducer: int = 0,
        reducer_group_by: Optional[List[str]] = None,
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> List[Dict[str, Any]]:
    pass