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.
snmptrap problems
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: snmptrap problems
Which "snmptrap option" are you referring to?
What document did you follow?
What document did you follow?
Re: snmptrap problems
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.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: snmptrap problems
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.
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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: snmptrap problems
i followed this but still not getting alert in console.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: snmptrap problems
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.
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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: snmptrap problems
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 .
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 .
- Attachments
-
snmpttunknown.log- (23 Bytes) Downloaded 329 times
-
snmpttsystem.log- (7.3 KiB) Downloaded 318 times
-
snmptt.log- (211.59 KiB) Downloaded 322 times
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: snmptrap problems
Let's have you tar up the existing snmptt.conf files for us.
Please post the resulting /etc/snmp/snmptt.tar.gz
Code: Select all
cd /etc/snmp/
tar czf snmptt.tar.gz ./snmptt.conf*Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.