Skip to content

Commit

Permalink
Skip alerts if disabled
Browse files Browse the repository at this point in the history
Completely skip alerts if disabled by alert.disable
  • Loading branch information
murrant committed Dec 5, 2024
1 parent 3487028 commit 57bcce9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Listeners/CheckAlerts.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Action;
use App\Actions\Alerts\RunAlertRulesAction;
use App\Events\DevicePolled;
use App\Facades\LibrenmsConfig;
use Log;

class CheckAlerts
Expand All @@ -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);

Expand Down

0 comments on commit 57bcce9

Please sign in to comment.