Page 1 of 1

Via Nagios forwarded snmp traps have wrong sender

Posted: Wed Jul 01, 2020 4:34 am
by RuBo
We have to forward all incoming snmp traps to another system.

I've configured de snmp trap sender component in Nagios and changed snmptrapd.conf.
SNMP traps are forwarded now, but they all have the source address of our Nagios server.

Is there any methode to change this in the original source address/hostname so that the other system knows where the traps came from?

Our snmptrapd.conf:
disableAuthorization yes
traphandle default /usr/sbin/snmptthandler
forward default 10.241.142.15:162


We have Nagios XI 5.6.3 on Cent OS version: 7-6.1810.2.e17.centos.x86_64

Re: Via Nagios forwarded snmp traps have wrong sender

Posted: Wed Jul 01, 2020 5:22 pm
by ssax
I don't think it's possible to get snmptrapd to do it based on my research.

Is 10.241.142.15 another XI server? I think you may be able to use $A (instead of $r) in the SNMPTT EXEC line to show the agent IP:

http://snmptt.sourceforge.net/docs/snmp ... ONF-FORMAT

Re: Via Nagios forwarded snmp traps have wrong sender

Posted: Thu Jul 02, 2020 4:34 am
by RuBo
The 10.241.142.15 is a test server with a snmptrap receiver and Wireshark.
If everything works as expected the ip will be replaced with the ip of the third party server.

I've allready replaced $r in $A but that made no difference.

Is there maybe a plugin for this?
I can immagine that i'm not the first person with this problem.

Re: Via Nagios forwarded snmp traps have wrong sender

Posted: Thu Jul 02, 2020 5:03 pm
by ssax
I was unable to find a solution that would do what you want it to do.