NagiosXI SNMP Trap setup Offline installer

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bry04x
Posts: 4
Joined: Tue May 19, 2015 1:19 am

NagiosXI SNMP Trap setup Offline installer

Post by bry04x »

Hi Team,

I found this document on How to Integrate SNMP Traps With NagiosXI
https://assets.nagios.com/downloads/nag ... ios_XI.pdf

I would like to ask if we have an offline installer for NagiosXI-SNMPTrap-setup.sh?
I need to install it on NagiosXI server that is offline.

Thanks!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NagiosXI SNMP Trap setup Offline installer

Post by tmcdonald »

The following steps in the script would need to be handled however you normally handle offline file retrieval in your environment:

Code: Select all

27:  yum install snmptt net-snmp-perl -y
36:  wget http://assets.nagios.com/downloads/support/snmptrap-bins.tar.bz2
but everything else is just regular system commands like useradd and chmod. If you can address the above two points then the rest should work just fine. You will need to comment out the first line most likely, and modify the second to point to an internal machine that is hosting the snmptrap-bins.tar.bz2 file.
Former Nagios employee
bry04x
Posts: 4
Joined: Tue May 19, 2015 1:19 am

Re: NagiosXI SNMP Trap setup Offline installer

Post by bry04x »

Hi team,

I was able to install net-snmp-perl.
I am having problem installing snmptt, it says file does not exist.
Do you have a installer package for this?

Thanks!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NagiosXI SNMP Trap setup Offline installer

Post by tmcdonald »

We do not provide that directly, but you can find RPM packages for various projects. Here is the search for snmptt:

http://www.rpmfind.net/linux/rpm2html/s ... ery=snmptt
Former Nagios employee
bry04x
Posts: 4
Joined: Tue May 19, 2015 1:19 am

Re: NagiosXI SNMP Trap setup Offline installer

Post by bry04x »

Hi Team,

I was able to complete integration of SNMP traps with nagiosXI.
I sent test traps to the server but it was not successfully processed.

Traps was successfully received by the nagios server based on tcpdump below:
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
11:29:01.890344 IP 00.00.00.00.38469 > nagios.server.snmptrap: C=TEST V2Trap(1254) system.sysUpTime.0=17969400..etc
^C488 packets captured
488 packets received by filter
0 packets dropped by kernel

netstat for port 162
udp 0 0 0.0.0.0:162 0.0.0.0:* 24980/snmptrapd

snmptrapd is running
snmptt is running

I enabled debugging and successfully fixed permission issues but the total traps received is still 0.
I also enabled snmptthandler debug but there was no file generated.
Is there any way for us to debug snmptthandler to see if it is receiving traps?

I hope you could help me fix this.

Thank you for your help.

snmptt debug and snmpttsystem.log attached.
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: NagiosXI SNMP Trap setup Offline installer

Post by Box293 »

The installer NagiosXI-SNMPTrap-setup.sh does extra stuff like copy configs specifically for Nagios.

If you are doing an offline install, did you manually perform all the steps that the NagiosXI-SNMPTrap-setup.sh file does?

Please attach these files to your reply:

/etc/snmp/snmptrapd.conf
/etc/snmp/snmptt.ini
/etc/snmp/snmptt.conf

FYI snmptrapd debugging is pretty ordinary.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
bry04x
Posts: 4
Joined: Tue May 19, 2015 1:19 am

Re: NagiosXI SNMP Trap setup Offline installer

Post by bry04x »

Hi Team,

Thank you for your help.

I was able to complete all requirements and it is now receiving traps based on snmptt.log (test traps is now showing on the log file).
My new issue now is SNMP trap status is still "Waiting for trap..."
How can I add new services to be monitored by SNMPtraps and why is it still waiting for traps even though I am already receiving SNMP traps based on SNMPTT.log?

Is there a way for us to check if Nagios is receiving traps from SNMPTT?

Attached are the files that you requested.

Thanks!
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: NagiosXI SNMP Trap setup Offline installer

Post by Box293 »

Your EXEC line is the source of your problems:

Code: Select all

EXEC /usr/local/bin/snmptraphandling.py $r TRAP 1 "Execution anomaly detected $*"
This will be targetting the host with the service named "TRAP". By default in Nagios XI the service created with the Wizard is named "SNMP Traps".

Also, your snmptraphandling.py command is only submitting 4 arguments, it requires 6.

snmptraphandling.py <HOST> <SERVICE> <SEVERITY> <TIME> <PERFDATA> <DATA>

And they should be surrounded by double quotes. If you don't want to submit a value, like perfdata, you still need double quotes with no value between them.

I suggest your EXEC line should look like:

Code: Select all

EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "" "Execution anomaly detected $*"
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked