SNMP Trap Sender customisation

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

SNMP Trap Sender customisation

Post 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
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: SNMP Trap Sender customisation

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: SNMP Trap Sender customisation

Post 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
User avatar
egalstad
Posts: 76
Joined: Thu Oct 29, 2009 2:07 pm

Re: SNMP Trap Sender customisation

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: SNMP Trap Sender customisation

Post 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.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: SNMP Trap Sender customisation

Post 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
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: SNMP Trap Sender customisation

Post by lmiltchev »

This is a good idea. I will be filing an internal feature request.
Be sure to check out our Knowledgebase for helpful articles and solutions!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: SNMP Trap Sender customisation

Post by slansing »

This has been changed and will be in the XI 2014 release.
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: SNMP Trap Sender customisation

Post by Fred Kroeger »

Thanks for following up. Looking forward to the new release!
Locked