. * * FortiAnalyzer will send this trap when the received log rate * exceeds the suggested rate for the daily rate license. * * @package LibreNMS * @link http://librenms.org * @copyright 2019 KanREN, Inc. * @author Heath Barnhart */ namespace LibreNMS\Snmptrap\Handlers; use App\Models\Device; use LibreNMS\Interfaces\SnmptrapHandler; use LibreNMS\Snmptrap\Trap; use Log; class FmTrapLogRateThreshold 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) { $logRate = $trap->getOidData($trap->findOid('FORTINET-FORTIMANAGER-FORTIANALYZER-MIB::fmLogRate')); $logThresh = $trap->getOidData($trap->findOid('FORTINET-FORTIMANAGER-FORTIANALYZER-MIB::fmLogRateThreshold')); Log::event("Recommended log rate exceeded. Current Rate: $logRate Recommended Rate: $logThresh", $device->device_id, 'trap', 3); } }