Severity Enum (#14620)

* Severity Enum
Replace old Alert constants

* Fix whitespace

* Additional uses

* style fixes

* Fix test too

* More missed locations

* More
This commit is contained in:
Tony Murray
2023-08-05 12:12:36 -05:00
committed by GitHub
parent 9382959c8c
commit d1b7004fef
172 changed files with 591 additions and 473 deletions

View File

@@ -39,6 +39,7 @@ Create a new class in `LibreNMS\Snmptrap\Handlers` that implements the
namespace LibreNMS\Snmptrap\Handlers;
use App\Models\Device;
use LibreNMS\Enum\Severity;
use LibreNMS\Interfaces\SnmptrapHandler;
use LibreNMS\Snmptrap\Trap;
@@ -54,7 +55,7 @@ class ColdBoot implements SnmptrapHandler
*/
public function handle(Device $device, Trap $trap)
{
$trap->log('SNMP Trap: Device ' . $device->displayName() . ' cold booted', $device->device_id, 'reboot', 4);
$trap->log('SNMP Trap: Device ' . $device->displayName() . ' cold booted', $device->device_id, 'reboot', Severity::Warning);
}
}