Skip to main content

ClientSystemMetricsExt

Trait ClientSystemMetricsExt 

Source
pub trait ClientSystemMetricsExt {
    // Required methods
    fn system_metric(&self) -> SystemMetric<'_>;
    fn system_timeseries_query(&self) -> SystemTimeseriesQuery<'_>;
    fn system_timeseries_schema_list(&self) -> SystemTimeseriesSchemaList<'_>;
}
Expand description

Metrics provide insight into the operation of the Oxide deployment. These include telemetry on hardware and software components that can be used to understand the current state as well as to diagnose issues.

Required Methods§

Source

fn system_metric(&self) -> SystemMetric<'_>

View metrics

View CPU, memory, or storage utilization metrics at the fleet or silo level.

Sends a GET request to /v1/system/metrics/{metric_name}

Arguments:

  • metric_name
  • end_time: An exclusive end time of metrics.
  • limit: Maximum number of items returned by a single call
  • order: Query result order
  • page_token: Token returned by previous call to retrieve the subsequent page
  • silo: Name or ID of the silo
  • start_time: An inclusive start time of metrics.
let response = client.system_metric()
   .metric_name(metric_name)
   .end_time(end_time)
   .limit(limit)
   .order(order)
   .page_token(page_token)
   .silo(silo)
   .start_time(start_time)
   .send()
   .await;
Source

fn system_timeseries_query(&self) -> SystemTimeseriesQuery<'_>

Run timeseries query

Queries are written in OxQL.

Sends a POST request to /v1/system/timeseries/query

let response = client.system_timeseries_query()
   .body(body)
   .send()
   .await;
Source

fn system_timeseries_schema_list(&self) -> SystemTimeseriesSchemaList<'_>

List timeseries schemas

Sends a GET request to /v1/system/timeseries/schemas

Arguments:

  • limit: Maximum number of items returned by a single call
  • page_token: Token returned by previous call to retrieve the subsequent page
let response = client.system_timeseries_schema_list()
   .limit(limit)
   .page_token(page_token)
   .send()
   .await;

Implementors§