From 57bcce91419430fae1897999198bb48f8afe1ffd Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Wed, 4 Dec 2024 21:34:51 -0600 Subject: [PATCH] Skip alerts if disabled Completely skip alerts if disabled by alert.disable --- app/Listeners/CheckAlerts.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Listeners/CheckAlerts.php b/app/Listeners/CheckAlerts.php index 02cbf2fd819c..83030ba3c25f 100644 --- a/app/Listeners/CheckAlerts.php +++ b/app/Listeners/CheckAlerts.php @@ -5,6 +5,7 @@ use App\Action; use App\Actions\Alerts\RunAlertRulesAction; use App\Events\DevicePolled; +use App\Facades\LibrenmsConfig; use Log; class CheckAlerts @@ -26,6 +27,10 @@ public function __construct() */ public function handle(DevicePolled $event): void { + if (LibrenmsConfig::get('alert.disable')) { + return; + } + Log::info('#### Start Alerts ####'); $start = microtime(true);