Skip to content

Posts the primary on call from a list of groups to a chat ops tool based on a scheduled xMatters event.

License

Notifications You must be signed in to change notification settings

skerns321/xm-labs-xMatters-Post-Daily-On-Call-to-Chat-Ops

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

xMatters Post Daily primary on-call from a list of groups to chat ops tool.

Posts the 1 to n number of on-call members from a list of groups to a chat ops tool based on a scheduled xMatters event.

Pre-Requisites

  • xMatters account - If you don't have one, get one!
  • Slack / Microsoft Teams / Webex Teams or your favourite chat ops tool.
  • This repository uses slack but can be swapped to any chat ops tool of your choice. xMatters already has prebuilt steps for Slack and Microsoft Teams. You can find steps for Webex Teams here.

Files

How it works

A scheduled xMatters event will triggers a Flow that posts to a chat ops tool. The Flow gets the on-call resources from a Pipe separated list of groups set as a constant. The Flow step creates a string containing the on-call resources for each group in the constant. This is posted as a message to a predefined chat-ops channel.

  • Supports all group member types (User, Devices, Groups, Dynamic Teams).
  • Inactive Users will be skipped and the next on call resource will be used instead.
  • Temporary absence will be observed.
  • Displays on call resources separated by each shift in a group.
  • Will get n number of nested groups and include in the on-call resources list.
  • Provides an input for the number of on call resources you would like to post to chat ops tool for each group.
  • Wait times and escalation types are included between each on call resource.
  • Nested groups with multiple shifts will have shift info included inline.
  • Can handle empty groups, empty shifts, and groups with no shifts.
  • Include (optionally) a users device in the chat ops message.

Sample On-Call Posted to Slack:



Parent: CAB Approvals Group

Nested Group: Admin Group

Nested Nested Group: ABCGroup

Basic Configuration Steps:

  1. Import the xMatters Workflow.
  2. Set xMatters Constant for Groups.
  3. Configure chat ops tool endpoint.
  4. Configure Flow.
  5. Create a scheduled xMatters event.

xMatters Configuration

Import the xMatters Workflow

  1. Download the ChatOpsWhosOnCallv4

  2. Follow instructions for Importing a Workflow

Set xMatters Constant for Groups

  1. Click Chat Ops Who's On-Call workflow, then go to Integration Builder tab.

  2. Click Edit Constants.

  3. Select Groups constant.

  4. Set the constant value with a pipe "|" delimited list of xMatters group names to get the primary on call from.

    Example: ESD_DevOps|ITSM Management|Admin Group



Configure Chat Ops Endpoint.

  1. Click Chat Ops Who's On-Call workflow, then go to Integration Builder tab.

  2. Click Edit Endpoints.

  3. Select Slack endpoint. Alternatively, create a new endpoint for different chat ops tool.

  4. Configure authentication.

Configure the Flow



  1. Click Chat Ops Who's On-Call workflow, then go to Flow tab.

  2. Click Chat Ops Who's On Call Flow.

  3. Configure the existing Slack Step:

    a. Double click on the Post to Channel Slack Step

    b. Set the Channel Name you would like to post to.



    c. Ensure message is set to Merge On-Call > onCall



    d. Set the Endpoint.

  4. Ensure Merge On-Call Step is configured.

    a. Double click on the Merge On-Call Step

    b. Set the Groups Input to the Groups Constant from the right.

    c. Set the number of levels of Escalations you would like to post to chat tool.

    d. Optional: Set the Device Names input.

     - Include a Pipe | separated list of xMatters device names. 
     - If left blank, devices will not be included.
     - The first device listed in _Device Names_ input, that is found for an on call member, will be included in the message for that member.
     - If a user does not have the first device, the integration will look for the seconds device and continue until all devices are exhausted.
     - To find the device names in your xMatters environment, go to your devices (under profile) and look at the different device names listed.
     - Includes support for Voice, SMS, and Email devices.
    

    The message will only include one device for each user.

    Example: Work Phone|Mobile Phone|On-Call SMS





Create a scheduled xMatters event.

  1. Go to Messaging tab.

  2. Select Chat Ops Who's on Call messaging form



  3. Click Schedule Message.

    • You will get a warning about no Recipients Selected. Go ahead and press Send.


  4. Set the Scheduled Message Name, Recurrence, Frequency, Start and End Date.



  • Keep in mind the time that you schedule the event will influence who is on call. The Flow will get who is on call at the time of the event. If your shift changes at 12am you will want to scheduled the event just After the shift change. Failing to do this will post who WAS on call not who IS on call now.

Once you have a scheduled message you will see a new section at the bottom of the messaging section as follows:



Troubleshooting

Get help using Flow designer

About

Posts the primary on call from a list of groups to a chat ops tool based on a scheduled xMatters event.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published