Alerts
Production - Alert creation, threshold monitoring, notifications
The Alert system monitors data conditions and triggers notifications when thresholds are crossed. Alerts can be configured on SQL queries, metrics, or dashboard widgets.
12.4.3.1Alert Configuration
# Create an alert
curl -X POST http://localhost:8000/api/v1/bi/alerts \
-H "Content-Type: application/json" \
-H "X-Tenant-ID: acme-corp" \
-d '{
"name": "Revenue Drop Alert",
"description": "Alert when daily revenue drops below $50K",
"sql": "SELECT SUM(revenue) as daily_revenue FROM orders WHERE order_date = CURRENT_DATE",
"condition": {"operator": "less_than", "threshold": 50000},
"schedule": "0 */1 * * *",
"notification_channels": ["email", "slack"],
"recipients": ["admin@acme.com"]
}'{
"alert_id": "alert-uuid-123",
"name": "Revenue Drop Alert",
"status": "active",
"last_evaluated": null,
"last_triggered": null,
"created_at": "2025-01-15T10:30:00Z"
}Alert Operators
| Operator | Description |
|---|---|
greater_than | Value exceeds threshold |
less_than | Value falls below threshold |
equals | Value matches exactly |
not_equals | Value does not match |
percentage_change | Percentage change from baseline |
anomaly | Statistical anomaly detection |