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?
SNMP trap documentation half done?
-
tonyyarusso
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: SNMP trap documentation half done?
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.
-
mikemasters
- Posts: 21
- Joined: Mon May 10, 2010 10:41 am
Re: SNMP trap documentation half done?
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
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
-
tonyyarusso
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: SNMP trap documentation half done?
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
* 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?
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.
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.