Analytics | Coolify
@endif
{{-- Header --}}
@if ($scopedServerUuid === null)
Analytics
Request traffic across every application and server, reported by Sentinel.
@endif
@if ($servers->isNotEmpty() && $overview)
@if ($scopedServerUuid === null)
@endif
{{-- Re-key on the server filter so the application listbox re-initializes with the
newly-scoped options (and reset value) instead of showing stale Alpine state. --}}
@include('livewire.traffic._live-toggle')
24 hours
7 days
30 days
@endif
{{-- Nudge: enabled-eligible servers that haven't turned traffic analytics on yet. --}}
@if ($scopedServerUuid === null && ! empty($eligibleDisabledServers))
{{ count($eligibleDisabledServers) === 1 ? '1 server can start collecting traffic analytics' : count($eligibleDisabledServers).' servers can start collecting traffic analytics' }}
Enabling regenerates the proxy config and restarts the proxy + Sentinel (a brief blip).
Works with Traefik & Caddy.
@endif
@if ($servers->isEmpty())
@if ($scopedServerUuid === null)
View servers
@endif
@elseif (! $overview)
@else
@if ($this->isLivePollable())
@endif
{{-- KPIs --}}
Requests
{{ number_format($overview['requests'] ?? 0) }}
@include('livewire.traffic._sparkline', [
'id' => $chartId.'-spark-requests',
'initial' => $this->requestsSpark(),
'colorVar' => '--chart-status-3xx',
'event' => 'refreshChartData-'.$chartId.'-status',
'key' => 'requestsSpark',
])
Unique visitors
@if ($uniquesApproximate)
{!! $approxBadge('Summed across servers or services; visitors seen on more than one may be double-counted.') !!}
@endif
{{ number_format($overview['uniqueVisitors'] ?? 0) }}
@include('livewire.traffic._sparkline', [
'id' => $chartId.'-spark-visitors',
'initial' => $this->uniquesSpark(),
'colorVar' => '--chart-status-2xx',
'event' => 'refreshChartData-'.$chartId.'-status',
'key' => 'uniquesSpark',
])
Bandwidth
{{ formatBytes($this->bandwidthBytes()) }}
@include('livewire.traffic._sparkline', [
'id' => $chartId.'-spark-bandwidth',
'initial' => $this->bandwidthSpark(),
'colorVar' => '--chart-spark-bandwidth',
'event' => 'refreshChartData-'.$chartId.'-status',
'key' => 'bandwidthSpark',
])
Error rate
{{ $this->errorRate() }}%
@include('livewire.traffic._sparkline', [
'id' => $chartId.'-spark-errors',
'initial' => $this->errorsSpark(),
'colorVar' => '--chart-status-5xx',
'event' => 'refreshChartData-'.$chartId.'-status',
'key' => 'errorsSpark',
])
p95 latency
@if ($latencyApproximate)
{!! $approxBadge('Highest p95 latency across servers or services; not a true merged percentile.') !!}
@endif
{{ number_format($overview['latencyP95'] ?? 0, 1) }} ms
@include('livewire.traffic._sparkline', [
'id' => $chartId.'-spark-latency',
'initial' => $this->latencySpark(),
'colorVar' => '--chart-status-4xx',
'event' => 'refreshChartData-'.$chartId.'-status',
'key' => 'latencySpark',
])
{{-- Requests over time (single area series). --}}
@include('livewire.traffic._requests-chart')
{{-- Status codes: stacked bar of responses by status class. --}}
@include('livewire.traffic._status-codes')
{{-- Top applications + Top hosts side by side; Top paths spans full width below.
When filtered to one app, only Top paths applies. --}}
$appUuid === ''])>
@if ($appUuid === '')
@include('livewire.traffic._hosts-list', ['hosts' => $topHosts])
@if (empty($topApps))
@else
@php $maxAppRequests = max(1, (int) collect($topApps)->max('requests')); @endphp
@include('livewire.traffic._sort-header', ['column' => 'name', 'label' => 'Application / service', 'text' => true, 'class' => 'min-w-0 flex-1'])
@include('livewire.traffic._sort-header', ['column' => 'requests', 'label' => 'Requests', 'class' => 'w-16 shrink-0'])
@include('livewire.traffic._sort-header', ['column' => 'bytesOut', 'label' => 'Bandwidth', 'class' => 'hidden w-16 shrink-0 sm:inline-flex', 'title' => 'Total response data sent'])
@foreach ($topApps as $row)
@php
$appHref = $row['link'] ?? null;
$appWidth = min(100, round(($row['requests'] / $maxAppRequests) * 100, 1));
@endphp
<{{ $appHref ? 'a' : 'div' }} wire:key="analytics-app-{{ $row['uuid'] }}"
@if ($appHref) href="{{ $appHref }}" {{ wireNavigate() }} @endif
data-row="{{ json_encode(['name' => (string) $row['name'], 'requests' => (int) $row['requests'], 'bytesOut' => (int) $row['bandwidth']]) }}"
x-show="shown($el)"
class="flex min-h-11 items-center gap-3 border-t border-neutral-200 px-4 py-2 transition-colors hover:bg-neutral-50 dark:border-white/[0.07] dark:hover:bg-white/[0.03]">
{{ $row['name'] }}
@if (! empty($row['isService']))
Service
@endif
@if (! empty($row['domain']))
{{ $row['domain'] }}
@endif
{{ compactNumber($row['requests']) }}
{{ formatBytes($row['bandwidth']) }}
@if ($appHref)
@else
@endif
{{ $appHref ? 'a' : 'div' }}>
@endforeach
@include('livewire.traffic._pager')
@endif
@endif
{{-- Top paths (full width). --}}
@include('livewire.traffic._paths-list', ['paths' => $topPaths])
{{-- Locations (countries and cities) --}}
@include('livewire.traffic._geo', [
'countries' => data_get($breakdowns, 'country', []),
'cities' => trafficCityRows(data_get($breakdowns, 'city', [])),
'attribution' => $attribution,
])
{{-- Requests by device type (donut) + HTTP versions / cache / status. --}}
@php $deviceChart = $this->deviceChartData(); @endphp
@include('livewire.traffic._device-chart', [
'labels' => $deviceChart['labels'],
'series' => $deviceChart['series'],
])
@include('livewire.traffic._breakdown-section', [
'dimension' => 'protocol',
'label' => 'Top HTTP versions',
'rows' => data_get($breakdowns, 'protocol', []),
'helper' => 'Request volume by negotiated HTTP protocol version.',
])
@include('livewire.traffic._breakdown-section', [
'dimension' => 'cache',
'label' => 'Top cache statuses',
'rows' => data_get($breakdowns, 'cache', []),
'helper' => 'Reverse-proxy cache outcome (hit, miss, bypass, …) by request count.',
])
@include('livewire.traffic._breakdown-section', [
'dimension' => 'status',
'label' => 'Top status codes',
'rows' => data_get($breakdowns, 'status', []),
'helper' => 'Most frequent HTTP response status codes for the selected range.',
])
{{-- Referrers / browsers / OS / AI agents / IPs, two per row. --}}
@foreach ($dimensionLabels as $dimension => $label)
@include('livewire.traffic._breakdown-section', [
'dimension' => $dimension,
'label' => $label,
'rows' => data_get($breakdowns, $dimension, []),
])
@endforeach
@include('livewire.traffic._breakdown-section', [
'dimension' => 'agent',
'label' => 'AI agents & bots',
'rows' => data_get($breakdowns, 'agent', []),
'helper' => 'Bot and AI-crawler traffic (GPTBot, ClaudeBot, Googlebot, …) by request count.',
])
@php($ipModeEnum = \App\Enums\TrafficIpMode::tryFrom($ipMode) ?? \App\Enums\TrafficIpMode::Full)
@if ($ipModeEnum !== \App\Enums\TrafficIpMode::Off)
@include('livewire.traffic._breakdown-section', [
'dimension' => 'ip',
'label' => $ipModeEnum->breakdownLabel(),
'rows' => data_get($breakdowns, 'ip', []),
'helper' => $ipModeEnum->breakdownHelper(),
])
@endif
{{-- User agents (full width — raw UA strings are long). --}}
@include('livewire.traffic._breakdown-section', [
'dimension' => 'useragent',
'label' => 'Top user agents',
'rows' => data_get($breakdowns, 'useragent', []),
'helper' => 'Most frequent raw User-Agent strings for the selected range.',
])
@endif