Time period exclusion not matching.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bmiadmins
Posts: 35
Joined: Thu May 15, 2014 3:40 pm

Time period exclusion not matching.

Post by bmiadmins »

Hello,

I was wanting to see if I had misconfigured the timeperiod exclusions. I had thought that the way to do it was at the host level. In my case I am also needing to use escalations during the exclusion period. So, the set up is like this :

1. Host that has a exclusion window is assigned a hostgroup.

2. The hostgroup is in a cpu load escalation for after hours.

3. The Host with exclusion has a job that runs for an hour which I want to excluse for a hour from triggering the escalation settings.

4. The Host with exclusion has its own timeperiod defined which has the hour window set up as a exclusion.
24x7(exclusion 1900-2000) for everyday of the week.

Configs:

define host {
host_name special_case
use ibm-pro
alias Special_case
address special_case.com
check_period ignor02_24x7
notification_period ignor02_24x7
register 1
}


define timeperiod {
timeperiod_name ignor02_24x7
alias This includes exclusios
exclude ignore_ignor02_24x7
name special_case
monday 00:00-24:00
saturday 00:00-24:00
friday 00:00-24:00
thursday 00:00-24:00
wednesday 00:00-24:00
tuesday 00:00-24:00
sunday 00:00-24:00
}


define timeperiod {
timeperiod_name ignore_ignor02_24x7
alias Ignore special_case Load Spike
sunday 19:00-20:00
saturday 19:00-20:00
friday 19:00-20:00
thursday 19:00-20:00
wednesday 19:00-20:00
tuesday 19:00-20:00
monday 19:00-20:00
}


I though that the objects ( host ) settings outweighed all others? Rather, object inheritance would make sure that the exclusion worked for this host. Is this failing due to improper set up? Is this failing due to the overlap in escalation time window vs. host check and notification time windows?

Thanks for your help.
Last edited by bmiadmins on Tue Aug 12, 2014 4:28 pm, edited 1 time in total.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Time period exclusion not matching.

Post by abrist »

Are you applying this timeperiod with a template? If so, can you post the template config?
Check the configuration of the host object in /usr/local/nagios/var/objects.cache - does it report either of the time periods as part of the object?
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.
bmiadmins
Posts: 35
Joined: Thu May 15, 2014 3:40 pm

Re: Time period exclusion not matching.

Post by bmiadmins »

Thanks for the fast reply!

I took a look at the cache file you mentioned and found something that sticks out.

From the cache file @ /usr/local/nagios/var/objects.cache

define host {
host_name n2xinfosrvp02
alias IBM Infosphere App Server
address n2xinfosrvp02.bmi.org
check_period 24x7
check_command check-host-alive!!!!!!!!
contact_groups ibm-admins,linux-admins
notification_period 24x7
initial_state o
check_interval 15.000000
retry_interval 3.000000
max_check_attempts 5
active_checks_enabled 1
passive_checks_enabled 1
obsess_over_host 1
event_handler_enabled 1
low_flap_threshold 0.000000
high_flap_threshold 0.000000
flap_detection_enabled 1
flap_detection_options o,d,u
freshness_threshold 0
check_freshness 0
notification_options d,r
notifications_enabled 1
notification_interval 60.000000
first_notification_delay 0.000000
stalking_options n
process_perf_data 1
failure_prediction_enabled 1
retain_status_information 1
retain_nonstatus_information 1
}


The time period listed above spans all service checks that reference that host. Now, the actual host cfg file shows a different listing on the time period to checck this host on. See below :

###############################################################################
#
# Host configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2014-08-07 09:37:54
# 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 host {
host_name n2xinfosrvp02
use ibm-infosphere-prod
alias IBM Infosphere App Server
address n2xinfosrvp02.bmi.org
check_period n2xinfosrvp02_24x7
notification_period n2xinfosrvp02_24x7
register 1
}

###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################


The associated time period is :

define timeperiod {
timeperiod_name n2xinfosrvp02_24x7
alias This includes exclusios
exclude ignore_infosphere
name n2xinfosrvp02
monday 00:00-24:00
saturday 00:00-24:00
friday 00:00-24:00
thursday 00:00-24:00
wednesday 00:00-24:00
tuesday 00:00-24:00
sunday 00:00-24:00
}

With the exclusion of :

define timeperiod {
timeperiod_name ignore_infosphere
alias Ignore InfoSphere Load Spike
sunday 19:00-20:00
saturday 19:00-20:00
friday 19:00-20:00
thursday 19:00-20:00
wednesday 19:00-20:00
tuesday 19:00-20:00
monday 19:00-20:00
}


I am not sure if using the escalation wizard ignores those exclude ranges set for this hosts time period or not. I would greatly appreciate some direction on addressing this.


Thanks again!
bmiadmins
Posts: 35
Joined: Thu May 15, 2014 3:40 pm

Re: Time period exclusion not matching.

Post by bmiadmins »

Needed to add the following to this. I am applying that time period directly to the host. In most cases the time periods are inherited from the template for each host. However, with this one I assigned it directly due to needing the exclusion due to loads.


Please let me know if I can answer any questions.
bmiadmins
Posts: 35
Joined: Thu May 15, 2014 3:40 pm

Re: Time period exclusion not matching.

Post by bmiadmins »

Just wondering if any one has any ideas on this issue?



Thanks again.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Time period exclusion not matching.

Post by sreinhardt »

Sorry, you caught us on a pretty busy day. :) Could you PM one of us a profile.zip from Admin->System Profile->Download profile.zip. This will give us a copy of your configs to look over and compare with what you are seeing.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
bmiadmins
Posts: 35
Joined: Thu May 15, 2014 3:40 pm

Re: Time period exclusion not matching.

Post by bmiadmins »

I would consider doing that. However, are you a employee of nagios? I can not release those configs since they essentially show everything about our network. I need to make sure that I am working with a nagios employee. I would much rahter call in to a phone number to verify. I am still trying to see how the forum works. Some of the moderators are non-employees correct?


Thanks,

John
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Time period exclusion not matching.

Post by sreinhardt »

Yes I am, only nagios employees have the green names and nagios icon on their user accounts. All moderators and admins are current nagios employees. MVP and veteran users are external people that do not work for nagios in any way, but are valued contributors due to giving helpful advice and\or may have been past employees. While I do trust them to give out accurate and useful information, I do understand not wanting to give out your configs to anyone other than actual nagios employees.

However considering you have entered tickets for this into the email system, we now need to lock this thread, as we need to be sure that we are not duplicating efforts or giving conflicting information.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked