On-Call Rotations

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
tjtoml
Posts: 4
Joined: Fri Aug 09, 2024 11:23 am

On-Call Rotations

Post by tjtoml »

I am trying to set up on-call rotation time periods in XI. My org does on-call on an every other week basis.

I created an oncall.cfg file and placed it into the import directory based on https://assets.nagios.com/downloads/nag ... ation.html

Code: Select all

define timeperiod {
timeperiod_name            oncall_week1
alias                      Week 1 On-Call Rotation
2024-08-05 / 14            10:00-24:00
2024-08-06 / 14            00:00-24:00
2024-08-07 / 14            00:00-24:00
2024-08-08 / 14            00:00-24:00
2024-08-09 / 14            00:00-24:00
2024-08-10 / 14            00:00-24:00
2024-08-11 / 14            00:00-24:00
2024-08-12 / 14            00:00-10:00
}

define timeperiod {
timeperiod_name            oncall_week2
alias                      Week 2 On-Call Rotation
2024-08-12 / 14            10:00-24:00
2024-08-13 / 14            00:00-24:00
2024-08-14 / 14            00:00-24:00
2024-08-15 / 14            00:00-24:00
2024-08-16 / 14            00:00-24:00
2024-08-17 / 14            00:00-24:00
2024-08-18 / 14            00:00-24:00
2024-08-19 / 14            00:00-10:00
}
This resulted in a Time Period in the XI WUI as expected (both time periods are there, only one included for brevity):
nagios_sup_ss.png
Where I am getting stuck is applying this time period in the way that I want.
I was thinking I was going to be able to set my time period to oncall_week1 in my Account Settings->Notification Preferences->Time Periods but it looks like all I can do there is change the times of day I'm willing to accept notifications:
nagios_support_ss2.png

Obviously, this is limited; I need 24x7 notifications when I am on-call and 0x0 notifications when I am not.

I imagine that there are several ways to solve this problem - one way I thought of was to edit the time <<myusername>>_notification_times time period in the CCM to match the oncall_week1, but this is brittle and not-reusable; I will need to apply this same on-call rotation to other teams. What is the best way to go about this?

I'm assuming that the import worked properly and that the time period will function the way I want it to (i.e. On call swaps every-other-week on Monday at 10:00AM). If I have messed this up, or there is a more efficient way to do this, please let me know.

I just got my XI installation rolling yesterday and am very new at this, please cut me a little slack if this question has been asked before or covered elsewhere :)
You do not have the required permissions to view the files attached to this post.
User avatar
lgute
Posts: 321
Joined: Mon Apr 06, 2020 2:49 pm

Re: On-Call Rotations

Post by lgute »

Hi @tjtoml, thanks for reaching out.

This on-call rotations document might help.

The example given for alternating weeks on-call is as follows...

Code: Select all

define timeperiod {
    timeperiod_name             john-oncall
    2016-07-29 / 14 00:00-24:00 ; Every 14 days (two weeks), starting Sunday, July 29th, 2016
    2016-07-30 / 14 00:00-24:00 ; Every other Monday starting July 30th, 2016
    2016-07-31 / 14 00:00-24:00 ; Every other Tuesday starting July 31st, 2016
    2016-08-01 / 14 00:00-24:00 ; Every other Wednesday starting August 1st, 2016
    2016-08-02 / 14 00:00-24:00 ; Every other Thursday starting August 2nd, 2016
    2016-08-03 / 14 00:00-24:00 ; Every other Friday starting August 3rd, 2016
    2016-08-04 / 14 00:00-24:00 ; Every other Saturday starting August 4th, 2016
}
define timeperiod {
    timeperiod_name             bob-oncall
    2016-08-05 / 14 00:00-24:00 ; Every 14 days (two weeks), starting Sunday, August 5th, 2016
    2016-08-06 / 14 00:00-24:00 ; Every other Monday starting August 6th, 2016
    2016-08-07 / 14 00:00-24:00 ; Every other Tuesday starting August 7th, 2016
    2016-08-08 / 14 00:00-24:00 ; Every other Wednesday starting August 8th, 2016
    2016-08-09 / 14 00:00-24:00 ; Every other Thursday starting August 9th, 2016
    2016-08-10 / 14 00:00-24:00 ; Every other Friday starting August 10th, 2016
    2016-08-11 / 14 00:00-24:00 ; Every other Saturday starting August 11th, 2016
}
Plus you need to reference the appropriate timeperiod definition in the contact definitions for each user.
Please let us know if you have any other questions or concerns.

-Laura
tjtoml
Posts: 4
Joined: Fri Aug 09, 2024 11:23 am

Re: On-Call Rotations

Post by tjtoml »

Thanks for replying, @lgute.

