@extends('layouts.app-sidebar') @section('content')

System Monitoring

Real-time system health and metrics

Last updated:
@if($worker['running']) @else @endif

DayBot Worker

@if($worker['running']) Running @else Stopped @endif

@if($worker['running']) Uptime: {{ gmdate('H:i:s', $worker['uptime'] ?? 0) }} | Memory: {{ $worker['memory_mb'] ?? 0 }} MB @else Worker is not responding @endif

View Health Details →

Global Metrics (24h)

Messages 24h
{{ number_format($global->messages_last_24h ?? 0) }}

{{ number_format($global->messages_last_10m ?? 0) }} in last 10m

Active Bots
{{ $global->active_tenants ?? 0 }}

Currently running

AI Calls 24h
{{ number_format($global->ai_calls_last_24h ?? 0) }}

Avg latency: {{ $global->avg_ai_latency_ms ?? 0 }}ms

AI Errors 24h
{{ $global->ai_errors_last_24h ?? 0 }}

YT errors: {{ $global->yt_errors_last_24h ?? 0 }}

Message Activity (6h)

Error Trend (24h)

Per-Tenant Statistics

{{ $tenants->count() }} tenants
@forelse($tenants as $tenant) @empty @endforelse
Channel Status AI
@if($tenant->channel_avatar_url) Avatar @else
{{ strtoupper(substr($tenant->channel_title, 0, 1)) }}
@endif

{{ $tenant->channel_title }}

{{ $tenant->user->name ?? 'N/A' }}

@if($tenant->status === 'running' && $tenant->live_chat_id) Live @elseif($tenant->status === 'running') Active @elseif($tenant->status === 'error') Error @else Stopped @endif @if($tenant->ai_enabled ?? false) @else @endif

No tenants found

Recent Alerts

Last 20
@if($alerts->isEmpty())

No recent alerts

@else
@foreach($alerts as $alert)
@if($alert->level === 'critical' || $alert->level === 'error') @elseif($alert->level === 'warning') @else @endif
{{ $alert->level }} {{ $alert->created_at->diffForHumans() }} @if($alert->tenant) | {{ $alert->tenant->channel_title }} @endif

{{ $alert->title }}

{{ $alert->message }}

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