Page 1 of 1
snmptrap problems
Posted: Tue Dec 23, 2014 3:37 pm
by veenm
Hi ,
I have enabled the snmptrap option in nagios , i am receiving the traps in /var/log/messges however same is not getting mapped to host that is configured and traps are not getting logged in "snmptt.log".
Please suggest what might be the problem.
Re: snmptrap problems
Posted: Tue Dec 23, 2014 3:46 pm
by scottwilkerson
Which "snmptrap option" are you referring to?
What document did you follow?
Re: snmptrap problems
Posted: Tue Dec 23, 2014 3:57 pm
by veenm
I have follwed "xavier.dusart.free.fr/nagios/en/snmptraps.html" and snmptrap option means i have enabled nagios to receive trap from devices. When i send a trap from device , i can see it is reaching nagios and can see the entries in /var/log/messages , but snmptt.log is not getting updated and also in nagios console i cant see the trap received for particular host.
Re: snmptrap problems
Posted: Tue Dec 23, 2014 4:09 pm
by sreinhardt
Please remove the steps from the guide you followed, and instead use our documentation. It does say that it is for nagios XI, however it works great for Core as well, provided you are on a Centos or RHEL system. You can find it here:
http://assets.nagios.com/downloads/nagi ... ith_XI.pdf
The only part that does not apply, is that your mibs need to be manually placed in the correct directory and will need to be translated by the appropriate command.
Re: snmptrap problems
Posted: Tue Dec 23, 2014 4:40 pm
by veenm
i followed this but still not getting alert in console.
Re: snmptrap problems
Posted: Tue Dec 23, 2014 6:39 pm
by Box293
Please post here:
What is being shown in /var/log/messages
/etc/snmp/snmptt.conf
/etc/snmp/snmptt.ini
/var/log/snmptt/snmptt.log
/var/log/snmptt/snmpttsystem.log
/var/log/snmptt/snmpttunknown.log
The nagios service definition for this SNMP trap.
Re: snmptrap problems
Posted: Wed Dec 24, 2014 12:20 pm
by veenm
Here are my /var/log/messages output
Dec 24 12:02:47 xxx snmptrapd[20069]: 2014-12-24 12:02:47 xxx [10.10.10.101] (via UDP: [32.84.162.74]:57909->[IP Address]) TRAP, SNMP v1, community public#012#011.1.3.6.1.4.1.2021.13.990 Enterprise Specific Trap (17) Uptime: 38 days, 7:07:19.46#012#011.1.3.6.1.2.1.1.6.0 = STRING: Here
/etc/snmp/snmptt.conf.nagios
#
#
#
#
MIB: UCD-TRAP-TEST-MIB (file:/usr/share/snmp/mibs/UCD-TRAP-TEST-MIB.txt) converted on Wed Dec 24 06:55:11 2014 using snmpttconvertmib v1.4
#
#
#
EVENT demoTrap .1.3.6.1.4.1.2021.13.990.0.17 "Status Events" Normal
FORMAT An example of an SMIv1 trap $*
EXEC /nagiosfs/libexec/eventhandlers/submit_check_result $r TRAP 1 "An example of an SMIv1 trap $*"
SDESC
An example of an SMIv1 trap
Variables:
1: sysLocation
EDESC
~
I have attached snmp log files. Eventhough traps are received in messages.log , i dont see any passive entry in nagios.log .
Re: snmptrap problems
Posted: Fri Dec 26, 2014 12:05 pm
by sreinhardt
Let's have you tar up the existing snmptt.conf files for us.
Code: Select all
cd /etc/snmp/
tar czf snmptt.tar.gz ./snmptt.conf*
Please post the resulting /etc/snmp/snmptt.tar.gz