
pager 2.0.3
by Serious Business
Interact with PagerDuty services, schedules, and incidents with Abbot.
README
The pager
skill is inspired by the Hubot Pager skill. Use it to trigger incidents assigned to specific users, the current on-call user, etc.
Configuration
This skill requires the following secrets to be configured:
pagerduty-api-key
- The PagerDuty API Key for your PagerDuty account.
To create an API Key, log into your PagerDuty account, select Integrations and then Api Access Keys under the Developer Tools column heading.
For more information about PagerDuty API Keys, see the PagerDuty docs for generating an API Key to learn how to do this.
Mapping your user to PagerDuty
The pager
skill will attempt to map your chat user to a PagerDuty user via email. To see if Abbot already knows your email (obtained from your chat platform), @abbot my email
. To set your global Abbot email, @abbot my email is {email}
. To set an email address just for the pager
skill, @abbot pager me as {email}
.
Examples
With that mapping in place, a chat user can be paged like so:
@paul> @abbot pager trigger @haacked hey, the site is down
@abbot> :pager: triggered! Incident #8 assigned to @haacked
Or trigger an incident assigned to an escalation policy:
@haacked> @abbot pager trigger ops hey, the site is down
@abbot> :pager: triggered! Incident #8 assigned to ops!
Check on open incidents:
@haacked> @abbot pager sup
@abbot> Triggered:
----------
8: 2014-11-05T20:17:50Z site is down - assigned to haacked
Acknowledged:
-------------
7: 2014-11-05T20:16:29Z omgwtfbbq - assigned to haacked
Acknowledge triggered incidents assigned to you:
@haacked> @abbot pager ack
@abbot> Incident 7,8 acknowledged
Or acknowledge specific incidents:
@haacked> @abbot pager ack 8
@abbot> Incident 8 acknowledged
Resolve acknowledged alerts assigned to you:
@haacked> @abbot pager resolve
@abbot> Incident 7,8 resorved
Feedback
If you have feedback on this skill, submit an issue here or, better yet, a pull request to this file!
Usage
Configuration
@abbot pager me as {email}
- to set your PagerDuty email if it's different from your chat email. Note that @abbot my email is {email}
sets your chat email if it's currently unknown.
@abbot pager bot is {email}
- to set the email address for your PagerDuty bot account.
@abbot pager subdomain is {subdomain}
- to set your PagerDuty's account subdomain. Only specify the subdomain part of the URL.
@abbot pager service is {service-id}
- If your PagerDuty account has more than one service, you can specify which service to use for incidents for the current room. If your PagerDuty account has one service, this isn't needed.
Usage
@abbot pager acknowledge
- Acknowledge triggered alerts assigned to you. Alternative usage: @abbot pager ack
@abbot pager acknowledge!
- Acknowledge all triggered not just yours. Alternative usage: @abbot pager ack!
@abbot pager acknowledge {incident1-number} {incident2-number} ... {incidentN-number}
- Acknowledge all specified incidents.
@abbot pager trigger @{user} {message}
- Triggers the pager and assigns it to the specified user. Alternative usage @abbot pager page @{user} {message}
.
Example: @abbot pager trigger @paul did you drop the database again?
@abbot pager trigger {policy} {message}
- Trigger an incident assigned to an escalation policy. Alternative usage: @abbot pager page {policy} {message}
Example: @abbot pager trigger ops the site is down
.
@abbot pager incidents
- List open incidents and their status. Alternative usage: @abbot pager sup
@abbot pager note {incident-number} {content}
- Adds a note to the specified incident.
@abbot pager notes {incident-number}
- Shows notes for the specified incident.
@abbot pager resolve
- Resolve acknowledged incidents assigned to you. Alternative usage: @abbot pager res
@abbot pager resolve!
- Resolve all acknowledged incidents, not just yours. Alternative usage: @abbot pager res!
@abbot pager resolve {incident1-number} {incident2-number} ... {incidentN-number}
- Resolve all specified incidents.
@abbot pager schedules
- Check up coming schedule, and schedule shift overrides on it.
@abbot pager services
- Lists the set of services associated with your PagerDuty account.
Code
Version History
Version | Created | Author | Release Notes | Installs |
---|---|---|---|---|
2.0.3 | 10/28/2021 |
![]() |
More handling of null edge cases |
1 |
2.0.2 | 10/28/2021 |
![]() |
Added better error handling around pager duty API errors. |
0 |
2.0.1 | 10/22/2021 |
![]() |
Fixed the command to set the PagerDuty bot email address. |
0 |
2.0.0 | 9/18/2021 |
![]() |
Saving the PagerDuty service Id is per-room. Previous versions of this skill used the room-name as a key to save these values. However, room names can change. Now it uses the room Id if available, otherwise it uses the room name. |
0 |
1.0.0 | 7/22/2021 |
![]() |
Initial release! ✨ |
3 |
Details
- Last updated
- Installs
- 4 total installs
- Language
- CSharp
- License
- MIT License