No Traps displayed in Web GUI | Waiting for Trap…
Posted: Thu Mar 09, 2017 1:19 am
What I am ultimately trying to achieve is to listen to several 3rd party, non-commercially used network devices; These all generate SNMP traps and forward them to my Nagios machine (192.168.1.2).
My Nagios machine receives all these traps, and then as soon as it receives them it forwards them to a monitoring software higher in the network topology (192.168.1.83).
The host (192.168.1.1) OS is CentOS 7 with Oracle VirtualBox as VM Manager. I am running Nagios XI (192.168.1.2) as a virtual machine, I downloaded the .ova file from here: https://www.nagios.com/downloads/nagios ... sxi-ova-64
Then I enabled the SNMP Trap sender by following this guide: https://assets.nagios.com/downloads/nag ... ios_XI.pdf
As the above-mentioned guide instructs:
I then uploaded (the Process Trap checkbox is checked) both MIBs through the Admin > Manage MIBs Web GUI.
I send a made-up trap (See below) from another host on the local network. The trap gets logged in the /var/log/snmptt/snmptt.log but:
1.) It takes about 2minutes for the event to display inside the .log file.
2.) It does not show in Web GUI; the message there still says “Waiting for Trap…”
3.) The forum thread related to similar issue does not seem to offer any conclusive solution: https://support.nagios.com/forum/viewto ... =16&t=9034
This is what the log file shows:
My question is:
From Windows CMD I run the command:
And the file “SNMP_test_2.txt” I use for the SNMP Trap contains:
Where:
I notice that he -o parameter is completely ignored by Nagios’ MIB and TrapTranslator, and it’s actually the -g that determines what kind of SNMP Trap it will be translated as. (This is not bothering me as much as learning WHAT/WHERE can I change this in Nagios so that I can translate my own SNMP traps
)
My Nagios machine receives all these traps, and then as soon as it receives them it forwards them to a monitoring software higher in the network topology (192.168.1.83).
The host (192.168.1.1) OS is CentOS 7 with Oracle VirtualBox as VM Manager. I am running Nagios XI (192.168.1.2) as a virtual machine, I downloaded the .ova file from here: https://www.nagios.com/downloads/nagios ... sxi-ova-64
Then I enabled the SNMP Trap sender by following this guide: https://assets.nagios.com/downloads/nag ... ios_XI.pdf
As the above-mentioned guide instructs:
So, I downloaded these two MIBs: NAGIOS-NOTIFY-MIB.txt & NAGIOS-ROOT-MIB.txt from inside the Nagios Web GUI here: (Admin > Manage Componenets > SNMP Trap Sender > Edit SettingsYou may need to configure snmptt on the Nagios XI server to use the MIBs your remote devices are using. This can be done via Admin > System Extensions > Manage MIBs. Click the Browse button to find the MIB to be added. Check the box Process trap and then click the Upload MIB button.
I then uploaded (the Process Trap checkbox is checked) both MIBs through the Admin > Manage MIBs Web GUI.
I send a made-up trap (See below) from another host on the local network. The trap gets logged in the /var/log/snmptt/snmptt.log but:
1.) It takes about 2minutes for the event to display inside the .log file.
2.) It does not show in Web GUI; the message there still says “Waiting for Trap…”
3.) The forum thread related to similar issue does not seem to offer any conclusive solution: https://support.nagios.com/forum/viewto ... =16&t=9034
This is what the log file shows:
Code: Select all
Thu Mar 9 14:48:38 2017 .1.3.6.1.6.3.1.1.5.4 Normal "Status Events" 192.168.1.99 - Link up on interface Trapgen test. Syndeticom. Admin state: $2. Operational state: $3
Thu Mar 9 14:49:18 2017 .1.3.6.1.6.3.1.1.5.4 Normal "Status Events" 192.168.1.99 - Link up on interface Trapgen test. Syndeticom. Admin state: $2. Operational state: $3
Thu Mar 9 16:04:45 2017 .1.3.6.1.6.3.1.1.5.3 Normal "Status Events" 192.168.1.99 - Link down on interface Trapgen test. Syndeticom. Admin state: $2. Operational state: $3
Thu Mar 9 16:11:28 2017 .1.3.6.1.6.3.1.1.5.3 Normal "Status Events" 192.168.1.99 - Link down on interface Trapgen test. Syndeticom. Admin state: $2. Operational state: $3
Thu Mar 9 16:35:18 2017 .1.3.6.1.6.3.1.1.5.3 Normal "Status Events" 192.168.1.99 - Link down on interface Trapgen test. Syndeticom 01. Admin state: $2. Operational state: $3
Thu Mar 9 16:57:01 2017 .1.3.6.1.6.3.1.1.5.4 Normal "Status Events" localhost - Link up on interface eth0. Admin state: up. Operational state: up
Thu Mar 9 16:59:10 2017 .1.3.6.1.6.3.1.1.5.3 Normal "Status Events" 192.168.1.99 - Link down on interface Trapgen test. Syndeticom 02. Admin state: $2. Operational state: $3
Thu Mar 9 16:59:55 2017 .1.3.6.1.6.3.1.1.5.3 Normal "Status Events" 192.168.1.99 - Link down on interface Trapgen test. Syndeticom 03. Admin state: $2. Operational state: $3- 1.) Why isn’t anything showing in Web GUI;
2.) Why is it taking so long for Nagios to log the Trap in /var/log/snmptt/snmptt.log?
From Windows CMD I run the command:
Code: Select all
trapgen -f SNMP_test_2.txtCode: Select all
-d 192.168.1.2:162
-c public
-o .1.2.3.4.5.6.7.8.9.0
-i 192.168.1.99
-g 2
-s 23
-t 12445
-v 1.3.6.1.4.1.1824.1.0.0.1 STRING Trapgen test. Syndeticom 01Code: Select all
-c <community string>
-d <destinationIpOrHost[:portnumber]>
-v <varbind OID> <varbind type> <varbind data>
-o <sender's OID>
-i <sender's IP address - V1 only>
-g <generic type>
-s <specific type>
-t <timestamp>