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.statistic—RATEorINCREASE.
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
observabilitynamespace. - The
originCLI — 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.
query Metrics($input: MetricQueryInput!) { observability { metrics(input: $input) { metricName resourceUrn unit dataPoints { timestamp value } } }}{ "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" }}