Page 1 of 1

SNMP trap documentation half done?

Posted: Thu May 27, 2010 8:40 am
by TheNisse
Hi I need some help with snmp trap. I have read the documentation about snmp trap and I can successfully receive test traps and it shows in different logs. Now what?

How do I integrate nagios whit snmptt?

Re: SNMP trap documentation half done?

Posted: Thu May 27, 2010 9:54 am
by tonyyarusso
The best way is to use the SNMP Traps Wizard mentioned on page 3 of the documentation. Then you'll just run that to create the different services you need.

Re: SNMP trap documentation half done?

Posted: Fri May 28, 2010 10:45 am
by mikemasters
Tony,

Could you post a link to the DOC, so that we can make sure we have the same documentation... I am also trying to get SNMP traptt to work..

Thanks.

Mike

Re: SNMP trap documentation half done?

Posted: Fri May 28, 2010 1:29 pm
by tonyyarusso

Re: SNMP trap documentation half done?

Posted: Fri May 28, 2010 5:22 pm
by TheNisse
Well if i install the wizard and define a trap on a specific host I noticed the folowing problems:

* snmptrapd dosent resive and process any snmp traps.
We resolved it by adding the folowing lines to /etc/snmp/snmptrapd.conf
authCommunity log,execute,net public
traphandle default /usr/local/sbin/snmptt
#the folowing lines is used to enable loging.
logoption s 2
logoption f /var/log/snmptrap-direct.log

* snmptt do not forward traps to nagios but we can view them in snmptt logs. According to the link in the doc http://snmptt.sourceforge.net/docs/snmp ... s-Netsaint we have to add a SNMPTT EXEC statement.
The supplied snmptt.conf includes an EXEC statment for snmptraphandeling.py which gives me the folowing error when I run it from command promopt.

/usr/local/bin/snmptraphandling.py localhost "SNMP Traps" Critical 10:30 123 123
File "/usr/local/bin/snmptraphandling.py", line 21
usagetxt =
^
SyntaxError: invalid syntax

Pleace advice where to go next

Re: SNMP trap documentation half done?

Posted: Tue Jun 01, 2010 11:03 am
by mmestnik
This does not look like the current script. Should be md5: 3faba44c47fdcf2dd59303d5b87fcc9b
The currently posted script install a8b7106d844888fc26c6e9fe5096788d NagiosXI-SNMPTrap.sh
creates a file 3faba44c47fdcf2dd59303d5b87fcc9b matching what I have.

This obvious difference to me is that this version uses printusage() instead of a global variable $usagetxt.