Expand description
Alert evaluation engine.
Evaluates DOL alert rules against live metric samples. Supports duration
guards (e.g. “for 2m”) and actions: print, webhook (HTTP POST), and
restart (container restart via bollard).
§Example
ⓘ
let rule = parser::parse(r#"alert when cpu > 80% for 2m then print "High""#)?;
let mut evaluator = AlertEvaluator::new();
let events = evaluator.evaluate_samples(&rule, &samples, Instant::now())?;Structs§
Enums§
Functions§
- duration_
to_ std - evaluate_
alert_ once - init_
alert_ timeouts - Initialise the global alert timeout cache. Should be called once at startup.
- render_
alert_ event