@extends('layouts.app') @section('title', 'Monitoring') @section('breadcrumb') @endsection @section('content')

System Monitoring

System Status
Online
Active APIs
{{ \App\Models\ApiSource::where('status', 'active')->count() + \App\Models\ApiTarget::where('is_active', true)->count() }}
Today's Requests
{{ \App\Models\ApiLog::whereDate('created_at', today())->count() }}
Error Rate
@php $totalLogs = \App\Models\ApiLog::whereDate('created_at', today())->count(); $errorLogs = \App\Models\ApiLog::whereDate('created_at', today())->where('status_code', '>=', 400)->count(); $errorRate = $totalLogs > 0 ? round(($errorLogs / $totalLogs) * 100, 1) : 0; @endphp {{ $errorRate }}%
Recent API Activity
@php $recentLogs = \App\Models\ApiLog::with('apiSource')->latest()->limit(10)->get(); @endphp @if($recentLogs->count() > 0)
@foreach($recentLogs as $log) @endforeach
Time API Source Status Response Time Details
{{ $log->created_at->format('H:i:s') }} {{ $log->apiSource->name ?? 'Unknown' }} {{ $log->status_code }} {{ number_format($log->response_time, 2) }}s @if($log->error_message) {{ Str::limit($log->error_message, 50) }} @else Success @endif
@else

No recent activity found

@endif
System Information

PHP Version:

Laravel Version:

Database:

Server Time:

{{ PHP_VERSION }}

{{ app()->version() }}

{{ config('database.default') }}

{{ now()->format('d M Y, H:i:s T') }}

Database Statistics

API Sources:

API Targets:

API Receivers:

Total Logs:

{{ \App\Models\ApiSource::count() }}

{{ \App\Models\ApiTarget::count() }}

{{ \App\Models\ApiReceiver::count() }}

{{ \App\Models\ApiLog::count() }}

@endsection @section('scripts') @endsection