Metrics

Create a monitoring alert rule for an external service.

Changed on

If metric collection is enabled and the service engine has default rules, seeding is idempotent (ON CONFLICT DO NOTHING).

post/external-services/{id}/metrics/alert-rules

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/external-services/{id}/metrics/alert-rules
  • Auth: HTTP bearer

Path parameters

idinteger required

External service ID

Request body

comparatorstring required

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

enabledboolean
for_duration_secsinteger

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

metric_namestring required
namestring required
severitystring required

"warning" or "critical".

thresholdnumber double required

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