Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.15 KB

README.org

File metadata and controls

40 lines (28 loc) · 1.15 KB

how bad is it?

Tools to visualize your pagerduty alert activity.

Get your data

First, install some dependencies in a virtualenv (or using your preferred method).

virtualenv .
./bin/pip install -r requirements.txt

Then, set some environment variables with your pagerduty API, credentials, and preferred timezone.

export PAGERDUTY_SUBDOMAIN=example
export PAGERDUTY_USER=you@example.com
export PAGERDUTY_PASS=yourpassword
export TZ=America/Chicago

scrape.py takes a two or more arguments. The first two define the date range you’re interested in (note that the pagerduty API only supports requests for ranges less than 30 days).

./bin/python ./scrape.py 2012-09-01 2012-09-10 > data.csv

Any subsequent arguments will act as a filter, limiting the output to only rows with a user email in the list.

./bin/python ./scrape.py 2012-09-01 2012-09-10 alice@example.com bob@example.com > data.csv

You can now serve the data file and other static assets locally (or deploy them to a web server):

./bin/python -mSimpleHTTPServer
open http://localhost:8000/