Page 1 of 1

SNMP Trap Sender customisation

Posted: Fri Oct 04, 2013 3:02 am
by Fred Kroeger
I've got the SNMP Trap Sender sending events to a third party ticketing system.
However it seems that Nagios is sending all events - including SOFT.
Is there a way I can just forward a subset of events - eg: Only HARD & CRITICAL ?
Or can you point me to the script that sends the SNMP Traps and I'll see what I need to do.

thanks... Fred

Re: SNMP Trap Sender customisation

Posted: Fri Oct 04, 2013 10:30 am
by sreinhardt
The problem it seems, is that the component does not allow for checking if this is a hard or soft state and provide an option for you to select one or both cases. the file in question that would need modification is /usr/local/nagiosxi/html/includes/components/snmptrapsender/snmptrapsender.inc.php. Likely the event handler portion and another will need some changes. You are welcome to look into this, I will also discuss it internally.

Re: SNMP Trap Sender customisation

Posted: Sun Oct 06, 2013 7:28 pm
by Fred Kroeger
Thanks - I will have a look at that script.
Being able to control what gets sent to each SNMP Trap will be helpful.

Fred

Re: SNMP Trap Sender customisation

Posted: Mon Oct 07, 2013 8:24 am
by egalstad
Hi Fred -

We'll add this to our TODO list - it should be simple enough to modify the trap sender to do what you requested.

Re: SNMP Trap Sender customisation

Posted: Mon Dec 23, 2013 2:47 pm
by lmiltchev
Hi Fred,

Would you like to test the latest (patched) version of the NSMP Trap Sender component (1.2)? It should allow you to send traps for both hard, and soft states.

You can download it from here:
snmptrapsender.zip
and install it by going to: Admin->Manage Components->Browse->snmptrapsender.zip->Upload Component

Let us know if it working for you.

Re: SNMP Trap Sender customisation

Posted: Fri Feb 14, 2014 2:54 am
by Fred Kroeger
Working Great - thanks! Exactly what I was looking for.
Another thought now.... Would you consider another option to the Host & Service dropdowns to turn them Off ?
eg: we may want to just send Host events and not Service events.

regards Fred

Re: SNMP Trap Sender customisation

Posted: Fri Feb 14, 2014 12:26 pm
by lmiltchev
This is a good idea. I will be filing an internal feature request.

Re: SNMP Trap Sender customisation

Posted: Wed Apr 09, 2014 1:26 pm
by slansing
This has been changed and will be in the XI 2014 release.

Re: SNMP Trap Sender customisation

Posted: Wed Apr 09, 2014 7:06 pm
by Fred Kroeger
Thanks for following up. Looking forward to the new release!