observability

Create an alert on a metric

Changed on

Create an alert that fires when a metric crosses a threshold. Three sub_types:

  • normal — Failure alert. Fires per failing call. Only for binary metrics (eval_type starts with binary_) plus the latency / infrastructure / critical-deviation built-ins.
  • significant_change — Trend alert. Fires when a numeric/continuous metric's rolling mean deviates from history. Pass preset: "balanced" (or "conservative" / "aggressive") to skip manual std_multiplier / ewma_alpha / window_size math — the server expands the preset. Balanced is the safe default.
  • threshold — Hard ceiling/floor. Fires when ≥ min_breaches of the last window_size evaluations cross value. Use for numeric metrics where the user has a known good range. Operator is gt | lt | outside ({low, high}).

Slack delivery requires notifications.slack.workspace_id (+ optional channel_id). Alerts with empty notifications are silent — fire counters still increment but no message is sent. Pick a workspace_id from slack_workspaces_list.

post/observability/v1/alerts/

Request

  • Base URL
    https://api.cekura.ai
  • URL
    https://api.cekura.ai/observability/v1/alerts/
  • Auth
    • API key in header X-CEKURA-API-KEY
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Request body

idinteger
namestring required

Alert name

enabledboolean

Enable/disable alert

projectinteger required

Project this alert belongs to

source_type'metric' required

Type of data source: metric, duration, call_volume, etc.

  • metric - Metric
source_idinteger nullable

ID of monitored object

sourceunknown
thresholdunknown
notificationsunknown
preset'conservative' | 'balanced' | 'aggressive'

Optional shorthand for trend alerts: 'conservative' | 'balanced' | 'aggressive'. Expands to std_multiplier / ewma_alpha / window_size. Explicit values in source or threshold override the preset. Ignored unless sub_type == 'significant_change'. Prefer it over setting those three by hand; 'balanced' is the safe default.

  • conservative - conservative
  • balanced - balanced
  • aggressive - aggressive

Response

idinteger
namestring required

Alert name

enabledboolean

Enable/disable alert

projectinteger required

Project this alert belongs to

source_type'metric' required

Type of data source: metric, duration, call_volume, etc.

  • metric - Metric
source_idinteger nullable

ID of monitored object

sourceunknown
thresholdunknown
notificationsunknown
preset'conservative' | 'balanced' | 'aggressive'

Optional shorthand for trend alerts: 'conservative' | 'balanced' | 'aggressive'. Expands to std_multiplier / ewma_alpha / window_size. Explicit values in source or threshold override the preset. Ignored unless sub_type == 'significant_change'. Prefer it over setting those three by hand; 'balanced' is the safe default.

  • conservative - conservative
  • balanced - balanced
  • aggressive - aggressive

Changes