コンテンツにスキップ

get_node_metric

GET
/api/v1/nodes/{node_id}/metrics/{metric}
curl --request GET \
--url https://example.com/api/v1/nodes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metrics/example \
--header 'Authorization: Bearer <token>'
node_id
required
string format: uuid

Node id

metric
required
string

Metric name — a Prometheus identifier

agg
string
rows
boolean

true ⇒ also return every table row’s latest value and name in rows (a metric collected once per table row; see the inventory’s entity dimension).

The latest sample for that series

Media typeapplication/json

Latest reading for one node metric.

object
metric
required
string
node_id
required

Stable identifier for a monitored node.

A UUID, not a name or address — both of which can change over a node’s life.

string format: uuid
rows

With rows=true, every table row of the metric on this node with its latest value and name, ordered by row key. A metric with one series per node is listed as a single row 0. Omitted when rows is not set.

Array<object>

One row of a vendor table — a memory pool, a CPU, a sensor — and its latest value.

object
name

The row’s name as the device reports it (I/O, MPU Board 0). Absent when no name has been read for the row — its tables may have none, or the hourly name read has not reached it yet.

string | null
row
required

The row key the row’s values carry. Pass it as row to the range read for this row’s history; an alert about the row carries the same number. The single row 0 of a metric with one series per node is the exception: that series has no row key, so its history is the range read without row.

integer format: int32
value
required
number format: double
value
required
number format: double
Examplegenerated
{
"metric": "example",
"node_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"rows": [
{
"name": "example",
"row": 1,
"value": 1
}
],
"value": 1
}

The metric name is not an identifier, or agg is unsupported

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

No valid bearer token

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Role lacks the read permission

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

The node is not collecting that series

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}