SNMP TRAPS not sending

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
haile711
Posts: 197
Joined: Thu May 28, 2015 7:36 am

SNMP TRAPS not sending

Post 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
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: SNMP TRAPS not sending

Post 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"
###############################################################################
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: SNMP TRAPS not sending

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
haile711
Posts: 197
Joined: Thu May 28, 2015 7:36 am

Re: SNMP TRAPS not sending

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SNMP TRAPS not sending

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
haile711
Posts: 197
Joined: Thu May 28, 2015 7:36 am

Re: SNMP TRAPS not sending

Post by haile711 »

I 've been trying that also, but still nothing.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SNMP TRAPS not sending

Post by scottwilkerson »

Can you post a screenshot of Admin -> Manage Component ->SNMP Trap Sender -> Edit setting screen
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
haile711
Posts: 197
Joined: Thu May 28, 2015 7:36 am

Re: SNMP TRAPS not sending

Post by haile711 »

Scott,

I have attached the SS
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SNMP TRAPS not sending

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
haile711
Posts: 197
Joined: Thu May 28, 2015 7:36 am

Re: SNMP TRAPS not sending

Post by haile711 »

sure Scott
Locked