patrickpr / trapdirector

Icingaweb2 module for receiving and handling snmp traps
GNU General Public License v3.0
53 stars 15 forks source link

Handling of forwarded traps #41

Closed manfredw closed 4 years ago

manfredw commented 4 years ago

Main question

TrapDirector shows IP address of sending host as trap source, but traps are forwarded by a central trap receiver to Trap Director. In this case all traps seem to come from the forwarder. Is there already a feature to use the trap variable snmpTrapAddress (OID .1.3.6.1.6.3.18.1.3) instead of the forwarder IP?

Purpose

Without this feature it is not possible to map the trap to the originating device within icinga2 when there are forwarders on the way. TrapDirector should be able to use the snmpTrapAddress field.

Your Environment

If related to the question in any way :

patrickpr commented 4 years ago

No feature for this, but simple to implement. i'm on holydays for two weeks starting tomorow, so I will take a closer look when I return.

patrickpr commented 4 years ago

Feature is implemented in latest master version : can you test it ?

It is enabled by default and you can change parameters in the web GUI at 'Status & Mibs' page.

For the snmptrapd forwarding, do you use the following configuration ? forward default <IP>

manfredw commented 4 years ago

Yes, forward default <IP> in my forwarder's snmptrapd.conf.

Thx for implementation, I will test during the next days.

manfredw commented 4 years ago

Great! New code works as expected.

Will it make sense to store the forwarders address?

PS: is it possible that the logging feature is broken? Logfile stays empty...

patrickpr commented 4 years ago

I'm not sure if forwarders address is useful, and it's written in logs on DEBUG logging mode if you need to ... debug. If you have a use case tell me about it.

Log issue will be treated in other issue ( #45 )

patrickpr commented 4 years ago

Working -> closing issue