Skip to content

`GET /api/v1/agents/{node_id}/metrics` — metrics history for an agent.

GET
/api/v1/agents/{node_id}/metrics
curl --request GET \
--url https://example.com/api/v1/agents/example/metrics
node_id
required
string

Agent node ID

since
integer format: int64

Only return samples taken at or after this UNIX timestamp (seconds). Defaults to now - retention_window so the response covers the full retention window when omitted.

limit
integer

Maximum number of samples to return. When omitted, all samples in the window are returned.

Metrics history

Media type application/json

Response body for GET /api/v1/agents/{node_id}/metrics.

object
node_id
required

Node ID of the agent these samples belong to.

string
samples
required

Samples within the requested window, ordered by collected_at ascending.

Array<object>

A single metrics sample in an API response.

Mirrors the wire format MetricsReport and the stored MetricsSnapshot. All metric fields are nullable: a null value means the agent could not collect that metric (the OS does not expose it, the agent has metrics disabled, or the metric is not yet implemented for this platform).

object
collected_at
required

UNIX timestamp (seconds) when the agent took this sample.

integer format: int64
cpu_usage

System-wide CPU usage at sample time, as a percentage (0–100).

number | null format: float
disk_total

Total disk space across all mounted non-virtual filesystems, in bytes.

integer | null format: int64
disk_used

Used disk space across all mounted non-virtual filesystems, in bytes.

integer | null format: int64
memory_total

Total physical memory in bytes.

integer | null format: int64
memory_used

Used physical memory in bytes.

integer | null format: int64
uptime

Time since last boot in seconds.

integer | null format: int64
Example generated
{
"node_id": "example",
"samples": [
{
"collected_at": 1,
"cpu_usage": 1,
"disk_total": 1,
"disk_used": 1,
"memory_total": 1,
"memory_used": 1,
"uptime": 1
}
]
}

No samples in the requested window