Traps delivered to Nagios from device but not shown in GUI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
nms
Posts: 222
Joined: Wed Sep 28, 2016 9:35 am

Re: Traps delivered to Nagios from device but not shown in G

Post by nms »

Hi ssax

PMed you the zip file.

With thanks
swolf

Re: Traps delivered to Nagios from device but not shown in G

Post by swolf »

Is snmptrapd running? That's the service responsible for moving information from port 162 to the snmptt system, and if it's not running you won't see anything in any logs.

Code: Select all

service snmptrapd status
nms
Posts: 222
Joined: Wed Sep 28, 2016 9:35 am

Re: Traps delivered to Nagios from device but not shown in G

Post by nms »

Yes, that's running

Code: Select all

[root@am1nms-nagiosxi ~]# service snmptrapd status
snmptrapd (pid  2236) is running...
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Traps delivered to Nagios from device but not shown in G

Post by ssax »

I installed your version of XI on CentOS 6, ran the SNMP Trap Installation script from here:

https://assets.nagios.com/downloads/nag ... ios_XI.pdf

Then I replaced my /etc/snmp with your /etc/snmp, then restarted the services:

Code: Select all

service snmptrapd restart
service snmptt restart
Then I ran this command on the XI server (and left it running):

Code: Select all

tail -Fn0 /var/log/messages /var/log/snmptt/*
I then ran this command from a remote system:

Code: Select all

snmptrap -v 2c -c public 192.168.X.X '' NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification netSnmpExampleHeartbeatRate i 123456

Which shows me these messages on the XI server:

Code: Select all

==> /var/log/messages <==
Mar 27 10:45:25 xid snmptrapd[4677]: 2019-03-27 10:45:25 <UNKNOWN> [UDP: [192.168.X.X]:35394->[192.168.X.X]:162]:#012DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (42687119) 4 days, 22:34:31.19#011SNMPv2-MIB::snmpTrapOID.0 = OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification#011NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate = INTEGER: 123456

==> /var/log/snmptt/snmptt.log <==
Wed Mar 27 10:45:25 2019 .1.3.6.1.4.1.8072.2.3.0.1 Normal "netSnmpExampleHeartbeatRate" 192.168.X.X - SNMP netSnmpExampleHeartbeatRate

==> /var/log/messages <==
Mar 27 10:45:28 xid snmptt[4706]: .1.3.6.1.4.1.8072.2.3.0.1 Normal "netSnmpExampleHeartbeatRate" 192.168.X.X - SNMP netSnmpExampleHeartbeatRate
Mar 27 10:45:28 xid nagios: Warning:  Passive check result was received for service 'SNMP Traps' on host '192.168.X.X', but the host could not be found!
Mar 27 10:45:28 xid nagios: Error: External command failed -> PROCESS_SERVICE_CHECK_RESULT;192.168.X.X;SNMP Traps;0;netSnmpExampleHeartbeatRate
Mar 27 10:45:28 xid nagios: External command error: Command failed
That shows that the trap was received by snmptrapd, processed by SNMPTT (because you have your snmptt.conf setup properly for it, it went into the snmptt.log), and then tries to put it into Nagios but because it doesn't exist on my system it shows up in Admin > Unconfigured Objects.

I would do that exact process on your system again, it's safe.
nms
Posts: 222
Joined: Wed Sep 28, 2016 9:35 am

Re: Traps delivered to Nagios from device but not shown in G

Post by nms »

Hi,

I finally managed to solve this issue. The issue was with the SNMP translator but the Nagios server had two IPs in which when issuing a trap it was sending it via the incorrect one!
Traps are now visible in the logs and GUI.

Thanks for your prompt support. This ticket can be marked as solved/closed.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Traps delivered to Nagios from device but not shown in G

Post by ssax »

Thank you for posting your findings! Locking now and marking as resolved.
Locked