snmp trap show OK: TRAP RESET?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dimsum
Posts: 153
Joined: Thu Aug 15, 2013 6:05 pm

snmp trap show OK: TRAP RESET?

Post by dimsum »

Hi There,

I try to using snmp trap and I was follow instruction in:

https://assets.nagios.com/downloads/nag ... 1502462433

Test command: snmptrap -v 2c -c public 127.0.0.1 '' linkUp ifDescr s eth0 ifAdminStatus i 1 ifOperStatus i 1
Log: Fri Aug 18 04:09:08 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

cat /usr/local/nagios/var/nagios.log
Nothing log update

Now I added snmp trap into localhost. the line is say "Waiting for trap..." (so look good) and

second I run command:
snmptrap -v 2c -c public 127.0.0.1 '' linkUp ifDescr s eth0 ifAdminStatus i 1 ifOperStatus i 1

Not good result, Im stuck showing OK: TRAP RESET

I run command netstat -nlt

but not have a port number 162. Is it ok?

Could someone help me. please advise,

Thanks in advance.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: snmp trap show OK: TRAP RESET?

Post by scottwilkerson »

you would need to change the command to the following the see 162 udp port

Code: Select all

netstat -nlu
Did you follow all the setup on the first several pages of the document above?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
dimsum
Posts: 153
Joined: Thu Aug 15, 2013 6:05 pm

Re: snmp trap show OK: TRAP RESET?

Post by dimsum »

Yes, I installed mibs file for nagios xi for testing. for sure I run command:

addmib /usr/share/snmp/mibs/NAGIOS-NOTIFY-MIB.txt

Thanks for command sorry my mistake smtp trap is running on upd protocol.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: snmp trap show OK: TRAP RESET?

Post by tgriep »

Login to the XI GUI and go the Admin > Unconfigured Objects menu. See if the test trap is there, if it is configure it and then the system should receive them automatically from now on.

If not, please post the files from the /etc/snmp folder as well as the output of this command run in a root shell

Code: Select all

ps -ef --cols=300
Be sure to check out our Knowledgebase for helpful articles and solutions!
dimsum
Posts: 153
Joined: Thu Aug 15, 2013 6:05 pm

Re: snmp trap show OK: TRAP RESET?

Post by dimsum »

Please find attached file that included ps command result.

In Unconfigured Objects menu, I found "No unconfigured passive objects found."

Thanks.
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: snmp trap show OK: TRAP RESET?

Post by tgriep »

When sending the test trap, you you see it logged in any of the following files?

Code: Select all

/var/log/snmptt/snmptt.log
/var/log/snmptt/snmpttsystem.log
/var/log/snmptt/snmpttunknown.log
Be sure to check out our Knowledgebase for helpful articles and solutions!
dimsum
Posts: 153
Joined: Thu Aug 15, 2013 6:05 pm

Re: snmp trap show OK: TRAP RESET?

Post by dimsum »

Hi,

Now I could test a trap from a localhost it's worked I don't know why because I did't any configure yet, so I have additional questions.

1. OK: TRAP RESET it's Nagios is already to trap from snmp send a notification when occurred righ?
2. If I need to traps more then one event how could I configure Nagios to traps? because when I need to traps a notification from e.g. storage device, firewall device it's sent a trap when these device got something wrong or critical. It's possible?

Thank you.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: snmp trap show OK: TRAP RESET?

Post by tgriep »

1. The "OK: TRAP RESET" message it set to a service when the SNMP Trap wizard it run. When the Wizard it run, it will setup the service check and put the message in that service just do it displays some valid data.
At this point, the service is waiting to receive a trap. If no traps have been received, that message will not get reset.
2. When the Nagios server receives a trap from a different host and that trap is configured, it will create a separate SNMP Trap entry assigned to the new host that is how they will be separated.

This document describes how SNMP Traps work and integrate with Nagios XI.
https://support.nagios.com/kb/article/n ... orial.html
Take a look at that KB article for the details on how the XI server uses traps and for instructions on changing the received traps to display warning and critical alerts.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked