Metrics

Create a resource alert (CPU / memory / disk) on a node.

Changed on

Works for workers as well as the control plane (0). A worker's series is fed by its heartbeats, so a rule only starts evaluating once the node has reported at least once.

post/nodes/{id}/metrics/alert-rules

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    HTTP bearer

Path parameters

idinteger required

Node ID (0 = control plane)

Request body

comparatorstring required

One of >, <, >=, <=.

enabledboolean
for_duration_secsinteger

Seconds the breach must persist before the alarm fires (0 = immediate).

metric_namestring required

One of the usage percentages or disk-health metrics listed above.

namestring required
severitystring required

"warning" or "critical".

thresholdnumber double required

0-100 for a usage percentage; 0 or more for a disk-health metric.

Response

Alert rule created

comparatorstring required
deployment_idinteger nullable
enabledboolean required
for_duration_secsinteger required
idinteger required
metric_namestring required
namestring required
node_idinteger nullable

Node the rule is scoped to. 0 is the synthetic control-plane node (see CONTROL_PLANE_NODE_ID), which owns the proxy.* and node.* rules. Exactly one of service_id/deployment_id/node_id is set.

service_idinteger nullable
severitystring required
silenced_untilstring nullable
thresholdnumber double required

Changes