{{ __('Monitoring Center') }}

System operational since {{ $stats['uptime'] }} at node {{ $stats['hostname'] }}

{{ __('Infrastructure Feed') }}
ONLINE
Redis Cache
{{ $stats['redis']['latency'] ?? '0ms' }} | {{ $stats['redis']['memory_used'] ?? 'Unknown' }}
{{ ($stats['redis']['status'] ?? '') === 'connected' ? 'CONNECTED' : 'DISCONNECTED' }}
Database Engine
{{ $stats['db_stats']['tables'] }} Tables | {{ $stats['db_stats']['latency'] ?? '0ms' }}
{{ $stats['db_stats']['status'] ?? 'STABLE' }}
Real-time Echo
WebSocket (Reverb) active
{{ $stats['has_reverb'] ? 'ACTIVE' : 'IDLE' }}
SAP RFC Bridge
Trace: {{ $stats['sap']['size'] }}
{{ $stats['sap']['status'] }}
Mobile Telemetry
{{ $stats['mobile']['total_logs'] }} Events recorded
{{ $stats['mobile']['last_activity'] }}
Job Throughput
{{ $stats['queues']['load_factor'] }} tasks/min
RUNNING
CPU

{{ $stats['cpu'] }}%

RAM

{{ $stats['ram']['percentage'] }}%

{{ $stats['ram']['used'] }} used Swap: {{ $stats['ram']['swap']['percentage'] ?? 0 }}%
DISK

{{ $stats['disk']['percentage'] }}%

{{ $stats['disk']['total'] }} available

USERS

{{ $stats['users']['total'] }}

{{ $stats['users']['authenticated'] }} Authenticated

PENDING

{{ $stats['queues']['pending'] }}

INCIDENTS

{{ $stats['queues']['failed'] }}

@cantab('health and logs', 'system-monitor')
Runtime Activity
@can('manage health and logs') Export CSV @endcan
INCIDENT TIME LVL MANIFEST INTEL
@endcantab @cantab('health and logs', 'error-logs')
Queue Pipeline
@can('manage health and logs') @endcan
@can('manage health and logs') @endcan
TIMESTAMP DISPOSITION CHANNEL DATA TASK DETAILACTION
SAP RFC Trace (dev_rfc.trc)
@can('manage health and logs') Export CSV @endcan
TIMESTAMP TRACE BLOCK SUMMARY DETAIL
Mobile Device Telemetry
@can('manage health and logs') Export CSV @endcan
TIMESTAMP LVL USER MESSAGE DETAIL
@endcantab @cantab('health and logs', 'ai-log-analysis')
AI-Driven System Hardening

--

Score
SCANNING...

Last audit: Never

Security Analysis & Hardening Recommendations

No Active Audit Found

Click the "RE-AUDIT SYSTEM" button above to initiate an AI-driven security analysis.

@endcantab @cantab('health and logs', 'query-logs')
Storage Metric
Volume Footprint {{ $stats['db_stats']['size'] }}
Active Ecosystem Tables {{ $stats['db_stats']['tables'] }}
Forensic Usage Breakdown
@foreach($stats['db_stats']['top_tables'] ?? [] as $t)
{{ $t->table }} {{ $t->size_pretty }}
@endforeach
@endcantab {{-- DOCUMENTATION --}} @cantab('health and logs', 'system-monitor')
Monitoring Center · Reference Auto-refresh every 5s · Host {{ $stats['hostname'] }}
{{-- HERO INTRO --}}

What the Monitoring Center shows you

A single pane of glass that aggregates five live telemetry streams — application logs, mobile clients, SAP RFC traces, queue workers, and an AI-driven security audit — on top of host vitals (CPU / RAM / Disk). All data is polled every 5 seconds; counters animate when they change.

