Skip to content

Observability / Reference

Metrics reference

Updated · 6 min read

Every metric Observability provides, with resource type, unit, and meaning, plus the metrics query arguments, response fields, limits, and errors.

On this page9 sections

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.

oc_compute_instance_cpu_seconds_total

PropertyValue
Resource typeCompute instance
Unitseconds
CountsThe total CPU time the instance has consumed, summed over all its vCPUs.
RATEThe 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.
INCREASEThe CPU seconds the instance consumed during the period.

oc_network_interface_receive_bytes_total

PropertyValue
Resource typeNetwork interface
Unitbytes
CountsThe total bytes the instance has received on the network interface.
RATEThe average inbound throughput during the period, in bytes per second. Multiply by 8 for bits per second.
INCREASEThe bytes received during the period.

oc_network_interface_transmit_bytes_total

PropertyValue
Resource typeNetwork interface
Unitbytes
CountsThe total bytes the instance has sent on the network interface.
RATEThe average outbound throughput during the period, in bytes per second. Multiply by 8 for bits per second.
INCREASEThe bytes sent during the period.

oc_volume_read_bytes_total

PropertyValue
Resource typeVolume
Unitbytes
CountsThe total bytes the instance has read from the volume while attached.
RATEThe average read throughput during the period, in bytes per second.
INCREASEThe bytes read during the period.

oc_volume_write_bytes_total

PropertyValue
Resource typeVolume
Unitbytes
CountsThe total bytes the instance has written to the volume while attached.
RATEThe average write throughput during the period, in bytes per second.
INCREASEThe bytes written during the period.

Query arguments

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:

FieldTypeRequiredDescription
resourceUrnUrnyesURN of one compute instance, volume, or network interface.
metricNames[String!]yesOne or more metric names from this page. Each name returns one series, in the order given.
fromDateTimeyesStart of the time window, as an RFC 3339 timestamp. The first data point is at from.
toDateTimeyesEnd of the time window, as an RFC 3339 timestamp. Must not be earlier than from.
periodSecondsIntyesLength 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.
statisticMetricStatisticInputyesRATE (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.

Response fields

The query returns a list of MetricSeries, one per requested metric name.

FieldTypeDescription
metricNameStringThe metric name, as requested.
resourceUrnUrnThe resource the series belongs to.
unitStringUnit of the underlying counter: seconds or bytes. A RATE value is this unit per second.
dataPoints[MetricDataPoint!]The data points in time order. Empty when the platform has no values for the window.
dataPoints.timestampDateTimeEnd of the period the data point covers.
dataPoints.valueFloatThe RATE or INCREASE for that period.

Limits

LimitValue
Data points per query11,000, summed over all metrics in the query. Each metric contributes (to - from) / periodSeconds + 1 data points.
Queries per minute60 per organization. Every admitted query counts, including one that later fails for an unknown metric name.
Concurrent queries4 per organization.
Query duration30 seconds. A query that runs longer is stopped and returns SERVICE_UNAVAILABLE.
Data retention90 days. Older periods return no data points.
Collection interval30 seconds, while the instance runs.

Errors

Errors carry their code in extensions.code. For the general meaning of each code, see Error codes.

CodeCauseWhat to do
BAD_REQUESTA 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.
FORBIDDENYou don’t have observability.metric.get on the resource.Ask for a role that includes it, such as Viewer. See Built-in roles.
CONFLICTThe 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_UNAVAILABLEThe 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.

A query that fails isn’t billed.