Service guide / 05

Observability

Query resource metrics — CPU, network, and disk activity — for your own compute instances, volumes, and network interfaces.

API GraphQL · observability CLI none yet Statistics RATE · INCREASE

Key concepts

Metric
A named, platform-defined measurement for one resource — for example, how much CPU time a compute instance has consumed, or how many bytes a network interface has received. The set of available metric names is fixed by the platform, not something you define yourself. There’s currently no API to list which metric names exist for a given resource type; you need to already know the name you’re asking for.

Statistic
Every metric is a running total (a counter), not an instantaneous reading, so a query asks for how that total behaved over a time window rather than its raw value: RATE (average per-second rate of change) or INCREASE (total change over the window).

Querying metrics

The observability.metrics GraphQL query takes:

  • resourceUrn — the URN of the compute instance, volume, or network interface you want metrics for. You can only query resources you have read access to; the query is automatically scoped to your own organisation from this URN, so there’s no separate “tenant” parameter to set.
  • metricNames — one or more metric names to fetch.
  • from / to — the time window.
  • periodSeconds — how finely to bucket the results; each returned data point covers this many seconds.
  • statisticRATE or INCREASE.

The result is one series per requested metric name, each a list of (timestamp, value) data points covering the requested window.

Using Observability

  • The GraphQL API — the only interface today. Look under the observability namespace.
  • The origin CLI — not yet covered; there’s no CLI support for querying metrics.
  • Metrics are only ever produced by the platform’s own agents (e.g. on the host running a compute instance) — there’s no way to submit your own custom metrics yet.

A metrics query

There is no origin CLI command for metrics, so this is GraphQL only — the single tab below is deliberate rather than an omission.

Metrics.graphql
query Metrics($input: MetricQueryInput!) {
observability {
metrics(input: $input) {
metricName
resourceUrn
unit
dataPoints {
timestamp
value
}
}
}
}
variables.json
{
"input": {
"resourceUrn": "urn:origin:cloud:compute:eu-central1:7a07d9ec7ba2:proj-4f21c9a03b17:i-RAiXDqjUHLh",
"metricNames": ["oc_compute_instance_cpu_seconds_total"],
"from": "2026-08-28T00:00:00Z",
"to": "2026-08-28T06:00:00Z",
"periodSeconds": 300,
"statistic": "RATE"
}
}
Origin Cloud — user documentation Edit this page →