How often are alarm rules evaluated and what is the evaluation pipeline?
Alarm rules are not evaluated in real time — they run on a schedule via a background worker. Understanding this pipeline helps explain why there can be a delay between unusual consumption and receiving an alert.
Evaluation frequency
The alarm worker runs every hour by default. On each cycle it evaluates all enabled alarm rules across all accounts. This means after a meter reading arrives, it may take up to one hour before the worker checks it against your rules.
Evaluation pipeline (per rule)
-
Skip checks — The worker first checks: Is the rule enabled? Is it still in cooldown from a recent trigger? If either is true, the rule is skipped.
-
Fetch latest reading — For the rule's linked meter, the worker retrieves the most recent reading. If no new reading exists since the last evaluation, the rule is skipped.
-
Apply rule logic — Depends on alarm type:
- Threshold: Compares reading value against threshold using the configured operator (>, <, >=, <=, =)
- Schedule: Checks if current time falls within the schedule window, then compares against expected usage
- Pattern: Loads the trained model, calculates expected value with hourly/daily/seasonal adjustments, checks deviation
- Trend: Calculates baseline (YoY or rolling average), applies seasonal adjustment, checks deviation percentage
- AI-learned: Same as pattern with AI-generated configuration
-
Create trigger — If the condition is met, a trigger record is created with measured value, expected value, deviation, and context data.
-
Send notifications — The worker sends notifications through all configured channels (dashboard, email, SMS, push, webhook). High-priority notifications are sent first.
-
Start cooldown — The rule enters its cooldown period and will not fire again until cooldown expires.
Why the delay matters: If you need faster detection for critical equipment, set the cooldown low (e.g., 15 minutes) and ensure your data source sends readings frequently. The worker will pick up new readings on its next hourly cycle.
Where to check: The alarm rule's last_evaluated_at field shows when it was last checked.