{% extends "base.html" %} {% block title %}System Health - AutoModerate{% endblock %} {% block content %}

System Health

Memory Usage

{{ system_stats.memory_used }}

{{ system_stats.memory_percent }}% of available
CPU Usage

{{ system_stats.cpu_percent }}%

Current process
Active Threads

{{ system_stats.threads }}

Running
Uptime

{{ system_stats.uptime_hours }}h

Hours
AI Result Cache
Total Entries {{ cache_stats.ai_cache.total_entries }}
Valid Entries {{ cache_stats.ai_cache.valid_entries }}
Expired Entries {{ cache_stats.ai_cache.expired_entries }}
Cache Size {{ "%.2f"|format(cache_stats.ai_cache.cache_size_mb) }} MB
Oldest Entry Age {{ (cache_stats.ai_cache.oldest_entry_age / 60)|int }} minutes
Database Connection Pool
Pool Size {{ db_stats.pool_size }}
Checked Out Connections {{ db_stats.checked_out }}
Overflow {{ db_stats.overflow }}
Available Connections {{ db_stats.pool_size - db_stats.checked_out }}
Error Tracking
{% if error_stats.errors_last_5min > 0 %} {{ error_stats.errors_last_5min }} errors in last 5 min {% else %} No recent errors {% endif %}
Database Errors

{{ error_stats.error_counts.database }}

Processing Errors

{{ error_stats.error_counts.processing }}

API Errors

{{ error_stats.error_counts.api }}

Moderation Errors

{{ error_stats.error_counts.moderation }}

{% if recent_errors %}
Recent Errors (Last 20)
{% for error in recent_errors %} {% endfor %}
Time Type Message Content ID
{{ error.time_ago }} {% if error.type == 'database' %} {{ error.type }} {% elif error.type == 'processing' %} {{ error.type }} {% elif error.type == 'api' %} {{ error.type }} {% else %} {{ error.type }} {% endif %} {{ error.message[:100] }}{% if error.message|length > 100 %}...{% endif %} {% if error.content_id %} {{ error.content_id[:8] }} {% else %} - {% endif %}
{% else %}

No errors recorded

{% endif %}
{% endblock %}