Anomaly Detection
Automatic monitoring and alerting for platform health issues. Muin's AI watches for unusual patterns and alerts you before problems escalate.
Muin continuously monitors your platform health, using statistical analysis to detect unusual patterns before they become problems. This guide explains how anomaly detection works and how to use it effectively.
How Anomaly Detection Works
Muin analyzes platform metrics using multiple detection methods:
Metrics Collection → Statistical Analysis → Anomaly Detection → Alerting
│ │ │ │
Prometheus Z-scores, trends Classify issues Dashboard
Detection Methods
| Method | What It Detects |
|---|---|
| Z-Score | Values far from the historical average (>3 standard deviations) |
| Spike Detection | Sudden increases (>50% above baseline) |
| Drop Detection | Sudden decreases (>50% below baseline) |
| Threshold | Values exceeding absolute limits |
What Muin Monitors
API Performance
- Error rate - Percentage of failed requests
- Latency - Response time (P95)
AI & LLM Usage
- Bedrock latency - AI processing time
- Bedrock errors - Failed AI calls
- Token usage - AI credit consumption
Database Health
- Connection pool - Available connections
- Query latency - Database response time
Background Workers
- Queue depth - Pending tasks
- Task failures - Failed background jobs
Authentication
- Login failures - Failed authentication attempts
- Token refresh errors - Session issues
System Resources
- Memory usage - RAM consumption
- CPU usage - Processor load
Severity Levels
Anomalies are classified by severity:
| Severity | Meaning | Example |
|---|---|---|
| Critical | Immediate attention needed | Error rate >10%, service down |
| Warning | Should investigate soon | Latency 2x normal, queue backing up |
| Info | Notable but not urgent | Slight increase in usage |
Using the Anomaly Dashboard
Accessing the Dashboard
- Navigate to Platform → Anomaly Detection
- View the summary cards at the top
- Browse detected anomalies below
Requires admin access (Owner or Admin role)
Summary Cards
The top of the dashboard shows four cards:
- Critical Anomalies - Count of critical-severity detected issues (red)
- Warning Anomalies - Count of warning-severity issues (yellow)
- Info Anomalies - Count of informational notices (blue)
- Metrics Monitored - Number of metrics being watched
Filtering Anomalies
Use the filters to focus on specific issues:
- By Severity - Show only critical, warning, or info
- By Category - Filter by API, LLM, database, etc.
Running Manual Detection
Click Run Detection to immediately scan all metrics:
- Analysis runs for the past 24 hours by default
- Results show any newly detected anomalies
- Use this when troubleshooting issues
Understanding Anomaly Cards
Each detected anomaly shows:
| Field | Description |
|---|---|
| Title | Brief description of the issue |
| Description | Detailed explanation |
| Metric | Which metric triggered the alert |
| Current Value | The observed value |
| Expected Value | What the value should be |
| Deviation | How far off from expected (%) |
| Detected At | When the anomaly was found |
| Category | System area (API, database, etc.) |
Prometheus Integration
Anomaly detection requires Prometheus for metric collection.
Health Status
The dashboard shows Prometheus connection status:
- Healthy (green) - Connected and collecting metrics
- Unhealthy (red) - Connection issues, contact support
Metric Count
Shows how many metrics are being collected. Higher counts indicate more comprehensive monitoring.
Best Practices
Monitor Regularly
Check the anomaly dashboard daily, especially during:
- After deployments
- Peak usage periods
- When users report issues
Investigate Promptly
- Critical: Address immediately (within 1 hour)
- Warning: Investigate same day
- Info: Review during regular maintenance
False Positives
Some anomalies may be expected behavior:
- Scheduled maintenance windows
- Known traffic spikes (marketing campaigns)
- Batch processing jobs
These don’t require action but help you understand normal patterns.
Troubleshooting
No Anomalies Showing
- Check Prometheus health status
- Verify metrics are being collected
- Look at the lookback period (defaults to 24 hours)
Detection Always Fails
- Contact your administrator
- Check application logs for errors
- Verify network connectivity
Too Many Alerts
- Review threshold settings with your admin
- Some metrics may need tuning for your usage patterns
- Consider adjusting sensitivity
Related Features
- System Health - Overall platform status
- Audit & Security - Security monitoring
- Reports - Custom analytics and reporting