Admins often have to shoulder the burden of answering pagers, cell phone calls, etc. when they least desire them. No one likes to be woken up at 4 am to fix a problem. But it's often better to fix the problem in the middle of the night, rather than face the wrath of an unhappy boss when you stroll in the next morning.
For those lucky admins who have a team of gurus who can help share the responsibility of answering alerts, on-call rotations are often setup. Multiple admins will often alternate taking notifications on weekends, weeknights, holidays, etc.
We’ll show you how you can create time period definitions in a way that can facilitate most on-call notification rotations. These definitions won’t handle human issues that will inevitably crop up, but they will allow you to setup a basic structure that should work the majority of the time.
Two admins – John and Bob – are responsible for responding to blësk alerts. John receives all notifications for weekdays (with 24 hour days), excluding holidays; Bob handles notifications during the weekends and holidays. Lucky Bob. Here’s how you can define this type of rotation using time periods…
1. First, define 3 time periods that contains time ranges for holidays, weekdays, and weekends:
define timeperiod{
name weekdays
timeperiod_name weekdays
monday 00:00-24:00
tuesday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
friday 00:00-24:00
}
define timeperiod{
name weekends
timeperiod_name weekends
saturday 00:00-24:00
sunday 00:00-24:00
}
define timeperiod{
name holidays
timeperiod_name holidays
january 1 00:00-24:00 ; New Year's Day
2008-03-23 00:00-24:00 ; Easter (2008)
2009-04-12 00:00-24:00 ; Easter (2009)
monday -1 may 00:00-24:00 ; Memorial Day (Last Monday in May)
july 4 00:00-24:00 ; Independence Day
monday 1 september 00:00-24:00 ; Labor Day (1st Monday in September)
thursday 4 november 00:00-24:00 ; Thanksgiving (4th Thursday in November)
december 25 00:00-24:00 ; Christmas
december 31 17:00-24:00 ; New Year's Eve (5pm onwards)
}
2. Next, define a time period for John’s on-call times that include weekdays, but excludes the dates/times defined in the holidays time period above:
define timeperiod{
timeperiod_name john-oncall
use weekdays ; Include weekdays
exclude holidays ; Exclude holiday dates/times
}
3. You can now reference this time period in John’s contact definition:
4. Define a new time period for Bob’s on-call times that include weekends and the dates/times defined in the holidays time period above:
define timeperiod{
timeperiod_name bob-oncall
use weekends,holidays ; Include weekend and holiday
}
5. You can now reference this time period in Bob’s contact definition:
In this scenario, John and Bob's alternate handling alerts every other day – regardless of whether it's a weekend, weekday, or holiday.
1. Define a time period for when John should receive notifications. Assuming today’s date is August 1st, 2017 and John is handling notifications starting today, the definition would look like this:
define timeperiod{
timeperiod_name john-oncall
2017-08-01 / 2 00:00-24:00 ; Every two days, starting August 1st, 2017
}
2. Now define a time period for when Bob should receive notifications. Bob gets notifications on the days that John doesn’t, so his first on-call day starts tomorrow (August 2nd, 2017).
define timeperiod{
timeperiod_name bob-oncall
2017-08-02 / 2 00:00-24:00 ; Every two days, starting August 2nd, 2017
}
3. Now you need to reference these timeperiod definitions in the contact definitions for John and Bob:
⇣
In this scenario, John and Bob's alternate handling alerts every other week. John handles alerts Sunday through Saturday one week, and Bob handles alerts for the following seven days. This continues in perpetuity.
1. Define a time period for when John should receive notifications. Assuming today’s date is Sunday, July 29th, 2017, and John is handling notifications this week (starting today), the definition would look like this:
define timeperiod{
timeperiod_name john-oncall
2017-07-29 / 14 00:00-24:00 ; Every 14 days, starting Sunday, July 29th, 2017
2017-07-30 / 14 00:00-24:00 ; Every other Monday starting July 30th, 2017
2017-07-31 / 14 00:00-24:00 ; Every other Tuesday starting July 31st, 2017
2017-08-01 / 14 00:00-24:00 ; Every other Wednesday starting August 1st, 2017
2017-08-02 / 14 00:00-24:00 ; Every other Thursday starting August 2nd, 2017
2017-08-03 / 14 00:00-24:00 ; Every other Friday starting August 3rd, 2017
2017-08-04 / 14 00:00-24:00 ; Every other Saturday starting August 4th, 2017
}
2. Now define a time period for when Bob should receive notifications. Bob gets notifications on the weeks that John doesn’t, so his first on-call day starts next Sunday (August 5th, 2017).
define timeperiod{
timeperiod_name bob-oncall
2017-08-05 / 14 00:00-24:00 ; Every 14 days, starting Sunday, August 5th, 2017
2017-08-06 / 14 00:00-24:00 ; Every other Monday starting August 6th, 2017
2017-08-07 / 14 00:00-24:00 ; Every other Tuesday starting August 7th, 2017
2017-08-08 / 14 00:00-24:00 ; Every other Wednesday starting August 8th, 2017
2017-08-09 / 14 00:00-24:00 ; Every other Thursday starting August 9th, 2017
2017-08-10 / 14 00:00-24:00 ; Every other Friday starting August 10th, 2017
2017-08-11 / 14 00:00-24:00 ; Every other Saturday starting August 11th, 2017
}
3. Now you need to reference these time period definitions in the contact definitions for John and Bob:
⇣
In this scenario, John handles notifications for all days except those he has off. He has several standing days off each month, as well as some planned vacations. Bob handles notifications when John is on vacation or out of the office.
1. First, define a time period that contains time ranges for John’s vacation days and days off:
define timeperiod{
name john-out-of-office
timeperiod_name john-out-of-office
day 15 00:00-24:00 ; 15th day of each month
day -1 00:00-24:00 ; Last day of each month (28th, 29th, 30th, or 31st)
day -2 00:00-24:00 ; 2nd to last day of each month (27th, 28th, 29th, or 30th)
january 2 00:00-24:00 ; January 2nd each year
june 1 - july 5 00:00-24:00 ; Yearly camping trip (June 1st - July 5th)
2017-11-01 - 2017-11-10 00:00-24:00 ; Vacation to the US Virgin Islands (November 1st-10th, 2017)
}
2. Next, define a time period for John’s on-call times that excludes the dates/times defined in the time period above:
define timeperiod{
timeperiod_name john-oncall
monday 00:00-24:00
tuesday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
friday 00:00-24:00
exclude john-out-of-office ; Exclude dates/times John is out
}
3. You can now reference this time period in John’s contact definition:
4. Define a new time period for Bob’s on-call times that include the dates/times that John is out of the office:
define timeperiod{
timeperod_name bob-oncall
use john-out-of-office ; Include holiday date/times that John is out
}