Module clients.sandbox.metrics.client
Classes
MetricsClient
class MetricsClient(connection_config: h2o_engine_manager.clients.connection_config.ConnectionConfig, verify_ssl: bool = True, ssl_ca_cert: Optional[str] = None)
MetricsClient reads resource usage metrics from a SandboxEngine.
Args
connection_config- AIEM connection configuration object.
verify_ssl- Set to False to disable SSL certificate verification.
ssl_ca_cert- Path to a CA cert bundle with certificates of trusted CAs.
Methods
read_metrics
def read_metrics(self, name: str, disk_path: str = '', strict_mode: bool = False) ‑> h2o_engine_manager.clients.sandbox.metrics.metrics.Metrics
Read current resource usage metrics for a sandbox engine.
Returns a snapshot of memory, CPU, and disk statistics collected at the time of the request.
Args
name:str- The SandboxEngine resource name. Format: "workspaces//sandboxEngines/"
disk_path:str- Optional filesystem path to measure for disk usage. Must be an absolute path (e.g., "/", "/workspace"). If not specified, defaults to the root filesystem ("/").
strict_mode:bool- If True, returns an error if metrics cannot be collected. If False (default), returns partial metrics with zero values for unavailable metrics (graceful degradation).
Returns
Metrics- A snapshot of resource usage metrics including memory, CPU, and disk statistics.
Feedback
- Submit and view feedback for this page
- Send feedback about AI Engine Manager to cloud-feedback@h2o.ai