@extends('crm.layouts.app') @section('title', 'System Health') @section('content')

System Health Monitor

Monitor your application's health and performance metrics

Overall Health Score

{{ $systemStatus['health_score'] }}%
{{ ucfirst($systemStatus['overall_status']) }}

System Status

@foreach($systemStatus['checks'] as $checkName => $check)

{{ ucwords(str_replace('_', ' ', $checkName)) }}

{{ $check['message'] }}

@endforeach

Database

@if($healthMetrics['database']['status'] === 'healthy')
Connection Time {{ $healthMetrics['database']['connection_time'] }}ms
Tables {{ $healthMetrics['database']['table_count'] }}
Size {{ $healthMetrics['database']['size_mb'] }} MB
@else
Error: {{ $healthMetrics['database']['error'] }}
@endif

Cache

@if($healthMetrics['cache']['status'] === 'healthy')
Response Time {{ $healthMetrics['cache']['response_time'] }}ms
Driver {{ ucfirst($healthMetrics['cache']['driver']) }}
Hit Rate {{ $performanceData['cache_hit_rate'] }}%
@else
Error: {{ $healthMetrics['cache']['error'] }}
@endif

Storage

@if($healthMetrics['storage']['status'] !== 'unhealthy')
Total Space {{ $healthMetrics['storage']['total_space'] }}
Used Space {{ $healthMetrics['storage']['used_space'] }}
Usage {{ $healthMetrics['storage']['usage_percent'] }}%
@else
Error: {{ $healthMetrics['storage']['error'] }}
@endif

Queue

@if($healthMetrics['queue']['status'] !== 'unhealthy')
Queue Size {{ $healthMetrics['queue']['queue_size'] }}
Failed Jobs {{ $healthMetrics['queue']['failed_jobs'] }}
Driver {{ ucfirst($healthMetrics['queue']['driver']) }}
@else
Error: {{ $healthMetrics['queue']['error'] }}
@endif

Memory

Current {{ $healthMetrics['memory']['current'] }}
Peak {{ $healthMetrics['memory']['peak'] }}
Usage {{ $healthMetrics['memory']['usage_percent'] }}%

CPU Load

1 min {{ number_format($healthMetrics['cpu']['1min'], 2) }}
5 min {{ number_format($healthMetrics['cpu']['5min'], 2) }}
15 min {{ number_format($healthMetrics['cpu']['15min'], 2) }}

Performance Metrics

{{ $performanceData['response_times']['average'] }}ms
Avg Response Time
{{ $performanceData['database_queries']['avg_query_time'] }}ms
Avg Query Time
{{ $performanceData['cache_hit_rate'] }}%
Cache Hit Rate
{{ $performanceData['error_rates']['5xx_errors'] }}
Server Errors (24h)

Recent Error Logs

@if(count($errorLogs) > 0)
@foreach($errorLogs as $log) @endforeach
Time Level Message
{{ $log['timestamp']->format('M d, H:i:s') }} {{ $log['level'] }} {{ $log['message'] }}
@else

No Recent Errors

Your application is running smoothly with no errors in the recent logs.

@endif
@push('scripts') @endpush @endsection