The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

api.pagerduty

Exports functions for interacting with PagerDuty API, and subscribing to alarm notices.

API Keys for Pagerduty are currently part of the on-disk configuration file for the bot, and as such there are no functions for adding/removing/changing oncall groups or adding new Pagerduty accounts without restarting the bot. This will likely change in a future release to make things easier for users to manage.

pagerduty-groups

Description

Displays the list of PagerDuty contact groups which currently have API keys configured.

pagerduty-oncall

Description

Displays on-call information for the named group, based on the current schedule in PagerDuty. All remaining arguments after the group name, if provided, will be echoed back.

Calls to the on-call scheduling API at Pagerduty are cached briefly (for a few minutes per oncall group) to prevent flooding their servers should anyone in the channel call this function repeatedly.

Usage

<group> [<message>]

Examples

    :emphasize-lines: 2-5

    (pagerduty-oncall netops "I can't get a route from bastion to staging, help!")
    PagerDuty On-Call for Network Operations:
    Primary: Bobby Jo <bobby@nowhere.tld>
    Secondary: Janey Sue <janey@nowhere.tld>
    <Beauford> I can't get a route from bastion to staging, help!