pager-hours

command module
v0.0.0-...-a8e72b8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 13 Imported by: 0

README

pager-hours

For a given escalation policy, this tool exports:

  • for the main schedule, how many hours each user was on call
  • for services using that escalation policy primarly, how many incidents each user received (see known issues)
  • exports this data to google drive

If you want to compensate on call duty, you often need to track hours on call during the weekday outside office hours, weekends and holidays. This tool helps with that.

Usage

  • go install ./... to install
  • Add an API client in pagerduty

Sum via Google Spreadsheet

    =QUERY('2013-05'!A:F, "select B, E, sum(F) group by B, E")

Known issues

This tool has a lot of limitations and assumptions.

  • PagerDuty has no concept of "Location" for a user beside their time zone, therefor we map a pagerduty timezone to a office location (see holidays.Region)

  • This list is still hardcoded in init() like this:

      officeTZ = map[string]holidays.Region{
        "Berlin": holidays.Berlin,
        "Sofia": holidays.Bulgaria,
        "Pacific Time (US & Canada)": holidays.California,
      }
    
  • The underlying libraries (holidays and pagerduty) are very limited and only support what we're using here

  • Therefor generalizing this tool makes only sense after supporting more regions in the holidays library.

  • The incident count reflects how many incidents a user received and ignoring whether the incident was escalated and actually handled by someone else.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL