Skip to content

flacoste/off-call

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Off-Call - PagerDuty Utilities

Collection of utilities to work with PagerDuty activities.

It include the following commands:

  • report - Generate report of PagerDuty activity for a specific time range.
  • incidents2xls - Export listing of incidents into XLS format.

Installation

$ bundle install

Configuration

The utilities are configured through environment variables. A file named .env is read to set environment variables when the command is run.

$ cp .env.sample .env
$ vi .env

The most important variables to set are:

  • PAGERDUTY_SUBDOMAIN The pagerduty.com subdomain to use as API endpoint.
  • PAGERDUTY_USER The username to use for authentication.
  • PAGERDUTY_PASSWORD The password to use for authentication.
  • SERVICES The services defined in PagerDuty to operate on.

report

Generate report of PagerDuty activity for a specific time range.

Usage:

$ bundle exec bin/report
Summary for PXXXXXX,PYYYYYY from 2012-05-16 12:00:00 +0000 to 2012-05-23 15:23:52 +0000
+-----------------+-------+
| Key             | Count |
+-----------------+-------+
| Test incident   | 1     |
+-----------------+-------+
...

$ SINCE="Last Week" UNTIL=Now bundle exec bin/report 
...

$ SERVICES=PXXXXXX,PYYYYYY bundle SINCE="Last Week" UNTIL=Now bundle exec bin/report
...report for specific services only...

incidents2csv

Usage:

$ bundle exec bin/incidents2xls
Found 12 matching incidents.

The file incidents.xls in the current direction will contain the exported XLS data.

About

PagerDuty Utilities

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%