I referenced the On Call rotations document in my original post. My question is more mechanical; what is the best way to apply this configuration to multiple users within the Nagios XI WUI?
User avatar
lgute
Posts: 321
Joined: Mon Apr 06, 2020 2:49 pm

Re: On-Call Rotations

Post by lgute »

Hi @tjtoml,

Sorry, I totally missed the document link you provided. This post may be helpful XI: host templates and inheritance.

If I understand how everything links together correctly, this may work:

WARNING: NOT TESTED.
  1. Assign the appropriate timeperiod to each "Contact" in "Core Config Manager | Alerting | Contacts | Click to edit a contact | Alert Settings tab | Host Notifications Timeperiod & Service Notifications Timeperiod".
  2. Assign all the contacts to a group like "xi_contactgroup_all". I don't think you have to have separate groups, because (at least in XI) you can't assign timeperiods to a group.
  3. Use "CCM | Tools | Bulk Modifications Tool" to assign the group to all hosts & services. It looks like you can also do this with templates.

    I am setting this up on a shortened rotation, to see if it works.

    Improving On-call Management
    I am going to create a enhancement request for on-call management features. This is an opportunity for you and other forum users to give your input.
    What would you like to see in on-call management?
    • The Time Periods Management page needs to allow Editing of existing time periods, a calendar to make it easier to setup the start dates & times and see what the current timeperiod includes, a list of what can be used to define timeperiods, view/add/change description of each "period" defined in a timeperiod.
    • To me it seems like it would be helpful to manage on-call by contactgroups, so in your case you would have a week1 & a week2 contactgroups. Then you could add/remove/move users between on-call groups/schedules, instead of at the contact level.
    Thoughts?
Please let us know if you have any other questions or concerns.

-Laura
tjtoml
Posts: 4
Joined: Fri Aug 09, 2024 11:23 am

Re: On-Call Rotations

Post by tjtoml »

I think that the enhancements you have listed would go a long way towards improving on-call setups. The ability to assign a timeperiod to a contactgroup would, from a functionality standpoint, meet all of my needs and would also align with how I was intuitively trying to accomplish this.

From a usability/UI standpoint the XI timeperiod page needs some work, in my opinion. In addition to the enhancements you've already mentioned:
  • The difference between "Time Definition" and "Time Range" is not immediately apparent based on the name.
  • The tooltip for "Time Definition" especially leaves much to be desired. It is not obvious that by modifying the definition you can create a schedule. (My first time through, without reading the documentation, I thought that the "Time Definition" field was just an arbitrary name for the "Time Range".)
  • A link/popup/tooltip/etc that includes the various options to the time definition field (with examples) would go a long way towards improving usability - this could be implemented without changing the underlying code, and would be a useful stopgap until a more complete enhancement can be integrated.
  • Adding a calendar widget that allows visually selecting a "Start Date" and "End Date" (with a checkbox indicating that there is no end date, but that the schedule should continue on into infinity) would also be a major improvement.

The ability to create a schedule based on the day of the month would also be useful - though it is not used in my org, I know on-call is done monthly in many places. I.e. have a definition like

Code: Select all

# First 15 days of each month
08/01/2024 % 15    00:00-24:00 # 24hrs a day from 08-01-2024 starting at 00:00 to 08-15-2024 ending at 23:59 
# the 16th of each month to the last day of each month
08/16/2024 % 1      00:00-24:00 # 24hrs a day from 08-16-2024 starting at 00:00 to 08-31-2024 ending at 23:59 
Taken together, that timeperiod would evaluate to 24x7 for the month of August and would repeat in subsequent months with the split being at the 15th day of each month. This would allow for true monthly setups, instead of 30-day rotations that would gradually drift away from being "monthly" due to differences in the lengths of each month. There may be a syntax in place that handles this that I have not internalized - I am not an expert :)
User avatar
lgute
Posts: 321
Joined: Mon Apr 06, 2020 2:49 pm

Re: On-Call Rotations

Post by lgute »

Hi @tjtoml,

Thank you for your suggestions. I appreciate the detail.

I am very visual and I like being able to manage a "thing" in one place. So I envision an On-call Management section of tabs or page(s), where you can easily view and manage all the things, with things like ...
  • UI that clearly walks users through what needs to be done and makes it easy to find where things need to be setup/changed.
  • Easily view who is on-call today, this week, this month, this quarter, etc, with filtering.
  • Modify who is on-call and setup holidays, vacations, rotations, etc.
  • Setup/adjust rotations.
  • View/modify exceptions due to other rules, holidays, downtime, host/service hostgroup/servicegroup, etc.
  • View which hosts/services send which contacts/contactgroups notifications (e.g., operators, db admins, network admins, server admins, developers), etc.
Please let us know if you have any other questions or concerns.

-Laura
Post Reply