Page 1 of 2

recurring downtime does not include afterward changes

Posted: Tue Jan 06, 2015 10:19 am
by MichielvM
I have a few hostgroups on which I have applied a recurring downtime.
After adding a few checks to one of the member hosts, I noticed that the text balloon indicating a downtime schedule is missing on these new checks.
I'm afraid that it boils down to the new checks not being ignored during the downtimes. Ergo: Some administrator will lose a good night sleep.
It looks like recurring downtime is nothing more than a snapshot of the hosts and services, ignoring all subsequent changes.

Did I miss something when creating this recurring schedules?

Re: recurring downtime does not include afterward changes

Posted: Tue Jan 06, 2015 11:46 am
by abrist
Recurring downtime is scheduled as regular downtime (as the downtime window approaches) through a cron job (/etc/cron.d/nagiosxi):

Code: Select all

01  * * * * nagios /usr/local/nagiosxi/cron/recurringdowntime.pl > /usr/local/nagiosxi/var/recurringdowntime.log 2>&1
New recurring downtime should be added at the top of the hour, before then though, any newly added monitoring object will not be scheduled until the top of the hour.

Re: recurring downtime does not include afterward changes

Posted: Wed Jan 07, 2015 4:29 am
by MichielvM
I don't understand your reply, maybe my post was not clear.

A Host is member of a hostgroup. This hostgroup is added to a recurring downtime schedule. (Including all services)
A text balloon appears on every host and service indicating when the next recurring downtime will run.
Now I add a service-check to a member host.
This NEW service check does not have the indicator balloon. Thus it is not included in the recurring schedules.

I don't see what this has to do with cronjobs.
I don not wish to add a new schedule. I would expect that any additional service check is automatically included in the existing jobs.

If I understand your reply correctly, it would mean that I have to re-schedule my jobs on every change I make.

Re: recurring downtime does not include afterward changes

Posted: Wed Jan 07, 2015 4:10 pm
by lmiltchev
I don not wish to add a new schedule. I would expect that any additional service check is automatically included in the existing jobs.
I am not sure why would would be adding a new serving while the host is in downtime... The "new" service would not be automatically added to the scheduled service downtime jobs. You are welcome to post a feature request about this functionality on our bug tracker, but I don't see how this could be useful. Can you explain why would you want to set a service in downtime on creation?

Re: recurring downtime does not include afterward changes

Posted: Wed Jan 21, 2015 4:55 am
by MichielvM
Allright..now I'm really sure my OP is misunderstood.

Say I have a group of hosts which are rebooted everyday at midnight for whatever reason.
I don't want my standby-engineer to get alerts for this in the middle of the night, so I create a recurring downtime schedule to ignore all host and service alerts from midnight + 25 min.

Now there's been a change on these hosts. Let's say they have an added role of printserver.
So I add a new service to check if the spooler service is up. Still no rocket science.

Here it comes: The recurring schedule does not include this new spooler check. Or so it appears. (There's no text balloon in the Xi interface indicating that)
I have no other way of making sure that the changes I made are ignored during the nightly reboots.
Not until after the schedules next run is this text balloon visible next to the added checks.

Re: recurring downtime does not include afterward changes

Posted: Wed Jan 21, 2015 11:14 am
by lmiltchev
Isn't it easier to use a custom notification period that excludes 00:00-00:25 notifications? Perhaps, you could try something like this:

Code: Select all

define timeperiod {
	timeperiod_name               		my_custom_notification_period
	alias                         		Exclude 25 min after midnight
	monday                        		00:25-24:00
	tuesday                       		00:25-24:00
	wednesday                     		00:25-24:00
	thursday                      		00:25-24:00
	friday                        		00:25-24:00
	saturday                      		00:25-24:00
	sunday                        		00:25-24:00
	}
When you add a new service, define it with the same notification period.

Re: recurring downtime does not include afterward changes

Posted: Fri Jan 23, 2015 7:10 am
by MichielvM
That could be a solution. But my situation is a bit more complicated.
These maintenance windows occur every 1st fridaymorning of the month for group A1, fridayafternoon for group A2
1st Saturdaymorning of the month for group B1 and so on.

So 'recurring' is really the only way around this as I see it. And it works ok too, except for the this cosmetic mishap.

I guess this is a feature request. ;-)

Re: recurring downtime does not include afterward changes

Posted: Fri Jan 23, 2015 10:23 am
by scottwilkerson
This actually is how it works, with one caveat.

Once the schedule is created for a particular hostgroup, it will not re-add services until the next reoccurring schedule.

On the plus side, under normal circumstances, if the host is in downtime, service notifications are already suppressed

Re: recurring downtime does not include afterward changes

Posted: Thu Jan 29, 2015 12:05 pm
by MichielvM
I never thought of that. So if the host is in downtime, all service checks are ignored anyway???

Re: recurring downtime does not include afterward changes

Posted: Thu Jan 29, 2015 12:14 pm
by scottwilkerson
MichielvM wrote:I never thought of that. So if the host is in downtime, all service checks are ignored anyway???
The checks occur, but notifications are suppressed if the host in DOWN