Page 1 of 1

Configuring XI to send a SNMP trap on port 15162

Posted: Thu Jul 23, 2015 1:51 pm
by thernand
Can we setup XI to send SNMP notification Host and service checks on port 15162? How do we configure this?

Re: Configuring XI to send a SNMP trap on port 15162

Posted: Thu Jul 23, 2015 1:54 pm
by ssax
You can use the Nagios-XI-SNMP-Trap-Sender-Component to specify the port:

https://exchange.nagios.org/directory/A ... nt/details

Re: Configuring XI to send a SNMP trap on port 15162

Posted: Fri Jul 24, 2015 7:36 am
by thernand
We use version 1.4 of the SNMP trap Sender component and I do not see where you can configure the port. Is there a way to do it with this version?

Re: Configuring XI to send a SNMP trap on port 15162

Posted: Fri Jul 24, 2015 9:05 am
by ssax
There is not, are you not able to upgrade the component to 1.5?

Re: Configuring XI to send a SNMP trap on port 15162

Posted: Fri Jul 24, 2015 2:04 pm
by thernand
Not at this time because of the way the company does the XI install.

Re: Configuring XI to send a SNMP trap on port 15162

Posted: Fri Jul 24, 2015 2:32 pm
by ssax
We might be able to hack it together, I'll take a look on Monday, if you don't hear from me by midday on Monday, send me a reply on here.

Re: Configuring XI to send a SNMP trap on port 15162

Posted: Mon Jul 27, 2015 11:30 am
by ssax
Edit this file:

Code: Select all

/usr/local/nagiosxi/html/includes/components/snmptrapsender/snmptrapsender.inc.php
Around line 420 you'll see this line:

Code: Select all

$trap_command = "/usr/bin/snmptrap -v 2c -c $community $address '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s \"%host%\" nSvcDesc s \"%service%\" nSvcStateID i %servicestateid% nSvcOutput s \"%serviceoutput%\"";
Change:

Code: Select all

$address
To:

Code: Select all

${address}:15162
Then it should work for you.