Alerts
Create alert rules that fire when a metric exceeds a threshold or shows anomalous behaviour. Alerts send email notifications via Resend and are tracked in an event log.
Screenshot needed
Alerts page: list of 3 rules. First rule: red left border, 'FIRING' red badge, name='High P99 Latency', metric='http.server.request.duration gt 1000', service='api-gateway', Last fired='14:32'. Second: green 'OK' badge, 'Anomaly Detection', z>2.5. Third: green 'OK', 'High CPU Usage', gt 0.8. Below the list: 'Recent Events' section showing last 5 fired events in a table.
Rule types
Threshold rules
Fire when a metric's average value over a time window exceeds (gt) or falls below (lt) a fixed value.
Examples:
| Metric | Operator | Value | Meaning |
|---|---|---|---|
| http.server.request.duration | gt | 1000 | P99 latency > 1 second |
| system.cpu.utilization | gt | 0.8 | CPU above 80% |
| http.server.request.duration | lt | 0.001 | Suspiciously fast (possible cache bug) |
Anomaly detection rules
Fire when a metric's current value deviates from its 7-day historical baseline by more than N standard deviations (Z-score). Useful for catching unusual spikes without knowing the "normal" value in advance.
| Z-score threshold | Sensitivity |
|---|---|
| 2.0 | High — fires on moderate deviations (more noise) |
| 2.5 | Medium — good default |
| 3.0 | Low — only fires on significant anomalies (less noise) |
Creating a rule
Screenshot needed
Create alert rule modal: Name field='High P99 Latency', Alert type toggle showing 'Threshold' selected, Metric dropdown='http.server.request.duration', Service dropdown='api-gateway', Operator='>', Value='1000', Unit='ms', Window=5min, Notification email='[email protected]'. 'Save rule' button at bottom.
Roles
| Action | Min role |
|---|---|
| View rules and events | Viewer |
| Create / edit rules | Member |
| Delete rules | Admin |
Alert events
Every time a rule fires, an event is recorded in alert_events with the rule name, state (firing/resolved), metric value, and timestamp. The Alerts page shows the last 50 events below the rule list.
Screenshot needed
Alert events table: columns Time, Status, Rule, Service, Value. Rows showing: '14:32 FIRING High P99 Latency api-gateway 3842ms', '09:15 RESOLVED High P99 Latency api-gateway 180ms'