DATA SOURCES
Where the numbers come from
OS sysinfo (CPU / RAM / Disk)
Postgres / Redis live ping
storage/logs/laravel.log
dev_rfc.trc (SAP)
mobile_logs table
jobs + failed_jobs
{{-- TOP GRID GUIDE --}}
Top grid · Three columns explained
Infrastructure Feed (left)
Live health pings of every external service: Redis, Postgres, Reverb WebSocket, SAP RFC bridge, Mobile telemetry, Job throughput. Status text turns red as soon as a ping fails.
Vital Numbers (middle)
Host metrics: CPU load, RAM usage with swap, Disk usage, Active Users. The percentages animate via counter-value and the mini-progress bar reflects load in real time.
Automation (right)
Two stacked critical counters: pending jobs and failed/incident count. These come from Laravel's jobs and failed_jobs tables and update every cycle.
{{-- TAB-BY-TAB GUIDE --}}
Console tabs · What each one does
@php $tabs = [ ['icon'=>'bi-terminal', 'name'=>'Logs', 'color'=>'#0f172a', 'desc'=>'Tails storage/logs/laravel.log. Each row classifies INFO / WARN / ERROR / DEBUG. Click the row to open the terminal modal with the full message + stack trace. Admins can clear or export CSV.'], ['icon'=>'bi-phone', 'name'=>'Mobile', 'color'=>'#3b82f6', 'desc'=>'Telemetry from mobile clients hitting the API. Shows level, user, payload. Useful to verify a mobile deploy is reaching the right user pool.'], ['icon'=>'bi-broadcast', 'name'=>'SAP RFC', 'color'=>'#8b5cf6', 'desc'=>'Parsed blocks from dev_rfc.trc. Each block represents a roundtrip to SAP. Critical for diagnosing integration failures between Laravel and the SAP backend.'], ['icon'=>'bi-cpu', 'name'=>'Queues', 'color'=>'#f59e0b', 'desc'=>'Lists pending and failed background jobs. From here you can retry any failed job individually, retry all at once, or flush the queue entirely.'], ['icon'=>'bi-shield-lock', 'name'=>'Security AI', 'color'=>'#ef4444', 'desc'=>'Runs an AI-driven security audit of the running app: env file exposure, weak headers, missing CSRF / rate-limits, debug mode in prod, default credentials. Returns a numerical score + markdown hardening report.'], ['icon'=>'bi-search', 'name'=>'Forensics', 'color'=>'#22c55e', 'desc'=>'Database volume footprint, total table count, and a ranked list of the heaviest tables. Use this when storage growth becomes a concern.'], ]; @endphp
@foreach($tabs as $t)
{{ $t['name'] }}
{!! $t['desc'] !!}
@endforeach
{{-- SIGNAL DICTIONARY --}}
How to read the indicators
ONLINE / CONNECTED / RUNNING
All systems responding within latency budget. The pulsing dot animation indicates a recent successful ping.
DISCONNECTED / OFFLINE
Service is unreachable. Check the corresponding env config (Redis host, DB credentials, SAP destination) and that the underlying daemon is running.
IDLE
Service is configured but not currently emitting traffic — not necessarily broken (e.g. Reverb with no active subscribers).
STABLE
Database engine status — Postgres responding, latency under threshold.
{{-- THRESHOLDS --}}
Recommended thresholds
METRIC HEALTHY WARN CRITICAL WHAT TO DO
CPU Load < 60% 60–80% > 80% Check long-running queries / N+1 patterns / runaway workers.
RAM Usage < 70% 70–85% > 85% + swap Restart PHP-FPM / inspect cache size / scale instance.
Disk Usage < 75% 75–90% > 90% Rotate logs, prune old backups, run Forensics tab to find heavy tables.
Failed Jobs 0 1–10 > 10 or rising Open Queues tab, inspect payload, retry or flush.
Security Score ≥ 85 60–84 < 60 Re-audit in Security AI tab, apply recommendations.
{{-- SECURITY AI HOW IT WORKS --}}
Security AI · How the audit works
What it inspects
  • Debug mode flag in production
  • HTTPS / HSTS / security headers
  • Default / weak credentials in seeders
  • Rate-limiting on auth endpoints
  • CSRF token enforcement
  • Session driver & cookie flags
  • File permissions on .env, storage/
How to use
  1. Click RE-AUDIT SYSTEM
  2. AI scans config + runtime state
  3. Returns a score 0–100 and a Markdown report
  4. Apply each "Recommendation" row by row — typically copy/paste config changes
  5. Re-audit to confirm the score improved
{{-- PERMISSIONS --}}
Permissions
view health and logs
Required to open the Monitoring Center and view standard telemetry (Logs, Mobile, SAP, Queues).
manage health and logs
Required to clear logs, retry / flush jobs, and toggle maintenance.
view ai log analysis
Exclusive to Developer role. Required to access the Security AI Audit tab and run AI-driven scans.
{{-- HEALTH CHECKLIST (LIVE) --}}
Live health snapshot
$ monitor --self-check
[01] Host:        {{ $stats['hostname'] }}
[02] Uptime:      {{ $stats['uptime'] }}
[03] CPU load:    {{ $stats['cpu'] }}%
[04] RAM usage:   {{ $stats['ram']['percentage'] }}% ({{ $stats['ram']['used'] }})
[05] Disk usage:  {{ $stats['disk']['percentage'] }}% ({{ $stats['disk']['total'] }} available)
[06] Redis:       {{ ($stats['redis']['status'] ?? 'unknown') }}
[07] Reverb WS:   {{ $stats['has_reverb'] ? 'active' : 'idle' }}
[08] SAP RFC:     {{ $stats['sap']['status'] }}
[09] DB tables:   {{ $stats['db_stats']['tables'] }}
[10] Pending:     {{ $stats['queues']['pending'] ?? 0 }} jobs
[11] Failed:      {{ $stats['queues']['failed'] ?? 0 }} jobs
# This snapshot was rendered at page load. The dashboard above
# refreshes every 5 seconds via /api/system-stats.
{{-- TROUBLESHOOTING --}}
Common scenarios & remedies
SYMPTOM FIRST CHECK LIKELY FIX
Logs tab is empty File permissions on storage/logs/laravel.log Run chmod -R 775 storage/
Redis shows DISCONNECTED REDIS_HOST / port in .env Restart redis container / verify redis-cli ping
Many failed jobs Open Queues tab, inspect any row Retry one to surface the error, fix root cause, then Retry All
SAP RFC blank Trace file dev_rfc.trc exists & readable Restart SAP RFC bridge / enable trace level in SAP config
Security score dropped Read the latest report carefully Apply each recommendation, re-audit until back to green
Disk > 90% Forensics tab — heaviest tables Truncate logs / archive old data / increase volume
{{-- FOOTER NOTE --}}
Performance notes
Polling runs at 5000ms. To reduce server load on slower environments, increase REFRESH_RATE in this view's script. The Security AI audit is on-demand only (never polled) because each run consumes AI tokens. Active tab is persisted in localStorage as systemMonitoringActiveTab.
@endcantab
@push('scripts') @endpush