get_node_metric
const url = 'https://example.com/api/v1/nodes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metrics/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/nodes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metrics/example \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Node id
Metric name — a Prometheus identifier
Query Parameters
Section titled “Query Parameters”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).
Responses
Section titled “Responses”The latest sample for that series
Latest reading for one node metric.
object
Stable identifier for a monitored node.
A UUID, not a name or address — both of which can change over a node’s life.
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.
One row of a vendor table — a memory pool, a CPU, a sensor — and its latest value.
object
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.
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.
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
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}No valid bearer token
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Role lacks the read permission
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}The node is not collecting that series
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}