Page 1 of 1

[solved] Time period missing on a rotation setup

Posted: Mon Oct 07, 2019 9:20 am
by avezinaATetl
Hi all,

I have those four timeperiods configured for a bi-weekly rotation within nagios. Only problem is that the monday 8-24 time is missing from my final time periods (UrgentA, UrgentB) (as you can see in the screenshot attached)

The final result I'm looking for is :
Team A, on call for two weeks, starting the monday at 8 AM
Team B, on call for the two other weeks, starting the monday at 8 AM.

Code: Select all

# PS: "Semaine" is french for Week 
define timeperiod {
	timeperiod_name                	Semaine1
	alias                          	Semaine 1
	name                           	Semaine1
	register                       	0
	2019-09-09 / 28                	00:00-07:59
	2019-09-08 / 28                	00:00-24:00
	2019-09-07 / 28                	00:00-24:00
	2019-09-06 / 28                	00:00-24:00
	2019-09-05 / 28                	00:00-24:00
	2019-09-04 / 28                	00:00-24:00
	2019-09-03 / 28                	00:00-24:00
	2019-09-02 / 28                	08:00-24:00
}	

define timeperiod {
	timeperiod_name                	Semaine2
	alias                          	Semaine 2
	name                           	Semaine2
	register                       	0
	2019-09-16 / 28                	00:00-07:59
	2019-09-15 / 28                	00:00-24:00
	2019-09-14 / 28                	00:00-24:00
	2019-09-13 / 28                	00:00-24:00
	2019-09-12 / 28                	00:00-24:00
	2019-09-11 / 28                	00:00-24:00
	2019-09-10 / 28                	00:00-24:00
	2019-09-09 / 28                	08:00-24:00
}	

define timeperiod {
	timeperiod_name                	Semaine3
	alias                          	Semaine 3
	name                           	Semaine3
	register                       	0
	2019-09-23 / 28                	00:00-07:59
	2019-09-22 / 28                	00:00-24:00
	2019-09-21 / 28                	00:00-24:00
	2019-09-20 / 28                	00:00-24:00
	2019-09-19 / 28                	00:00-24:00
	2019-09-17 / 28                	00:00-24:00
	2019-09-18 / 28                	00:00-24:00
	2019-09-16 / 28                	08:00-24:00
}	

define timeperiod {
	timeperiod_name                	Semaine4
	alias                          	Semaine 4
	name                           	Semaine4
	register                       	0
	2019-09-28 / 28                	00:00-24:00
	2019-09-27 / 28                	00:00-24:00
	2019-09-26 / 28                	00:00-24:00
	2019-09-25 / 28                	00:00-24:00
	2019-09-24 / 28                	00:00-24:00
	2019-09-23 / 28                	08:00-24:00
	2019-09-02 / 28                	00:00-07:59
	2019-09-01 / 28                	00:00-24:00
}	
define timeperiod {
	timeperiod_name                	UrgentA
	alias                          	Urgent A
	use                            	Semaine3,Semaine4
	register                       	1
}	

define timeperiod {
	timeperiod_name                	UrgentB
	alias                          	Urgent B
	use                            	Semaine1,Semaine2
	register                       	1
}	

Re: Time period missing on a rotation setup

Posted: Mon Oct 07, 2019 10:44 am
by scottwilkerson
Timeperiod Semaine3 & Semaine4 get combined into UrgentA, and both of them have periods for 2019-09-23 / 28
Semaine3

Code: Select all

   2019-09-23 / 28                   00:00-07:59
Semaine4

Code: Select all

   2019-09-23 / 28                   08:00-24:00
You cannot have 2 matching time-periods, so it would be best to set one to 00:00-24:00 and remove the other

Re: Time period missing on a rotation setup

Posted: Mon Oct 07, 2019 1:12 pm
by avezinaATetl
So the day I want to have Semaine2 & 3 associated to UrgentA (1 & 4 to UrgentB), I'll need to change the time definition? That's a bit sad.

Thanks for the quick reply.

Re: Time period missing on a rotation setup

Posted: Mon Oct 07, 2019 2:35 pm
by scottwilkerson
It is Semaine3 & Semaine4 that have the overlap
scottwilkerson wrote:Timeperiod Semaine3 & Semaine4 get combined into UrgentA, and both of them have periods for 2019-09-23 / 28
Semaine3

Code: Select all

   2019-09-23 / 28                   00:00-07:59
Semaine4

Code: Select all

   2019-09-23 / 28                   08:00-24:00
You cannot have 2 matching time-periods, so it would be best to set one to 00:00-24:00 and remove the other