Files
librenms-librenms/LibreNMS/Snmptrap/Handlers/VeeamLinuxFLRToOriginalStarted.php
Wheel 42fdbea126 Veeam SNMP traps fix and extend (#13549)
* Veeam fix and extend part 1

* Veeam SNMP traps

* StyleCI

* StyleCI

* Fix typo

* Lint

* Fix tests

* Fix tests :fingerscrossed:

* Think i get it now

* This is it?

* gotta be it

* Final

* Again
2021-11-24 18:20:56 +01:00

28 lines
715 B
PHP

<?php
namespace LibreNMS\Snmptrap\Handlers;
use App\Models\Device;
use LibreNMS\Interfaces\SnmptrapHandler;
use LibreNMS\Snmptrap\Trap;
use Log;
class VeeamLinuxFLRToOriginalStarted implements SnmptrapHandler
{
/**
* Handle snmptrap.
* Data is pre-parsed and delivered as a Trap.
*
* @param Device $device
* @param Trap $trap
* @return void
*/
public function handle(Device $device, Trap $trap)
{
$initiator_name = $trap->getOidData('VEEAM-MIB::initiatorName');
$vm_name = $trap->getOidData('VEEAM-MIB::vmName');
Log::event('SNMP Trap: FLR job started - ' . $vm_name . ' - ' . $initiator_name, $device->device_id, 'backup', 2);
}
}