<\!DOCTYPE html> Dashboard and Analytics

Dashboard and Analytics

The Mail-Rulez dashboard provides comprehensive monitoring and analytics for your email automation system. This guide covers how to interpret dashboard metrics, configure monitoring alerts, and use analytics to optimize your email processing.

Dashboard Overview

The main dashboard gives you an at-a-glance view of your entire Mail-Rulez system:

Screenshot: Main dashboard with all widgets

Key Metrics

System Health

  • Overall system status (Healthy/Warning/Error)
  • Service uptime and availability
  • Current processing status
  • Resource utilization

Processing Statistics

  • Emails processed today/week/month
  • Rules executed and success rates
  • List management activity
  • Retention policy executions

Account Status

  • Active/inactive account count
  • Last processing time per account
  • Current queue depth
  • Connection health

Widget Breakdown

System Status Widget

Screenshot: System status widget

Health Indicators:

  • 🟢 Healthy: All systems operating normally
  • 🟡 Warning: Minor issues or performance concerns
  • 🔴 Error: Critical issues requiring attention
  • âš« Offline: System not responding

Status Details:

  • Database connectivity
  • Scheduler status
  • Background services
  • Disk space and memory usage

Processing Statistics Widget

Screenshot: Processing statistics widget

Real-Time Metrics:

  • Emails processed in last hour
  • Current processing rate (emails/minute)
  • Average processing time per email
  • Queue length and wait times

Historical Trends:

  • Daily processing volume graphs
  • Weekly/monthly trend analysis
  • Peak usage identification
  • Performance over time

Account Health Widget

Screenshot: Account health monitoring

Per-Account Status:

  • Connection status (Connected/Disconnected/Error)
  • Last successful processing time
  • Current email queue size
  • Processing mode (Startup/Maintenance)

Quick Actions:

  • Test account connection
  • Force immediate processing
  • View account-specific logs
  • Edit account settings

Rule Performance Widget

Rule Execution Metrics:

  • Most frequently triggered rules
  • Rules with highest success rates
  • Rules causing errors or timeouts
  • Rules not triggered recently

Optimization Insights:

  • Identify unused rules
  • Find performance bottlenecks
  • Suggest rule improvements
  • Highlight conflicting rules

Analytics and Reporting

Email Volume Analytics

Screenshot: Email volume analytics dashboard

Volume Trends:

  • Hourly processing patterns
  • Daily volume averages
  • Weekly and monthly trends
  • Year-over-year comparisons

Source Analysis:

  • Email volume by account
  • Top sender domains
  • Email type distribution
  • Attachment size analysis

Rule Effectiveness Analytics

Rule Performance Metrics:

  • Execution frequency per rule
  • Success/failure rates
  • Average execution time
  • Resource usage per rule

Rule Impact Analysis:

  • Emails affected by each rule
  • Storage savings from rules
  • Time savings from automation
  • User intervention reduction

List Management Analytics

List Growth Tracking:

  • Whitelist/blacklist size over time
  • New additions per week/month
  • List effectiveness metrics
  • Training folder activity

List Performance:

  • Hit rates for each list
  • False positive/negative analysis
  • List maintenance recommendations
  • Duplicate detection results

Storage and Retention Analytics

Screenshot: Storage usage analytics

Storage Metrics:

  • Total storage used per account
  • Storage freed by retention policies
  • Largest folders and email sizes
  • Growth rate analysis

Retention Effectiveness:

  • Emails moved to trash vs. permanently deleted
  • Recovery rate from trash
  • Policy execution success rates
  • Storage optimization opportunities

Custom Dashboards

Creating Custom Views

Dashboard Customization:

  1. Click "Customize Dashboard"
  2. Drag and drop widgets
  3. Resize widgets to fit your needs
  4. Save custom layouts

Screenshot: Dashboard customization interface

Widget Options:

  • Chart types (line, bar, pie, gauge)
  • Time ranges (hour, day, week, month)
  • Data filters (account, rule, list type)
  • Refresh intervals

Role-Based Dashboards

Administrator Dashboard:

  • System health and performance
  • All account monitoring
  • Resource usage trends
  • Error and alert summaries

User Dashboard:

  • Personal account status
  • Individual processing statistics
  • Recent rule activity
  • Personal email trends

Operations Dashboard:

  • Service status monitoring
  • Performance bottlenecks
  • Maintenance requirements
  • Capacity planning metrics

Alert Configuration

Setting Up Alerts

Navigate to Monitoring → Alerts to configure notifications:

Screenshot: Alert configuration interface

Alert Types:

  • System Alerts: Server issues, resource problems
  • Processing Alerts: Failed email processing, queue backups
  • Security Alerts: Authentication failures, unusual activity
  • Performance Alerts: Slow processing, resource limits

Alert Thresholds

Performance Thresholds:

  • Processing time > 5 minutes per batch
  • Queue depth > 1000 emails
  • Memory usage > 80%
  • Error rate > 5%

System Thresholds:

  • Disk space < 10% free
  • Service downtime > 5 minutes
  • Database connectivity issues
  • Backup failures

