Page 4 of 4
Re: No file called /usr/local/nagios/etc/objects/switch.cfg
Posted: Fri Nov 14, 2014 12:45 pm
by perric
More on this. Trying to troubleshoot options on my last change...
snmptt.conf file - Since there are two entries for this OID, I wasn't sure if one had to be set as Normal or not, so that Nagios could differentiate what is Critical vs Normal. I tried setting the first one (with EXEC commented out) as Critical to match the second entry. No luck. Next, I tried setting the first one (the one with EXEC commented out) as Normal, Keeping the second one as Critical. When I tested, notification still shows "Never".
In my tests, I am shutting down an interface, which produces an red icon in the Nagios XI GUI under SNMP Trap. When I bring the inteface back up, the icon showing the SNMP Trap is green. It seems that Nagios understand the state change, but just does not think it should notify yet.
David
Re: No file called /usr/local/nagios/etc/objects/switch.cfg
Posted: Fri Nov 14, 2014 3:45 pm
by sreinhardt
Let's stop looking at the notification time, and instead look at the service state and retry count. Notifications have very specific settings that determine if they send, and it is not usually a single check result that would cause it.
I think I mentioned this before. Depending on how this service was created, you might have a few options.
If no contacts are defined, it will never send a notification.
If a retry interval above 0 is set, it will need to recieve that many failed traps before it will send a notification.
It sounds like, since you mentioned the state color changing, that it is detecting the changes now, and just is a notification\retry interval issue. Please post the snmp traps service for this host as you have it now. The text file from /usr/local/nagios/etc/services/[host].cfg would be ideal.
Re: No file called /usr/local/nagios/etc/objects/switch.cfg
Posted: Mon Nov 17, 2014 12:28 pm
by perric
Sure. .cfg file was small, so I cut and pasted it below. From my GUI settings, I am using a Service template with the following specified:
Check Settings
Initial State - Not defined
Check Interval - 1
Retry Interval - 1
Max check attempts - 1
Active Checks - enabled
Passive Checks - skip
Check Period - xi_timeperiod_24x7
Other options - not defined
Alert Settings
Contact Group - specified a "known working" group
Notification Period - i_timeperiod_24x7
Notification Options - w, c, u, r, f, s
Notification Interval - 1440
First notification delay - 1
Notification Enabled - On
Stalking options - not defined
###############################################################################
#
# Service configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2014-11-17 12:12:44
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################
define service {
host_name NET_drsanrtr02-dmvpn
service_description SNMP Traps
use NET_xiwizard_snmptrap_service
display_name NET_drsanrtr02-dmvpn
icon_image snmptrap.png
_xiwizard snmp_trap
register 1
}
###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
David
Re: No file called /usr/local/nagios/etc/objects/switch.cfg
Posted: Mon Nov 17, 2014 3:26 pm
by sreinhardt
Since we're getting into templates and little changes that require testing, we should probably move this to a remote instead. If you would send an email to
[email protected] and include a link to this thread and a current copy of your system profile please.
Re: No file called /usr/local/nagios/etc/objects/switch.cfg
Posted: Tue Nov 18, 2014 4:25 pm
by sreinhardt
locking per ticketing system transfer. So far it appears to be an issue with first notification delay, blocking future messages being sent. Will try and update this with future resolution.