SNMPTrapSender Customization

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vaibhavdaud
Posts: 15
Joined: Wed Nov 26, 2014 4:41 am

SNMPTrapSender Customization

Post by vaibhavdaud »

Hi Team,

We are looking a way to automate SnmpTrap send to the third party tool. Requirement is that if some condition met Nagios should stop sending traps from one server and start from second server. We write a script and its doing the changes in “snmptrapsender.inc.php” file. Its doing change “enabled, 0 or enabled, 1”, but thing is sometimes Nagios can’t understand the changes whenever we go to console, snmptrap component and apply the changes. We are using RHEL 7.2 3.10.0-327.36.3.el7.x86_64 x86_64. Nagios XI 5.4.0. SnmpTrap sender 1.5.3
Can you suggest on below.
1) How we can add or change all details ie. IP, community, port etc. through backend to snmptrap sender instead of console
2) How to refresh changes if do some in snmptrapsender.inc.php
3) Is other way to send snmptrap instead to use component
4) Where Nagios store the given input ie. IP, community etc. We cannot see it in snmptrapsender.inc.php

Thanks,
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SNMPTrapSender Customization

Post by ssax »

1) How we can add or change all details ie. IP, community, port etc. through backend to snmptrap sender instead of console
2) How to refresh changes if do some in snmptrapsender.inc.php
4) Where Nagios store the given input ie. IP, community etc. We cannot see it in snmptrapsender.inc.php

The trap sender component data is stored in the nagiosxi database in the xi_options table, we do not recommend that you interact directly with the DB though.

Please post the output of this command:

Code: Select all

grep mysql /usr/local/nagiosxi/html/config.inc.php
Unfortunately, there is no inherent functionality that does what you're looking for.

3) Is other way to send snmptrap instead to use component

Yes, you can use Admin > Manage Components > Global Event Handler > Settings and write a script that will send the traps, you could also do it with standard event handlers but you would have to define them on all of the hosts/services.


Let us know if you have any questions.


Thank you
Locked