Page 1 of 2

SNMP Traps are not getting reported "Waiting for trap"

Posted: Thu Jan 24, 2013 9:15 am
by Andreas_c_Schmidt
Hi using XI 2012R1.4 fresh install under RedHat.
I have a few devices and apps sending me traps. I can see them in TCPdump and in my snmpttlog. no snmpttunknown traps are reported and the mibs are loaded.

I used the XI snmptrap wizard to setup for each device a listener but all I see there is "waiting for trap" even though I know there are alerts being sent to the nagios server.

One sidenote: we are using a pure ip address based network without any dns server and in Nagios i have set the Ip adresses with a custom name. But even setting up a server with just the ipadress I get the same result.

Any ideas?

Re: SNMP Traps are not getting reported "Waiting for trap"

Posted: Thu Jan 24, 2013 2:40 pm
by abrist
Have you walked through the snmp trap documentation?
http://library.nagios.com/library/produ ... -nagios-xi

Re: SNMP Traps are not getting reported "Waiting for trap"

Posted: Thu Jan 24, 2013 2:50 pm
by BanditBBS
In the log, what does it show as the device name of the trap? That has to match exactly to a host in Nagios.

Re: SNMP Traps are not getting reported "Waiting for trap"

Posted: Thu Jan 24, 2013 2:58 pm
by Andreas_c_Schmidt
Yes of course I did, and as mentioned I see the traps in the snmpdlog and in the snmpttlog translated. I also see them in the snmptrapdlog. Just nagios doesn't show anything.

I saw the false trap in the snmpttunknown.log. It all proofs that its working as designed ..

@banditBBS: its showing the IP address of the sending server so I setup a new host with just the Ip address and the trap without joy. I will check tomorrow to setup a local hosts file with the server names.

Is there any way to see what Nagios is processing in terms of traps ? Something similar like the unconfigured objects just for snmp?

Edit: I just spotted http://www.nagios.org/news/77-news-anno ... rface-nsti and will give it a try

Re: SNMP Traps are not getting reported "Waiting for trap"

Posted: Thu Jan 24, 2013 6:13 pm
by scottwilkerson
Can you look in Admin -> Unconfigured objects to see if any items appear

Re: SNMP Traps are not getting reported "Waiting for trap"

Posted: Fri Jan 25, 2013 2:08 am
by Andreas_c_Schmidt
nothing under admin -unconfigured objects.

my understanding is, that this show up only nrpe or ncsa or nrdp objects coming into nagios. Not snmp traps.

Re: SNMP Traps are not getting reported "Waiting for trap"

Posted: Fri Jan 25, 2013 9:13 am
by scottwilkerson
It should show any unconfigured object in XI.

Once you get NSTI running you should be able to ad least see the traps, etc.

Re: SNMP Traps are not getting reported "Waiting for trap"

Posted: Mon Jan 28, 2013 9:55 am
by Andreas_c_Schmidt
Negative on anything under "unconfigured objects"

NSTI didn't install properly.
using install.py it gave me

File “./install.py”, line 384, in
main()
File “./install.py”, line 374, in main
edit_nsti_conf()
File “./install.py”, line 283, in edit_nsti_conf
for line in inplacefile:
File “/usr/local/pythonbrew/pythons/Python-2.5.2/lib/python2.5/fileinput.py”, line 253, in next
line = self.readline()
File “/usr/local/pythonbrew/pythons/Python-2.5.2/lib/python2.5/fileinput.py”, line 322, in readline
os.rename(self._filename, self._backupfilename)

as described here http://linuxdrops.com/step-by-step-inst ... -for-nsti/ and I followed those steps and nsti is showing a blank page. no traps at all.

in "/etc/snmp/snmptt.conf" i have a catchall entry (and more entries by the mibs)
EVENT CatchAll .1.* "SNMP Traps" Critical
FORMAT $D
EXEC /usr/local/nagios/libexec/eventhandlers/submit_check_result "$r"
"snmp_traps" 2 "$O: $1 $2 $3 $4 $5"

