Zudoku
Cloud Platform

Metrics

Unikraft Cloud exposes runtime metrics for each instance: CPU time, memory usage, network I/O, connection counts, and scale-to-zero wakeup latencies.

You can currently only view metrics via the API or unikraft api.

Endpoints

Code
GET /instances/{uuid}/metrics POST /instances/{uuid}/metrics # (for clients that must send a body) GET /instances/metrics?uuid=<uuid>[,<uuid>…] POST /instances/metrics # (UUIDs or names in request body)

With no identifiers, the platform returns metrics for all instances in your account. You can also pass a list of names or UUIDs in the POST body.

Response formats

Set the Accept header to control the response format:

Accept headerFormat
application/jsonJSON object with an instances array.
Any other value (or omitted)Prometheus text exposition format.

Response fields

Each entry in the instances array contains the following fields:

Identity

FieldTypeDescription
uuidstringInstance UUID.
namestringInstance name.

Lifecycle

FieldTypeDescription
statestringCurrent instance state.
start_countintNumber of times the instance has started.
restart_countintNumber of automatic restarts. Omitted if 0.
started_attimestampTime of last start. Omitted if unset.
stopped_attimestampTime of last stop. Omitted if unset.
uptime_msint64Current uptime in milliseconds.

Boot timing

FieldTypeDescription
boot_time_usintTime from boot trigger to app entry point, in microseconds. Omitted if 0.
net_time_usintTime to set up the network interface, in microseconds. Omitted if 0.
template_time_usintTime to create the template/snapshot, in microseconds. Omitted if 0.

Resource usage

FieldTypeDescription
rss_bytesint64Resident set size: physical memory in use, in bytes.
cpu_time_msint64Total CPU time consumed since last start, in milliseconds.

Network throughput

FieldTypeDescription
rx_bytesint64Bytes received since last start.
rx_packetsint64Packets received since last start.
tx_bytesint64Bytes transmitted since last start.
tx_packetsint64Packets transmitted since last start.

Connection activity

These fields reflect the view from the Unikraft Cloud load balancer, not the instance itself.

FieldTypeDescription
nconnsintNumber of active TCP connections.
nreqsintNumber of active HTTP requests (non-zero only for HTTP-mode services).
nqueuedintNumber of connections or requests waiting for acceptance.
ntotalint64Total connections or requests processed since last start.

Wakeup latency histogram

For instances with scale-to-zero enabled, the wakeup_latency field contains a histogram of the time between an incoming connection and the instance resuming execution.

FieldTypeDescription
wakeup_latencyarrayHistogram buckets. Each bucket has bucket_ms (upper bound in ms, or null for the overflow bucket) and count (number of wakeups in that bucket).
wakeup_latency_sumuint64Sum of all recorded wakeup latencies in milliseconds.

Example

unikraft api /v1/instances/metrics?uuid=f31c1fa8-6188-4ebe-b6e0-b2de063ad7ea -X GET --metro fra
JSONCode
{ "status": "success", "data": { "instances": [ { "status": "success", "uuid": "f31c1fa8-6188-4ebe-b6e0-b2de063ad7ea", "name": "httpserver-go1.21-wf9iz", "state": "standby", "start_count": 2, "started_at": "2026-06-05T11:44:32Z", "stopped_at": "2026-06-05T11:44:36Z", "uptime_ms": 8161, "boot_time_us": 97308, "net_time_us": 102963, "rss_bytes": 0, "cpu_time_ms": 150, "rx_bytes": 2012, "rx_packets": 23, "tx_bytes": 1196, "tx_packets": 11, "nconns": 0, "nreqs": 0, "nqueued": 0, "ntotal": 2, "wakeup_latency": [ { "bucket_ms": 1, "count": 0 }, { "bucket_ms": 2, "count": 0 }, { "bucket_ms": 4, "count": 0 }, { "bucket_ms": 8, "count": 0 }, { "bucket_ms": 16, "count": 0 }, { "bucket_ms": 32, "count": 0 }, { "bucket_ms": 64, "count": 0 }, { "bucket_ms": 128, "count": 1 }, { "bucket_ms": 256, "count": 0 }, { "bucket_ms": 512, "count": 0 }, { "bucket_ms": 1024, "count": 0 }, { "bucket_ms": 2048, "count": 0 }, { "bucket_ms": 4096, "count": 0 }, { "bucket_ms": null, "count": 0 } ], "wakeup_latency_sum": 104 } ] } }

Learn more

Last modified on