@jozefrebjak What you mean with where you will see the traps?
For example, a linkDown trap (port down) your database will be updated with that and you will see in the event log the trap like this: Interface went Down : GigabitEthernet0/5 (TRAP)
If you have a port up/down alert, you will recieve it as soon as alerts.php is ran (every 1 minute in cron).
Same for BGP sessions.
For where to put startup options, I dont really know in Ubuntu but, if you are using systemd, do systemctl status snmptrapd and you will see an output with this line:
Loaded: loaded (/usr/lib/systemd/system/snmptrapd.service; enabled; vendor preset: disabled)
You need to edit the snmptrapd.service file (in the location you have) and add the startup options to the ExecStart.
It is active running, with Started Simple Network Management Protocol (SNMP) Trap Daemon…
Then i added to LibreNMS config.php
$config['snmptraps']['eventlog'] = 'all';
So this means I should see eventlogs for that device when interfaces are shut no shut?
How can you test recieval of trap messages without LibreNMS , do they come into journalctl or possible to add a seperate logfile like -Lf /tmp/all_traps ? (logoption doesn’t work in snmptrapd for me)
On the router i have all traps enabled and my snmp-server host libreip communitystring line.
and I wasn’t sure if you need udp,tcp 162 opened on the server? I have anyway.
@TheGreatDoc - Hi I’m trying to make SNMP traps work with some Secomea Trustgates - I have the MIB file but I find it hard to code the SNMP trap handlers - Can you perhaps help me out?
Make the folder /etc/systemd/system/snmptrapd.service.d/ and edit the file /etc/systemd/system/snmptrapd.service.d/mibs.conf and add the following content.