/pagerduty_oncall

How to determine who is on-call using Ruby and the PagerDuty API

Primary LanguageRuby

Purpose

Our team utilizes an IRC bot to execute a variety of functions but I found that it lacked a function to ask the PagerDuty API which engineer is on-call right now. I set out to figure out a way to answer this question.

Libraries

I'm no Ruby expert so when I asked three different developers for their library recommendations I was given three different answers.

Usage

  • Change the URL subdomain for your account
  • First argument: Your API key (I recommend generating a read-only API key)
  • Second argument: The ID of the appropriate service id.

Sample Output

On-Call Engineer: John Smith - john.smith@yourcompany.com - 1112223333

More Information