RigD.io Collaborative Automation for Incident Management

How to Open PagerDuty Incidents from Slack

SlackOps for PagerDuty Part 1

6 min readAug 26, 2019

--

This is the first of a series we will be doing to help you master your incident management process. If you have not read PagerDuty’s incident response documentation, I recommend you give it a read. Each installment of our series will generally follow how to operationalize, within Slack, one of the aspects of that documentation.

One last matter before we dive in. You might be wondering why you should worry about improving your incident management process or you know you want to, but just don’t think you can afford the time. Most simple tasks around incident management can be done in 25–45 seconds so there isn’t a whole lot to be gained right? Well let’s take for example our focus task for this installment “Open an incident?” This simple task can generally be done using the PagerDuty UI in about 36 seconds. With RigD we can get that right from Slack in 10–16 seconds.

Then consider that a Rand Group report calculated the cost per minute of downtime for an enterprise at $5,600, and according to this PagerDuty Article companies have 7 major incidents per month. If you have to check on call just once during those incidents then you’ve cost your company $23,520. Not the kind of thing you want on your performance review right? So follow along with this guide and in about 10 minutes you be able to set up collaborative automation to cut that cost cut those costs to just $6,533. It also goes as a given that getting your customers back up and running faster will help your company brand, a huge value on top of the cost savings.

Step 1 Let’s Get Connected

First if you haven’t installed the RigD Slack App go ahead and do it. You can add it from the Slack app directory by searching for RigD or numerous places on our website. There is no credit card or sign up needed, just a quick review and acceptance of our terms.

Find us in the Slack App Directory

Next you will need to connect your PagerDuty account. You can do this in Slack by sending a message to the RigD app

add rigd tool

Then choose PagerDuty from the list of available tools to connect.

Add a PagerDuty Tool

We use the PagerDuty OAuth2 authentication scheme, so you don’t have to provide any credentials to RigD. However, in order for that connection to work you are going to want to log into your PagerDuty account via the PagerDuty web UI first. Once you are done with that click the Connect PagerDuty button in Slack and a webpage will come up asking you to authorize RigD to access your PagerDuty account.

Authorize OAuth2 Connection

Once you authorize, we do a little behind the scenes back and forth with PagerDuty via API, and then you will get a message back in Slack that confirms the connection is set up.

Step 2 Open for business

With RigD installed and your PagerDuty account connected it’s time to open an incident. To do this we will send a message to the RigD App,

create pagerduty incident

When prompted simply provide the name of the service to open the incident in and then add a title.

Create PagerDuty Incident in Slack

Once your incident is opened you will see the details in Slack and have to opportunity to take just about any action imaginable to progress that incident.

You might be wondering why the screenshot has Suggestions. Good observation, RigD provides suggestions for specific inputs once you have used an input before. The suggestions will either be your last value for the input, or a commonly used value as determined by our machine learning system.

Step 3 Automate It

Now that you know how to open an incident lets simplify and speed up the task. To do this we are going to create what we call a flow. It’s going to be a simple flow that does one thing, facilitates opening an incident for a specific service. Then we are going to create an alias which allows you to run the flow with some letters or words of your choosing. To start send a message to RigD,

create flow

Then provide a name and optionally a description of your choosing.

Create a RigD Flow

After that the flow will be created and you will be able to start adding steps to it. Click the add step button to get started and then choose add activity. Once the dialog comes up in the Activity field you can start typing Create PagerDuty Incident

Once you confirm that activity you can click Add.

Include Create Pagerduty Incident Step

The other options are for somewhat more advance flow capabilities that you will want to explore further another day. With the activity now added to the flow let’s set the inputs for that activity, by clicking the Set Inputs button.

Choose your Activity Inputs

In this dialog set the first field to run. What’s the difference between run and prompt? Another great question. Remember when I mentioned suggestions above. Well if you set this field to prompt then when the flow runs you will be prompted to enter each input. Choosing run, on the other hand will skip prompting. In our case we are going to choose run then enter the name of the service to open the incident for in the second field. We will skip the title hear as we except users to add a unique title during incident creation. Click Save to move on to the final step.

This final step is to add what we call a trigger. A trigger is something that can cause a flow to be run. We have a few types available as you will see. But before we get to that list, say no when asked about running the flow in a thread.

Add an Alias to Trigger the Flow

Slack threads are very useful, but not for what we are doing. Then select alias from the trigger type options. In the dialog add the text you want to use to trigger the flow to run. I recommend using something easy to remember. Alias can be incredibly helpful, but only if you remember how to use them. Speaking of using them, note that an alias must be initiated starting with an ! then the text you chose. This help us avoid accidentally running something based on random chitchat.

Pick the Alias Text

So we have the open incident flow created and have set an alias for speedy and simple execution. Let’s give it a try and even better have someone else try to see how intuitive your alias and the Slack based interaction is. We call it collaborative automation.

Run the Flow by Typing Just a Few Letters

I hope this has proved to be helpful and inspires you to do more to simplify and accelerate your incident management process with RigD. Keep an eye out for additional parts coming soon, including part 2 which covers who to get PagerDuty on call details in Slack.

--

--

Father of two amazing boys and founder of https://rigd.io. DevOps, Golf, and Sailing enthusiast.