@php $isCritical = ($info['severity'] ?? 'warning') === 'critical'; $host = $info['hostname'] ?? 'PBX'; $poolQueue = (int) ($info['pool_queue'] ?? 0); $queueCap = (int) ($info['queue_cap'] ?? 500); $mgrSubs = (int) ($info['manager_subs'] ?? 0); $trigger = $info['trigger'] ?? 'event bus overload'; $accent = $isCritical ? '#dc2626' : '#f59e0b'; $barPct = max(0, min(100, (int) round($poolQueue / max(1, $queueCap) * 100))); @endphp @extends('emails.layouts.base', [ 'subject' => '[' . ($isCritical ? 'CRITICAL' : 'Warning') . '] Phone system event bus overloading — ' . $host, 'title' => $isCritical ? 'Critical: Phone System Event Bus Overloading' : 'Warning: Phone System Under Strain', 'subtitle' => $host . ' is showing signs of an event-bus backlog that can take calls offline if it continues.', 'icon' => '📈', 'iconColor' => $accent, ]) @section('content')
|
{{ $isCritical ? 'Immediate action required — calls may stop soon' : 'Action recommended' }}
{{-- Event-bus queue bar (relative to the 500 cap that causes an outage) --}}
{{ $poolQueue }} / {{ $queueCap }} event queue (outage at {{ $queueCap }})
|
|
|
What to do
• If the manager-subscription count is high, a background service is leaking connections — check the dialler worker (disable it if the client doesn't use automatic calling).
• Restart Asterisk during a quiet moment to clear the backlog: core restart when convenient • Confirm the platform is on the latest version (the known leak is fixed in current releases). • If it recurs after a restart, escalate to support with this alert. |
This alert is sent once each time the event-bus load crosses a new threshold, and re-arms automatically when it recovers. It is an early warning — acting now prevents an outage.
@endsection