From 2e3dc15b173f7c0521a60d8a8b2682adcb083f8f Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Mon, 17 Aug 2026 17:34:06 +0300 Subject: [PATCH] feat: describe the metric monitor window rule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A metric monitor's firing condition was minBreachPoints alone, whose zero meant every point. Add windowRule beside it — at_all_times, at_least, on_average, in_total — and say that the count belongs to at_least. Omitting windowRule keeps the old reading, which is how a monitor saved before the field existed is interpreted. --- openapi.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 180233d..194ff69 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -6817,11 +6817,23 @@ components: Whether the anomaly and forecast models fit a repeating cycle. auto fits the cycles the training window supports. enum: [auto, off] + windowRule: + type: string + description: >- + How the evaluation window collapses to one verdict. at_all_times fires only + when every point breaches; at_least fires when minBreachPoints of them do; + on_average and in_total compare the window's mean or its sum against the + range, and are accepted on threshold monitors only. Omit it and the rule is + read from minBreachPoints, which is how a monitor saved before this field + existed is interpreted. + enum: [at_all_times, at_least, on_average, in_total] minBreachPoints: type: integer description: >- - How many points of the evaluation window must breach before the monitor fires. - Must not exceed numEvalPoints. + How many points of the evaluation window must breach before the monitor + fires. It belongs to windowRule at_least, and is ignored under every other + rule. A value at or above numEvalPoints is every point, and is stored as + at_all_times. trainingPeriod: type: number description: >-