Threshold rules: hysteresis and sustained breach #54

Closed
opened 2026-10-31 08:12:20 +00:00 by Gilles · 0 comments
Owner

A metric oscillating around its threshold flips the report between ok and warn every hour (garion swap_pct vs >= 95: 90-100 % every night, several 1-report warn episodes).

Two optional params on metric_threshold rules, both unset by default (unchanged behaviour):

  • recover: back to ok only once the value crosses this second limit (e.g. warn >= 95, recover < 85);
  • for_count: the breach must hold for N consecutive reports of the stream before the level is raised.

Applied the same way in thresholds.apply (report status / badges) and in _on_metric_threshold (events). The metric keeps its raw value and gets a pending marker while a breach isn't confirmed yet.

A metric oscillating around its threshold flips the report between ok and warn every hour (garion `swap_pct` vs `>= 95`: 90-100 % every night, several 1-report warn episodes). Two optional params on `metric_threshold` rules, both unset by default (unchanged behaviour): - `recover`: back to ok only once the value crosses this second limit (e.g. warn >= 95, recover < 85); - `for_count`: the breach must hold for N consecutive reports of the stream before the level is raised. Applied the same way in `thresholds.apply` (report status / badges) and in `_on_metric_threshold` (events). The metric keeps its raw value and gets a pending marker while a breach isn't confirmed yet.
Sign in to join this conversation.
No description provided.