MATIH Platform is in active MVP development. Documentation reflects current implementation status.
12. AI Service
BI Analytics Platform
Alerts

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

OperatorDescription
greater_thanValue exceeds threshold
less_thanValue falls below threshold
equalsValue matches exactly
not_equalsValue does not match
percentage_changePercentage change from baseline
anomalyStatistical anomaly detection