Muin is in private beta.Watch the public release announcement —talk to us.
Falaah Falaah AI

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

MethodWhat It Detects
Z-ScoreValues far from the historical average (>3 standard deviations)
Spike DetectionSudden increases (>50% above baseline)
Drop DetectionSudden decreases (>50% below baseline)
ThresholdValues 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:

SeverityMeaningExample
CriticalImmediate attention neededError rate >10%, service down
WarningShould investigate soonLatency 2x normal, queue backing up
InfoNotable but not urgentSlight increase in usage

Using the Anomaly Dashboard

Accessing the Dashboard

  1. Navigate to PlatformAnomaly Detection
  2. View the summary cards at the top
  3. 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:

FieldDescription
TitleBrief description of the issue
DescriptionDetailed explanation
MetricWhich metric triggered the alert
Current ValueThe observed value
Expected ValueWhat the value should be
DeviationHow far off from expected (%)
Detected AtWhen the anomaly was found
CategorySystem 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