Skip to main content

A real-time incident response and reporting tool

Project description

PyPI PyPI - Python Version PyPI - Django Version Travis (.org) GitHub

Response ⚡

Dealing with incidents can be stressful. On top of dealing with the issue at hand, responders are often responsible for handling comms, coordinating the efforts of other engineers, and reporting what happened after the fact. Monzo built Response to help reduce the pressure and cognitive burden on engineers during an incident, and to make it easy to create information rich reports for others to learn from.

The headline post when an incident is declared

If you're interested in how we use this tool at Monzo, there's an overview in this video.

Try it out

Response is a Django app which you can include in your project. If you're just looking to give it a try, follow the instuctions for the demo app!

Adding Response to your own project

Start a new Django project, if you don't have one already:

$ django-admin startproject myincidentresponse

Install response:

$ pip install django-incident-response

In, add these lines to INSTALLED_APPS:


Add the following to

USE_TZ = False # if this exists elsewhere in your, just update the value

STATIC_ROOT = "static"

# Django Rest Framework
    "PAGE_SIZE": 100,
    "DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.LimitOffsetPagination",

# Markdown Filter
    "a", "p", "code", "h1", "h2", "ul", "li", "strong", "em", "img",


    "width", "height", "border-color", "background-color", "white-space",
    "vertical-align", "text-align", "border-style", "border-width", "float",
    "margin", "margin-bottom", "margin-left", "margin-right", "margin-top",


In, add the following to urlpatterns (you may also need to import include):

urlpatterns = [
    path('slack/', include('response.slack.urls')),
    path('core/', include('response.core.urls')),
    path('', include('response.ui.urls')),

Completing the setup and config with Slack

1. Create a Slack App

  • Navigate to and click Create New App.

  • Give it a name, e.g. 'Response', and select the relevant workspace.

  • In the OAuth and Permissions page, scroll down to scopes.

  • Add the following scopes:

    • channels:history
    • channels:read
    • channels:write
    • reactions:write
    • chat:write:bot
    • chat:write:user
    • users:read
  • At the top of the page, the Install App to Workspace button is now available. Click it!

2. Update your

Base site address (SITE_URL)

Response needs to know where it is running in order to create links to the UI in Slack. Whilst running locally, you might want this set to something like http://localhost:8000.

OAuth Access Token (SLACK_TOKEN)

Response needs an OAuth access token to use the Slack API.

  • Copy the token that starts xoxp-... from the OAuth & Permissions section of your Slack App and use it to set the SLACK_TOKEN variable.

Note: Since some of the APIs commands we use require a user token, we only need the token starting with xoxp-.... If/when Slack allow these actions to be controlled by Bots, we can use the bot token, starting xoxb-....

Slack Client (SLACK_CLIENT)

Response needs a shared global instance of a Slack Client to talk to the Slack API. Typically this does not require any additional configuration.

from response.slack.client import SlackClient


Response uses the Slack signing secret to restrict access to public endpoints.

  • Copy the Signing secret from the Basic Information page and use it to set the SIGNING SECRET variable.


When an incident is declared, a 'headline' post is sent to a central channel.

See the demo app for an example of how to get the incident channel ID from the Slack API.


We want to invite the Bot to all Incident Channels, so need to know its ID.

3. Running the server

Before you can complete the Slack app setup, you need to have the app running somewhere that's accesible to to the internet. That means either deploying your Django project somewhere (see here or running it locally and exposing with something like ngrok.

For simplicity, we'll assume you're developing using ngrok.

First make sure your DB is fully migrated and up-to-date:

python3 migrate

Next, run the Django development server:

python3 runserver

Finally, run ngrok:

ngrok http 8000

Make note of the ngrok url as you'll need it in the following section as the public-url.

4. Complete the Slack App Setup

Head back to the Slack web UI and complete the configuration of your app, as described here.

5. Test it's working!

In Slack, start an incident with /incident Something's happened. You should see a post in your incidents channel!

  • Visit the incident doc by clicking the Doc link.
  • Create a comms channel by clicking the button.
  • In the comms channel check out the @incident commands. You can find the ones available by entering @incident help.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-incident-response, version 0.3.7
Filename, size File type Python version Upload date Hashes
Filename, size django-incident-response-0.3.7.tar.gz (534.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page