SNMP TRAP Configuration Handler


I would like to configure alerts coming to librenms by snmp trap from Fortinet devices.

I have configured the SNMPTRAPD service and alerts are received in the log and displayed in EventLog in the librenms GUI, following this documentation:

Now I need those alerts to be translated so they can be sent by email.
I am trying to configure it following this link:

The problem is that I don’t understand the steps to follow.
Could you tell me what steps I need to do?


It’s hard for someone to help with this when you’ve not provided any of the information needed to create trap handlers, why not look at the existing ones in LibreNMS\Snmptrap\Handlers to get a feel for what you need to do?

Sorry, you are right

Steps performed:
Installed snmptrapd service
Added MIB directory to the service
Configured log for receiving TRAP alerts.
Checked that TRAP alerts arrive to the log.

Snmp trap handlers
Created new class “Handler_Test.php” in /opt/librenms/LibreNMS/Snmptrap/Handlers
Like the one in the example of SNMP Traps - LibreNMS Docs

Added new class to file: snmptraps.php
‘SNMPv2-MIB::coldStart’ => \LibreNMS\Snmptrap\Handlers\ColdBoot::class

Is there anything else to configure?
How to create rules to generate alerts?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.