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.
snmp trap show OK: TRAP RESET?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: snmp trap show OK: TRAP RESET?
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?
Code: Select all
netstat -nluRe: snmp trap show OK: TRAP RESET?
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.
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?
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
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=300Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: snmp trap show OK: TRAP RESET?
Please find attached file that included ps command result.
In Unconfigured Objects menu, I found "No unconfigured passive objects found."
Thanks.
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.
Re: snmp trap show OK: TRAP RESET?
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.logBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: snmp trap show OK: TRAP RESET?
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.
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?
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.
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!