The platform provides the five metrics below, listed by resource type. Every metric is a counter that the platform reads every 30 seconds while the instance runs. To query them, see Query metrics; for how counters and statistics work, see What is Origin Cloud Observability?.
All counters start again from zero when an instance is stopped and started. RATE and INCREASE account for such a restart, so a data point never turns negative. INCREASE is extrapolated to the full period, so it can be a fractional number even for a byte counter.
The total CPU time the instance has consumed, summed over all its vCPUs.
RATE
The average number of busy vCPUs during the period, in CPU seconds per second. 1.0 means one vCPU fully busy; the maximum is the instance type’s vCPU count.
INCREASE
The CPU seconds the instance consumed during the period.
The observability.metrics query takes one input argument of type MetricQueryInput and returns one series per metric name:
GraphQL
query Metrics($input: MetricQueryInput!) { observability { metrics(input: $input) { metricName resourceUrn unit dataPoints { timestamp value } } }}
The fields of MetricQueryInput:
Field
Type
Required
Description
resourceUrn
Urn
yes
URN of one compute instance, volume, or network interface.
metricNames
[String!]
yes
One or more metric names from this page. Each name returns one series, in the order given.
from
DateTime
yes
Start of the time window, as an RFC 3339 timestamp. The first data point is at from.
to
DateTime
yes
End of the time window, as an RFC 3339 timestamp. Must not be earlier than from.
periodSeconds
Int
yes
Length of each period and spacing of the data points, in seconds. Values below 1 count as 1. There’s no maximum. Use at least 60, because each data point needs two values collected 30 seconds apart.
statistic
MetricStatisticInput
yes
RATE (average per-second increase over the period) or INCREASE (total increase over the period).
A metric name that exists but belongs to another resource type returns a series without data points.
Errors carry their code in extensions.code. For the general meaning of each code, see Error codes.
Code
Cause
What to do
BAD_REQUEST
A name in metricNames isn’t one of the metrics on this page (message: metric <name> is not in the catalog), or resourceUrn isn’t a compute instance, volume, or network interface.
Correct the metric name or the URN.
FORBIDDEN
You don’t have observability.metric.get on the resource.
Ask for a role that includes it, such as Viewer. See Built-in roles.
CONFLICT
The query exceeds the data point limit, the per-minute limit, or the concurrency limit. All three return the message metric query rate limit exceeded; please retry later.
Check that the query has at most 11,000 data points. If it does, wait a few seconds and retry.
SERVICE_UNAVAILABLE
The query didn’t finish within 30 seconds, or metrics are temporarily unavailable.
Retry. If it keeps timing out, query a shorter window or fewer metrics.