Home

Awesome

PagerBot Deploy Build Status

Pagerbot is a bot that makes managing PagerDuty on-call schedules easier. It currently supports IRC and Slack, and can be easily deployed to Heroku.

Pagerbot uses Chronic for natural language date and time parsing.

Sample

ScreenShot

Usage

The easiest way to get started is to use the Heroku button above to launch an admin interface for pagerbot, where you need to fill out a few API keys and choose commands (plugins) that pagerbot knows about and responds to.

Going through the admin page shouldn't take much longer than 8 minutes. The admin page also contains detailed information on how to make the bot join your channel.

To start up the admin interface again, rescale the dynos to have a single web worker and remove the DEPLOYED config variable in heroku dashboard.

Plugins

Currently pagerbot supports the following commands (prefix all of them with bot name and a colon, e.g. pagerbot:):

PluginExampleNotes
-helpShort list of all commands pagerbot knows.
-manualShow in-depth explanation about each command.
-who is on primary now?Find out who is on a specific schedule at time.
-when am I on product?Find out who is on a specific schedule at time.
Schedule overrideput me on triage for 30 minutesOverrides the current schedule for a duration.
Schedule overrideput carl on primary from 3 AM until 4 AM August 24th
Callcall sys because admin server is acting funkySend email to <teamname><email-suffix>, where email-suffix is set in admin.
Call personget andrew because we need to credential peopleTriggers an pagerduty issue for person.
Switch shiftput amy on triage during carl's shift on August 11thTake over a single shift on a specific day.
ReloadreloadLoad user and schedule changes from pagerduty.
Add Aliasalias karl@mycompany.com as karlAdd a new alias for person or schedule.

Local development

Easiest way to run pagerbot locally is via docker and docker-compose.

# Running tests
docker-compose run pagerbot rake test

# Opening the admin interface to configure the bot. Accessible via `localhost:4567`
# The interface will auto-reload on file changes (though html/javascript may be cached).
docker-compose up --build pagerbot-admin

# Run the bot itself locally
docker-compose up --build pagerbot

Deploying via heroku

To deploy it to heroku, git clone, create a heroku app and push to launch it.

heroku create
heroku addons:add mongolab:sandbox
heroku addons:add papertrail
git push heroku master

For developing new capabilities, PagerDuty has two different APIs:

FAQ

Heroku is asking for my credit card! Do I need to pay for this?

No, running your own pagerbot is free! This is a requirement of the free MongoDB add-on. See the verification policy of Heroku.

How can I secure the admin interface?

Set the enviroment variable called PROTECT_ADMIN to be your desired password. Instructions for changing an enviroment variable are listed in the next FAQ.

When using the admin interface, enter the same password, the username can be arbitrary.

How can I relaunch the admin interface?

Via web:

Via command line: