SNMP Trap Sender

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
r34220
Posts: 72
Joined: Fri Feb 06, 2015 6:47 pm

SNMP Trap Sender

Post by r34220 »

How can I validate that traps are being sent?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: SNMP Trap Sender

Post by Box293 »

Watch the outbound UDP traffic on the XI server sending the traps:

Code: Select all

tcpdump udp dst port 162
You may need to install tcpdump:

Code: Select all

yum -y install tcpdump
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
r34220
Posts: 72
Joined: Fri Feb 06, 2015 6:47 pm

Re: SNMP Trap Sender

Post by r34220 »

I am not seeing any snmpt traps being sent. I am also using a non standard port of 1162. How can I troubleshoot this? See attached config image.
nagiosxi-snmp-trap-sender-conf.jpg
tcpdump.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: SNMP Trap Sender

Post by Box293 »

Can you send us the output of this:

Code: Select all

yum list installed | grep net-snmp
Can you try:
Un-check the Enable Integration checkbox
Click Apply Settings
Check the Enable Integration checkbox
Click Apply Settings

Go and start the tcpdump

Submit a passive check for a host or service with a critical status, this should send a trap. Does that appear in the tcpdump?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
r34220
Posts: 72
Joined: Fri Feb 06, 2015 6:47 pm

Re: SNMP Trap Sender

Post by r34220 »

Code: Select all

[root@az84mon11v ~]# yum list installed | grep net-snmp
net-snmp.x86_64                    1:5.5-50.el6_6.1        @rhel-x86_64-server-6
net-snmp-devel.x86_64              1:5.5-50.el6_6.1        @rhel-x86_64-server-6
net-snmp-libs.x86_64               1:5.5-50.el6_6.1        @rhel-x86_64-server-6
net-snmp-perl.x86_64               1:5.5-50.el6_6.1        @rhel-x86_64-server-6
net-snmp-utils.x86_64              1:5.5-50.el6_6.1        @rhel-x86_64-server-6
I tryed toggling and applied settings and toggled again to turn back on. Still dont see anything shown in tcpdump

Code: Select all

[root@az84mon11v ~]# tcpdump udp dst port 1162
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth9, link-type EN10MB (Ethernet), capture size 65535 bytes

User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: SNMP Trap Sender

Post by Box293 »

What version of the component do you have?:

Click the Admin menu
System Extensions > Manage Components
Find the SNMP Trap Sender component
What version is this component?

If there is a newer one available, please download and upload it at the top of this page.

The only other suggestion I have right now is to try putting it on the default port of 162 and then watching that traffic with tcpdump, just to see if it works at all.

I'm all out of troubleshooting ideas, we may need to wait until tomorrow for the USA techs to get back to us with some more troubleshooting steps.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
r34220
Posts: 72
Joined: Fri Feb 06, 2015 6:47 pm

Re: SNMP Trap Sender

Post by r34220 »

Looks like its up to date: Version: 1.5

Tryed the standard port 126 but still dont see anything in tcpdump.

Any other ideas?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SNMP Trap Sender

Post by ssax »

I just installed it and set it up like your with 1162 and generated a service failure so that it would send the trap and it worked just fine:

Code: Select all

[root@ssc66xi scripts]# tcpdump udp dst port 1162
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
10:27:28.700024 IP 192.168.4.126.59021 > 192.168.4.124.health-trap: UDP, length 221
10:28:28.818998 IP 192.168.4.126.48031 > 192.168.4.124.health-trap: UDP, length 221
Do you see anything in your /var/log/httpd/error_log or /var/log/httpd/ssl_error_log (if using HTTPS) that may give any indication?

Also, let's take a look at the permissions:

Code: Select all

ls -ld /usr/local/nagiosxi/html/includes/components/snmptrapsender
ls -l /usr/local/nagiosxi/html/includes/components/snmptrapsender
r34220
Posts: 72
Joined: Fri Feb 06, 2015 6:47 pm

Re: SNMP Trap Sender

Post by r34220 »

I dont see anything in the Apache error logs.

Permissions:

Code: Select all

[root@az84mon11v httpd]# ls -ld /usr/local/nagiosxi/html/includes/components/snmptrapsender
drwxr-x--- 3 nagios nagios 4096 Apr 27 10:03 /usr/local/nagiosxi/html/includes/components/snmptrapsender
[root@az84mon11v httpd]# ls -l /usr/local/nagiosxi/html/includes/components/snmptrapsender
total 40
-rwxr-x--- 1 nagios nagios   790 Apr 27 10:01 CHANGES.TXT
-rw-r----- 1 nagios nagios     0 Jul 16 17:01 installed.ok
-rwxr-x--- 1 nagios nagios   428 Apr 27 10:01 installprereqs.sh
drwxr-x--- 2 nagios nagios  4096 Mar 24 09:21 mibs
-rwxr-x--- 1 nagios nagios   889 Apr 27 10:01 sanity.sh
-rwxr-x--- 1 nagios nagios 20841 Apr 27 10:01 snmptrapsender.inc.php
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SNMP Trap Sender

Post by ssax »

What version of XI are you running? You can grab it from the bottom left hand side of the Nagios XI web interface.
Locked