Giter Site home page Giter Site logo

rrrene / pagerbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stripe-contrib/pagerbot

0.0 3.0 0.0 762 KB

Manage Pagerduty on-call schedules from within your internal chat channels.

Home Page: https://stripe.com/blog/pagerbot

License: MIT License

pagerbot's Introduction

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 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:):

Plugin Example Notes
- help Short list of all commands pagerbot knows.
- manual Show 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 override put me on triage for 30 minutes Overrides the current schedule for a duration.
Schedule override put carl on primary from 3 AM until 4 AM August 24th
Call call sys because admin server is acting funky Send email to <teamname><email-suffix>, where email-suffix is set in admin.
Call person get andrew because we need to credential people Triggers an pagerduty issue for person.
Switch shift put amy on triage during carl's shift on August 11th Take over a single shift on a specific day.
Reload reload Load user and schedule changes from pagerduty.
Add Alias alias [email protected] as karl Add a new alias for person or schedule.

Local development

You will need ruby with bundle, as well as a running instance of mongodb running on port 27017.

Fork and clone this repository and open it in a console.

# running tests
rake test

# running the admin interface
bundle exec ruby lib/pagerbot.rb admin

# run irc bot locally (after setting up bot in admin)
bundle exec ruby lib/pagerbot.rb admin irc

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

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

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:

  • Log into heroku and navigate to your application.
  • If it's a slackbot: go to settings and remove DEPLOYED config variable.
  • If it's an irc bot: rescale your application to have 1 web worker and 0 irc workers.

Via command line:

  • If it's a slackbot: heroku config:set DEPLOYED=false
  • If it's an irc bot: heroku ps:scale web=1 irc=0

pagerbot's People

Contributors

macobo avatar

Watchers

René Föhring avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.