Integrating SNMP TRAPS

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
diegosiassb
Posts: 111
Joined: Wed Dec 30, 2009 1:38 am

Integrating SNMP TRAPS

Post by diegosiassb »

hello
i'm triyng to install "Integrating SNMP TRAPS" using the install manual's instructions but i receive the following error.


Exiting on user cancel

adding rc.d

adding rc.d/init.d

adding rc.d/init.d/snmptt

Committing to: /etc/

added rc.d/init.d/snmptt

added rc.d

added rc.d/init.d

Committed revision 1.

Committing to: /etc/

modified rc.d/init.d/snmptt

Committed revision 2.

adding snmp

adding snmp/snmptt.ini

Committing to: /etc/

added snmp/snmptt.ini

added snmp

Committed revision 3.

Committing to: /etc/

modified snmp/snmptt.ini

Committed revision 4.

adding bin

adding bin/addmib

Committing to: /usr/local/

added bin/addmib

added bin

Committed revision 1.

Committing to: /usr/local/

modified bin/addmib

Committed revision 2.

adding bin/snmptraphandling.py

Committing to: /usr/local/

added bin/snmptraphandling.py

Committed revision 3.

Committing to: /usr/local/

modified bin/snmptraphandling.py

Committed revision 4.

adding snmp/snmptt.conf

Committing to: /etc/

added snmp/snmptt.conf

Committed revision 5.

Unknown object identifier: DISMAN-EVENT-MIB::The

Unknown object identifier: NOTIFICATION-LOG-MIB::The

Unknown object identifier: RFC-1215::

Unknown object identifier: SNMPv2-SMI::

Committing to: /etc/

modified snmp/snmptt.conf

Committed revision 6.

Stopping snmptt: [FAILED]

Starting snmptt: Can't locate SNMP.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at (eval 6) line 1.



Could not load the Perl module SNMP! If net_snmp_perl_enable is

enabled then the SNMP module is required. Please see snmptt.html

for system requirements. Note: SNMPTT uses the Net-SNMP package's

SNMP module, NOT the CPAN Net::SNMP module!



died at /usr/local/sbin/snmptt line 425.

[FAILED]

adding rc.d/init.d/snmptrapd

Committing to: /etc/

added rc.d/init.d/snmptrapd

Committed revision 7.

0

Committing to: /etc/

modified rc.d/init.d/snmptrapd

Committed revision 8.

adding snmp/snmptrapd.conf

Committing to: /etc/

added snmp/snmptrapd.conf

Committed revision 9.

Committing to: /etc/

modified snmp/snmptrapd.conf

Committed revision 10.

Stopping snmptrapd: [FAILED]

Starting snmptrapd: [ OK ]



========================================

SNMP Trap Support Installation Complete!

========================================

when i try to start manually the snmptt service i receive the same error.

p.s. on my server are present the following packets:
SNMP-5.0401.tar.gz
Net-SNMP-v6.0.1.tar.gz
perl-Net-SNMP-5.2.0-1.2.el5.rf.noarch.rpm
snmptt_1.3.tgz
python-crypto-2.0.1-4.el5.2.i386.rpm
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Integrating SNMP TRAPS

Post by nscott »

Code: Select all

Starting snmptt: Can't locate SNMP.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at (eval 6) line 1.
This line seems to indicate those perl modules are not installed correctly. If you have custom perl install, then you will need to reinstall those tar.gz files according to your perl install. Otherwise use this command

yum install net-snmp* perl-Net-SNMP* perl-SNMP* -y

See if that fixes the problem.
Nicholas Scott
Former Nagios employee
diegosiassb
Posts: 111
Joined: Wed Dec 30, 2009 1:38 am

Re: Integrating SNMP TRAPS

Post by diegosiassb »

thankyou for your help
the snmptt service is correctly started
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Integrating SNMP TRAPS

Post by nscott »

Good news, if you run into any other problems, let us now.
Nicholas Scott
Former Nagios employee
diegosiassb
Posts: 111
Joined: Wed Dec 30, 2009 1:38 am

Re: Integrating SNMP TRAPS

Post by diegosiassb »

Hello,
I read the guide, but I can not figure out how to receive a trap.
I have never used the trap and since I do not think it is very difficult to use them.
Only for this I must receive traps from a single network card management server.
Can you tell me which are the steps to configure the trap of nagiosxi. I tried using the wizard but it has no form to fill out and then he gets to choose only 15 out of 200 servers that I configured

Thanks
Diego
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Integrating SNMP TRAPS

Post by nscott »

So you configured 200 servers to send traps to Nagios, but you're only receiving 15 of the 200 server's traps? Are these servers local? If these servers not local or behind a firewall, you will need to adjust the firewall to either let SNMP traffic to flow through (bad idea if you expect any public traffic through the firewall) or use an agent like NRPE.
Nicholas Scott
Former Nagios employee
diegosiassb
Posts: 111
Joined: Wed Dec 30, 2009 1:38 am

Re: Integrating SNMP TRAPS

Post by diegosiassb »

No sorry I have not explained.

I have 200 servers configured, but I always use snmp.
Now I have asked to use the traps for 1 server and I do not know how.
I installed the component as shown above, but I do not know how to configure it.
The wizard trap does not help.

Thanks
Diego
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Integrating SNMP TRAPS

Post by nscott »

Diego,

There are some very good explanations of SNMP that can explain it better than I can.

http://oreilly.com/perl/excerpts/system ... orial.html

Once you have a grasp of those topics, the doc written on using SNMP traps with Nagios XI will make alot more sense.
Nicholas Scott
Former Nagios employee
diegosiassb
Posts: 111
Joined: Wed Dec 30, 2009 1:38 am

Re: Integrating SNMP TRAPS

Post by diegosiassb »

Hello,
perhaps I have not explained well.
I know and I use snmp to monitor 200 servers.
Snmptt and I do not know how to use traps and how to configure.
I am looking for a guide to set up in a few easy steps 2 check.

bye
Diego
nwieland
Posts: 16
Joined: Wed Feb 23, 2011 2:31 pm

Re: Integrating SNMP TRAPS

Post by nwieland »

I started working with traps and found it not to be the most straight forward, mainly because of how the traps are sent by the source host/device/program.

I assume you copied the MIBs in your mib directory, ran addmib for all of them, configured snmptt.ini and snmptt.conf? If yes, I'd recommend:

- make sure with the firewall team that UDP 162 is open
- running tcpdump listening on UDP port 162 while testing
- modifying the snmptraphandling.py script to dump the arguments it intends to send to nagios.cmd into a log file, and change "severity = sys.argv[3]" to "severity = sys.argv.lower()" (and make sure that in the get_return_code subroutine all severity strings are lowercase)
- you also might want to change the EXEC part in snmptt.conf for a particular trap so that you better see how the variables are filled (ie. like "$1 ++++ $2 ++++ $3" as last argument instead of "$1 $2 $3"

There also seems to be an issue that nagios.cmd doesn't receive the entire payload if the last argument to snmptraphandling.py exceeds a certain amount of data :(
Locked