Page 1 of 2

SNMP TRAPS not sending

Posted: Thu Oct 05, 2017 9:41 am
by haile711
Hey guys,

I have been trying to setup SNMP to send from the Nagios XI sender to another Nagios XI receiver according to this tutorial, but the sender server is not sending,

https://support.nagios.com/kb/article/n ... orial.html

Can you guys help me out.

Thanks

Hai

Re: SNMP TRAPS not sending

Posted: Thu Oct 05, 2017 2:09 pm
by gormank
Traps are send and forget over UDP, so its most likely the system is sending traps but the other end isn't getting them. Here are my notes on adding logging so you can see a trap was sent, and manually sending a trap.

Use nmap from the sender to see if the port is open on the reciever, netstat on the receiver to see if you're listening on the port, and tcpdump on both sides to see packets on the port. See /var/log/snmptrapd.log on the receiver to see traps arriving.

###############################################################################
Trap sender logging
To enable logging of traps sent, add -Lf /usr/local/nagios/var/snmptrap.log to snmptrapsenderfunction in /usr/local/nagiosxi/html/includes/components/snmptrapsender/snmptrapsender.inc.php
###############################################################################
Snmptt sends traps by sending snmptraphandling.py commands to nagios via /usr/local/nagios/var/rw/nagios.cmd.
/usr/local/bin/snmptraphandling.py 2001:4888:a03:311f:c0:a:0:190 "SNMP Traps" INFORMATIONAL 1460489604 "" "Health Status Array Change occurred"
###############################################################################

Re: SNMP TRAPS not sending

Posted: Thu Oct 05, 2017 3:50 pm
by tgriep
Thanks @gormank for the tips.

Another place to look at to see if the Nagios server is sending the traps and that is the eventman.log file.
If you run the following command in a shell and wait long enough for a the system to send a TRAP, you should the server trying to send the TRAP, that it is disables or any errors.

Code: Select all

tail -f /usr/local/nagiosxi/var/eventman.log 
Let us know if you have any other questions.

Re: SNMP TRAPS not sending

Posted: Fri Oct 06, 2017 8:15 am
by haile711
Tgriep,

I have went that command and watches the log, but i do not see anything about trap being send.

Manually, I can send trap, and check its receive, but from from the "SNMP Trap Sender" component in Nagios

Re: SNMP TRAPS not sending

Posted: Fri Oct 06, 2017 10:02 am
by scottwilkerson
haile711 wrote:Tgriep,

I have went that command and watches the log, but i do not see anything about trap being send.

Manually, I can send trap, and check its receive, but from from the "SNMP Trap Sender" component in Nagios
You would have to be watching while you forced a problem to happen that caused a trap to be sent.

For testing purposes, it sometimes help to create a dummy service to test with, and then in the UI on the advanced tab under Commands you can choose "Submit Passive Check Result" to force some Critical events, simulating a failure

Do this all while tailing the log @tgriep mentioned above

Re: SNMP TRAPS not sending

Posted: Fri Oct 06, 2017 3:55 pm
by haile711
I 've been trying that also, but still nothing.

Re: SNMP TRAPS not sending

Posted: Fri Oct 06, 2017 4:02 pm
by scottwilkerson
Can you post a screenshot of Admin -> Manage Component ->SNMP Trap Sender -> Edit setting screen

Re: SNMP TRAPS not sending

Posted: Mon Oct 09, 2017 9:40 am
by haile711
Scott,

I have attached the SS

Re: SNMP TRAPS not sending

Posted: Mon Oct 09, 2017 11:28 am
by scottwilkerson
I am going to request you open a ticket by emailing [email protected] and reference this thread.

I think we are going to have to have a tech monitor the /usr/local/nagiosxi/var/eventman.log to see what is going wrong.

Re: SNMP TRAPS not sending

Posted: Mon Oct 09, 2017 1:12 pm
by haile711
sure Scott