Notification Channels

Email Notifications:

  • Configure SMTP settings
  • Set recipient lists per alert type
  • Customize email templates
  • Set notification frequency limits

Webhook Integration:

  • Slack channel notifications
  • Discord bot integration
  • Custom API endpoints
  • PagerDuty integration

In-App Notifications:

  • Dashboard banner alerts
  • Popup notifications
  • Badge counters
  • Alert history log

Performance Monitoring

Real-Time Performance Metrics

Screenshot: Real-time performance monitoring

CPU and Memory:

  • Current usage percentages
  • Historical usage trends
  • Peak usage identification
  • Resource allocation efficiency

Network Performance:

  • IMAP connection status
  • Network latency measurements
  • Bandwidth usage
  • Connection pool utilization

Database Performance:

  • Query execution times
  • Database connection count
  • Index usage efficiency
  • Storage growth rates

Performance Optimization Insights

Bottleneck Identification:

  • Slowest operations identification
  • Resource constraint analysis
  • Optimization recommendations
  • Capacity planning suggestions

Efficiency Metrics:

  • Emails processed per minute
  • Rules per second execution
  • Storage efficiency ratios
  • Resource utilization rates

Troubleshooting with Dashboard Data

Using Dashboard for Diagnostics

Problem Identification:

  1. Check system status widget for overall health
  2. Review recent processing statistics
  3. Examine account-specific metrics
  4. Analyze error patterns in alerts

Performance Investigation:

  1. Compare current metrics to historical baselines
  2. Identify correlation between issues and usage patterns
  3. Check resource utilization during problem periods
  4. Review concurrent activity levels

Common Diagnostic Scenarios

Slow Processing Investigation:

  • Check current queue depths
  • Review processing rate trends
  • Examine resource usage patterns
  • Identify problematic accounts or rules

Connection Issues Diagnosis:

  • Review account health status
  • Check authentication error patterns
  • Monitor network connectivity metrics
  • Analyze IMAP server response times

High Resource Usage Analysis:

  • Identify peak usage periods
  • Correlate with processing activities
  • Check for memory leaks or resource locks
  • Review concurrent operation counts

Dashboard Maintenance

Data Retention

Historical Data Management:

  • Raw metrics: 7 days
  • Hourly aggregates: 30 days
  • Daily aggregates: 1 year
  • Monthly aggregates: 5 years

Storage Optimization:

  • Automatic data aggregation
  • Configurable retention periods
  • Manual data export options
  • Archive old dashboard data

Dashboard Performance

Optimization Strategies:

  • Limit concurrent dashboard users
  • Use appropriate time ranges for queries
  • Cache frequently accessed data
  • Optimize database queries

Refresh Configuration:

  • Real-time widgets: 30 seconds
  • Statistics widgets: 5 minutes
  • Trend analysis: 1 hour
  • Historical reports: Manual refresh

Integration with External Tools

Metrics Export

Prometheus Integration:

# Prometheus configuration
- job_name: 'mail-rulez'
  static_configs:
    - targets: ['localhost:5001']
  metrics_path: '/metrics'
  scrape_interval: 30s

Available Metrics:

  • mailrulez_emails_processed_total
  • mailrulez_rules_executed_total
  • mailrulez_processing_duration_seconds
  • mailrulez_queue_depth

Grafana Dashboards

Pre-built Dashboards:

  • System overview dashboard
  • Email processing metrics
  • Performance monitoring
  • Alert management

Custom Dashboard Creation:

  • Import Mail-Rulez data sources
  • Create custom visualizations
  • Set up advanced alerting
  • Share dashboards across team

Log Aggregation

ELK Stack Integration:

  • Forward logs to Elasticsearch
  • Create Kibana visualizations
  • Set up log-based alerting
  • Correlate logs with metrics

Splunk Integration:

  • Configure log forwarding
  • Create custom dashboards
  • Set up automated monitoring
  • Generate compliance reports

Best Practices

Dashboard Usage

  1. Regular Monitoring: Check dashboard daily for system health
  2. Trend Analysis: Review weekly trends for optimization opportunities
  3. Alert Response: Establish procedures for different alert types
  4. Performance Baselines: Document normal operating ranges

Customization Guidelines

  1. Role-Appropriate Views: Customize dashboards for different user roles
  2. Relevant Metrics: Focus on metrics that drive actionable insights
  3. Appropriate Time Ranges: Use time ranges appropriate for decision-making
  4. Visual Clarity: Keep dashboards clean and easy to read

Maintenance Procedures

  1. Regular Reviews: Monthly dashboard effectiveness reviews
  2. Performance Optimization: Quarterly dashboard performance tuning
  3. Alert Tuning: Adjust alert thresholds based on operational experience
  4. Data Cleanup: Regular cleanup of old metrics and logs

Next Steps

With monitoring and analytics configured:

  1. Log Management - View logs through the web interface Logs tab
  2. Backup Procedures - See First-Time Setup
  3. Performance Tuning - Use metrics from Performance Monitoring above
  4. Troubleshooting Guide - Use metrics for problem solving