I spotted that with the default install I didnt have had /usr/local/nagios/libexec/eventhandlers/submit_check_result so I had to copy it from /tmp/nagiosxi/..

Here is what I got from tail -f snmptrapdlog

Code: Select all

2013-01-28 14:33:01 myhostname_as_per_hosts [UDP: [10.20.30.40]:38243->[10.20.30.41]]:
.1.3.6.1.2.1.1.3.0 = Timeticks: (42730074) 4 days, 22:41:40.74  .1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.637.3.1.6.1.2200     .1.3.6.1.4.1.637.3.1.6.1.2200.1 = INTEGER: 2 .1.3.6.1.4.1.637.3.1.6.1.2200.2 = INTEGER: 3    .1.3.6.1.4.1.637.3.1.6.1.2200.3 = INTEGER: 2    .1.3.6.1.4.1.637.3.1.6.1.2200.4 = STRING: "Error in asset no.53"     .1.3.6.1.4.1.637.3.1.6.1.2200.5 = STRING: "2000-01-05,22:41:40.0"
2013-01-28 14:33:01  myhostname_as_per_hosts [UDP: [10.20.30.40]:38243->[10.20.30.41]]:
.1.3.6.1.2.1.1.3.0 = Timeticks: (42730074) 4 days, 22:41:40.74  .1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.637.3.1.6.1.2200     .1.3.6.1.4.1.637.3.1.6.1.2200.1 = INTEGER: 2 .1.3.6.1.4.1.637.3.1.6.1.2200.2 = INTEGER: 3    .1.3.6.1.4.1.637.3.1.6.1.2200.3 = INTEGER: 2    .1.3.6.1.4.1.637.3.1.6.1.2200.4 = STRING: "Error in asset no.55"     .1.3.6.1.4.1.637.3.1.6.1.2200.5 = STRING: "2000-01-05,22:41:40.0"
-rw-r--r-- 1 root root 720 Jan 28 14:38 snmpttsystem.log
-rw-r--r-- 1 snmptt root 572K Jan 28 14:44 snmptt.debug

Code: Select all

# cat snmptt.debug
********** SNMPTT v1.4beta2 started: Mon Jan 28 14:38:24 2013 **********

********** Net-SNMP version 5.05 Perl module enabled **********

********** MIBS: ALL **********


        Loading /etc/snmp/snmptt.conf
        Finished loading 1428 lines from /etc/snmp/snmptt.conf

Finished loading configuration files

Processing memory copy of configuration files
60 EVENTs found
60 EVENTs found that contain at least the mandatory FORMAT line
Finished processing memory copy of configuration files

cwd: /
Changing to UID: snmptt (496)
Closing debug file /var/log/snmptt/snmptt.debug
Debug file /var/log/snmptt/snmptt.debug re-opened under uid 496

Code: Select all

# cat snmpttsystem.log
Mon Jan 28 14:38:24 2013 SNMPTT v1.4beta2 started
Mon Jan 28 14:38:24 2013 Loading /etc/snmp/snmptt.conf
Mon Jan 28 14:38:24 2013 Finished loading 1428 lines from /etc/snmp/snmptt.conf
Mon Jan 28 14:38:24 2013 Changing to UID: snmptt (496)
DO you have any comprehensive and tested snmp install and config guide along with Nagios XI?
http://assets.nagios.com/downloads/nagi ... ith_XI.pdf is not doing the job.
I'm now going to downgrade to the described version 1.3 to rule out issues with the beta1.4 release from RHN.

Re: SNMP Traps are not getting reported "Waiting for trap"

Posted: Mon Jan 28, 2013 10:21 am
by Andreas_c_Schmidt
OMG .. this is sorted now.

after installing 1.3 as per description it works fine. yum update overwrites 1.3 with 1.4 beta and it breaks again ..

Re: SNMP Traps are not getting reported "Waiting for trap"

Posted: Mon Jan 28, 2013 10:28 am
by slansing
Strange, I'll make a note of this and bring it to the developer of the component. Just to be clear, it is running on 1.3 but not on 1.4?