Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
914 B
PHP
Raw Permalink Normal View History

2021-11-24 18:20:56 +01:00
<?php
namespace LibreNMS\Snmptrap\Handlers;
use App\Models\Device;
2023-08-05 12:12:36 -05:00
use LibreNMS\Enum\Severity;
2021-11-24 18:20:56 +01:00
use LibreNMS\Interfaces\SnmptrapHandler;
use LibreNMS\Snmptrap\Trap;
2023-08-05 12:12:36 -05:00
class VeeamLinuxFLRCopyToStarted extends VeeamTrap implements SnmptrapHandler
2021-11-24 18:20:56 +01:00
{
/**
* 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');
$target_host = $trap->getOidData('VEEAM-MIB::targetHost');
$target_dir = $trap->getOidData('VEEAM-MIB::targetDir');
2023-08-05 12:12:36 -05:00
$trap->log('SNMP Trap: FLR job started - ' . $vm_name . ' - ' . $initiator_name . ' ' . $target_dir . ' ' . $target_host, Severity::Info, 'backup');
2021-11-24 18:20:56 +01:00
}
}