Page 1 of 1

sending SNMP traps to third party

Posted: Fri Sep 04, 2015 12:13 pm
by vvz
Hi!

I have a number of hosts which are monitored with standard Nagios Core (3.5.1) plugins and I get standard notifications via NRPE, NSCA to my nagios instance.
Third party company asks me to send them SNMP traps from my Nagios and provided me with SNMP community, addresses, SNMP version and so on.
My question is may sound silly - is there any way to relay standard notifications I get to my nagios server to this third party server as SNMP?

thank you

Re: sending SNMP traps to third party

Posted: Fri Sep 04, 2015 2:06 pm
by ssax
Are you trying to forward ALL traps that hit the Nagios server or just the ones that send notifications?

Re: sending SNMP traps to third party

Posted: Fri Sep 04, 2015 2:12 pm
by vvz
just one send notifications...
and to make it clear, I do not receive any snmptraps to nagios for the moment, to make it easier let's admit that all that I'm getting for now --- standard strings via NSCA to cmd pipe -- $HOST$SERVICE$STATUS$PLUGIN_OUTPUT with the tabs between them of course

Re: sending SNMP traps to third party

Posted: Sun Sep 06, 2015 10:43 pm
by Box293
What you could do is create a contact object and use that object to send SNMP trap notifications to.

Basically, a contact uses the commands notify-host-by-email and notify-service-by-email which is just a big printf that is piped to /bin/mail.

You could create separate commands that use the snmptrap command. You then assign these commands to the new contact.

With this setup, any host or service objects this contact is assigned to will execute the SNMP Trap commands you defined to send the SNMP Trap to the destination.

Does that help?

Re: sending SNMP traps to third party

Posted: Mon Sep 07, 2015 8:59 am
by vvz
yes, thank you.
we can close the thread