Anomaly Detection

Create a new anomaly detection configuration

post/api/{org_id}/anomaly_detection

Request

Path parameters

org_idstring required

Organization identifier

Request body

alert_budget_per_daynumber double nullable

Delivered-alert budget per day; mutually exclusive with percentile in one request.

alert_destinationsstring[]
alert_directionstring nullable

both, above or below; absent means both.

alert_enabledboolean nullable
alert_window_bucketsinteger nullable

Window-share length in buckets, at least 1 and at most 24h of buckets; absent means 1.

alert_window_fire_pctnumber double nullable

Percent of the window out of band that fires; absent means 100.

alert_window_recover_pctnumber double nullable

Percent of the window out of band below which it recovers; absent means the fire percent.

band_widthnumber double nullable

Manual band half-width k in sigmas, 1 to 10; absent uses the trained k (3 to 6).

custom_sqlstring nullable
descriptionstring nullable
detection_functionstring required
detection_function_fieldstring nullable
detection_window_secondsinteger required

At most 100,000 histogram buckets; a stored row over the limit runs clamped to it.

enabledboolean nullable
filtersunknown
folder_idstring nullable
histogram_intervalstring required
level_half_width_secondsinteger nullable

Accepted and stored, but ignored by the band model.

namestring required
ownerstring nullable
percentilenumber double nullable

Legacy, read back as threshold for read-modify-write; k trains at p99, within 3 to 6.

priorityinteger nullable

Triage priority P1..P5 (Feature 2, PT-1). Anomaly configs appear in the same alert list as scheduled/realtime alerts, so they carry the same metadata. Absent = unset.

query_modestring required
rcf_num_treesinteger nullable
rcf_shingle_sizeinteger nullable
rcf_tree_sizeinteger nullable
retrain_interval_daysinteger nullable
schedule_intervalstring required

At least 1 minute; a stored row below it runs every minute.

stream_namestring required

The stream the detector reads. Required in filters mode. In custom_sql mode it can be left blank when the SQL reads exactly one stream, which then names it.

stream_typestring required
tagsstring[]

Selection tags (PT-6), normalized and validated on save exactly as for alerts — one normalize_tags serves both.

templatestring nullable

Template override for this config's messages; absent, null or "" uses the destination's.

training_window_daysinteger nullable

At most 3,000,000 histogram buckets; a stored row over the limit trains clamped to it.

Example request

{
  "priority": 3
}

Response

Created

AnomalyConfigResponse required

Changes

No recorded changes to this operation across all 1 revision of this API.