Page 1 of 1
snmp trap show OK: TRAP RESET?
Posted: Fri Aug 18, 2017 3:32 am
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.
Re: snmp trap show OK: TRAP RESET?
Posted: Fri Aug 18, 2017 11:32 am
by scottwilkerson
you would need to change the command to the following the see 162 udp port
Did you follow all the setup on the first several pages of the document above?
Re: snmp trap show OK: TRAP RESET?
Posted: Fri Aug 18, 2017 12:33 pm
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.
Re: snmp trap show OK: TRAP RESET?
Posted: Fri Aug 18, 2017 1:26 pm
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
Re: snmp trap show OK: TRAP RESET?
Posted: Sun Aug 20, 2017 11:59 am
by dimsum
Please find attached file that included ps command result.
In Unconfigured Objects menu, I found "No unconfigured passive objects found."
Thanks.
Re: snmp trap show OK: TRAP RESET?
Posted: Mon Aug 21, 2017 12:53 pm
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
Re: snmp trap show OK: TRAP RESET?
Posted: Fri Aug 25, 2017 8:47 pm
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.
Re: snmp trap show OK: TRAP RESET?
Posted: Mon Aug 28, 2017 11:30 am
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.