Trying to get Traps to work...

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Trying to get Traps to work...

Post by jbennett »

I am trying to get SNMP Traps to finally work on Nagios in our environment. I have configured SNMPTT and I currently have standard SNMP checks working correctly. I can use the iReasoning MIB Browser to send traps to the Nagios box successfully (as verified below).

From my snmptt.log:

Code: Select all

Thu Jan 31 14:40:19 2013 .1.3.6.1.6.3.1.1.5.2 Normal "Status Events" 10.100.29.181 - A warmStart trap signifies that the SNMP entity,
When I check for /var/log/snmptt/snmpttunknown.log, I do not have said file. I have configured it in the snmptt.ini file but it appears to have never been generated. Is this to assume that I've just not had any unknown traps come through?

Code: Select all

unknown_trap_log_file = /var/log/snmptt/snmpttunknown.log
Checking snmptt.debug, I only see the following:

Code: Select all

Sleeping for 5 seconds
Checking snmptthandler.debug, I see the following from the trap that I sent:

Code: Select all

SNMPTTHANDLER started: Thu Jan 31 14:40:19 2013

s = 1359664819, usec = 367522
s_pad = 1359664819, usec_pad = 367522

Data received:

<UNKNOWN>

UDP: [xxx.xxx.xxx.xxx]:1307

.1.3.6.1.2.1.1.3.0 0:0:00:00.00

.1.3.6.1.6.3.1.1.4.1.0 .1.3.6.1.6.3.1.1.5.2

.1.3.6.1.6.3.18.1.3.0 yyy.yyy.yyy.yyy

.1.3.6.1.6.3.18.1.4.0 "zzzzzzz"

.1.3.6.1.6.3.1.1.4.3.0 .0.0
From snmpttsystem.log:

Code: Select all

Thu Jan 31 08:42:23 2013 Reloading configuration file(s)
Thu Jan 31 08:42:23 2013 Loading /usr/share/snmp/mibs/processed_mibs/.txt
Thu Jan 31 08:42:23 2013 Could not open configuration file: /usr/share/snmp/mibs/processed_mibs/.txt
Thu Jan 31 08:42:23 2013 Loading /etc/snmp/snmptt.conf
Thu Jan 31 08:42:23 2013 Finished loading 1374 lines from /etc/snmp/snmptt.conf
Using the SNMP Traps wizard, I have created some services utilizing the xiwizard_snmptrap_service template. What check should be running in that template? I see check_dummy listed, but I don't ever see anything change with this.

Any help would be appreciated.
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Trying to get Traps to work...

Post by jbennett »

:)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Trying to get Traps to work...

Post by scottwilkerson »

Did you install snmptt with the directions in this file?
http://library.nagios.com/library/produ ... -nagios-xi

Also, lets create the unknown file just in case

Code: Select all

touch /var/log/snmptt/snmpttunknown.log
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Trying to get Traps to work...

Post by jbennett »

scottwilkerson wrote:Did you install snmptt with the directions in this file?
http://library.nagios.com/library/produ ... -nagios-xi
Yes. I followed it exactly.
Also, lets create the unknown file just in case

Code: Select all

touch /var/log/snmptt/snmpttunknown.log
That helped. I am now getting unknown traps in said file.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Trying to get Traps to work...

Post by scottwilkerson »

jbennett wrote: That helped. I am now getting unknown traps in said file.
Excellent, now if you have the mibs you will need to add them with the following procedure from page 2 of the document
Installing MIBs
You may need to configure SNMPTT on the Nagios XI server to use the MIBs your remote devices are using. This may mean having to
load extra MIBs into the /usr/share/snmp/mibs/ directory on the Nagios XI server. This can be done through the command line or also
through the XI interface Admin -> Manage MIBs.

You will then also have to run the following command to import each new MIB (replace <PathToNewMIB> with the path to the MIB you
want to import):

Code: Select all

# addmib <PathToNewMIB>
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Trying to get Traps to work...

Post by jbennett »

I have already done that as well...I have verified that they were added to the snmptt.conf file too.
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Trying to get Traps to work...

Post by jbennett »

I figured I would add that I have been checking the log files again today and I have nothing new showing up. I have tried restarting snmptt as well.

When I send a trap using the iReasoning Trap Sender, it will show up in the snmptt.log file. However, when I check the device I sent it as, It still just shows the following: OK: Trap reset on Tue Feb 5 12:52:51 CST 2013
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

Re: Trying to get Traps to work...

Post by mikew »

One thing you might check is hostname. I have seen where the host is configured with a hostname like server for example but the DNS entry is a FQDN like server.example.com. When the trap is sent it is sent from "server" and when Nagios sees it, Nagios think the host is "server" but the entry in Nagios for the host is server.example.com and so the trap never gets placed in the web interface. The solution is to add a host in Nagios called server.
Mike Weber

Nagios Training/Consulting
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Trying to get Traps to work...

Post by jbennett »

mikew wrote:One thing you might check is hostname. I have seen where the host is configured with a hostname like server for example but the DNS entry is a FQDN like server.example.com. When the trap is sent it is sent from "server" and when Nagios sees it, Nagios think the host is "server" but the entry in Nagios for the host is server.example.com and so the trap never gets placed in the web interface. The solution is to add a host in Nagios called server.
Unfortunately, these traps aren't coming from a server, but rather from hardware (PDU & UPS). I would assume the hostname at that point would actually just be the IP address, no?

I should note that I am able to query SNMP via Nagios to these same devices already. It just seems that traps themselves will not populate.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Trying to get Traps to work...

Post by abrist »

Scott's out of town, so I will attempt to continue your support.

Were the mibs populated in /usr/share/snmp/mibs/ after import/addmib?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked