user()?->hasAnyRole(['Super-Admin', 'Admin']), 403); }); $health = computed(fn () => app(SystemStatus::class)->health()); $application = computed(fn () => app(SystemStatus::class)->application()); $tasks = computed(fn () => app(SystemStatus::class)->scheduledTasks()); $failedJobs = computed(fn () => app(SystemStatus::class)->failedJobs()); $errors = computed(fn () => app(SystemStatus::class)->recentLogEntries('laravel', ['ERROR', 'CRITICAL', 'ALERT', 'EMERGENCY'])); $alerts = computed(fn () => app(SystemStatus::class)->recentLogEntries('monitoring', ['CRITICAL', 'ERROR', 'WARNING'])); $links = computed(fn () => app(SystemStatus::class)->links()); $refresh = function () { unset($this->health, $this->tasks, $this->failedJobs, $this->errors, $this->alerts); }; $sendTestAlert = function () { OperationalAlert::send('Test-Alarm aus dem Admin (Monitoring)', ['ausgeloest_von' => auth()->id()]); unset($this->alerts); Flux::toast(variant: 'success', heading: 'Test-Alarm gesendet', text: 'Mail und Push gehen an die konfigurierten Empfänger; der Eintrag steht unten unter „Alarme“.'); }; ?> @php $statusColor = fn (string $status) => match ($status) { HealthProbe::StatusOk => 'green', HealthProbe::StatusWarn => 'amber', default => 'red', }; $statusLabel = fn (string $status) => match ($status) { HealthProbe::StatusOk => 'OK', HealthProbe::StatusWarn => 'Warnung', default => 'Kritisch', }; @endphp
Monitoring Zustand von Website und Server – dieselben Prüfungen, die Uptime Kuma über /health abfragt.
@foreach ($this->links as $label => $url) {{ $label }} @endforeach Test-Alarm Neu prüfen
{{-- Gesamtstatus und Prüfungen --}}
Prüfungen {{ $statusLabel($this->health['status']) }}
@foreach ($this->health['checks'] as $check)
{{ $check['label'] }} {{ $statusLabel($check['status']) }}
{{ $check['detail'] }}
@endforeach
{{-- Anwendung --}} Anwendung
Version
{{ $this->application['version'] }}
Ausgeliefert
{{ $this->application['deployed_at']?->format('d.m.Y H:i') ?? '—' }}
Umgebung
{{ $this->application['environment'] }}
Debug-Modus
@if ($this->application['debug'] && app()->environment('production')) an – auf Live ausschalten @else {{ $this->application['debug'] ? 'an' : 'aus' }} @endif
PHP / Laravel
{{ $this->application['php'] }} / {{ $this->application['laravel'] }}
{{-- Geplante Aufgaben --}} Geplante Aufgaben @if ($this->tasks === []) Keine geplanten Aufgaben gefunden. @else
@foreach ($this->tasks as $task)
{{ $task['command'] }}
@if ($task['description'] !== '')
{{ $task['description'] }}
@endif
{{ $task['expression'] }}
nächster Lauf {{ $task['next']?->format('d.m. H:i') ?? '—' }}
@endforeach
@endif
{{-- Fehler aus dem Log --}}
Letzte Fehler Aus storage/logs – Details und Häufigkeit in GlitchTip
@if ($this->errors === []) Keine Fehler im aktuellen Log. @else
@foreach ($this->errors as $entry)
{{ $entry['at']->format('d.m. H:i:s') }}
{{ $entry['level'] }}
{{ $entry['message'] }}
@endforeach
@endif
{{-- Alarme --}} Alarme @if ($this->alerts === []) Keine Alarme im aktuellen Monitoring-Log. @else
@foreach ($this->alerts as $entry)
{{ $entry['at']->format('d.m. H:i:s') }}
{{ \Illuminate\Support\Str::after($entry['message'], '[monitoring] ') }}
@endforeach
@endif
{{-- Fehlgeschlagene Jobs --}}
Fehlgeschlagene Jobs {{ $this->failedJobs['count'] }}
@if ($this->failedJobs['latest'] === []) Keine fehlgeschlagenen Jobs. @else
@foreach ($this->failedJobs['latest'] as $job)
{{ $job['job'] }} {{ $job['failed_at']->format('d.m. H:i') }}
{{ $job['error'] }}
@endforeach
@endif