Skip to content

whilp/pdalerts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/

About

Visualize your Pagerduty alerts

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages