[solved] Time period missing on a rotation setup

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
avezinaATetl
Posts: 7
Joined: Mon Nov 26, 2018 11:46 am

[solved] Time period missing on a rotation setup

Post 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
}	
Attachments
firefox_2019-10-07_10-19-46.png
Last edited by avezinaATetl on Wed Oct 09, 2019 4:22 pm, edited 1 time in total.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Time period missing on a rotation setup

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
avezinaATetl
Posts: 7
Joined: Mon Nov 26, 2018 11:46 am

Re: Time period missing on a rotation setup

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Time period missing on a rotation setup

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked