Evaluation Timing
Monigo uses two evaluation strategies depending on the alert type:- Real-time evaluation.
usage_exceededandwallet_balance_droppedalerts are checked each time a usage event is ingested or a wallet transaction is recorded. This means thresholds fire within seconds of the underlying value changing. - Periodic evaluation.
cost_exceededalerts are evaluated on a periodic schedule (typically every hour) because cost calculations depend on aggregated usage across an entire billing period. This avoids excessive computation while still providing timely notifications.
Threshold Deduplication
Each threshold within an alert fires at most once per billing period per subscription. Monigo tracks this using alert state records that store the threshold index and the billing period start date. If the same threshold is crossed multiple times within a period (for example, usage fluctuates around the boundary), only the first crossing triggers a notification. This deduplication is per-subscription, so a plan-level alert with 50 subscribers can fire up to 50 times per threshold per period — once for each subscriber that crosses the boundary.Auto-Reset
At the start of each new billing period, all triggered alert states for that subscription are automatically reset tomonitoring. This means:
- Thresholds that fired in the previous period can fire again in the new period.
- No manual intervention is required to “re-arm” alerts.
- Historical triggered states are preserved for audit purposes — only the active tracking state is reset.

