Download Alerts to CSV
A sample script to programatically access the PD alerts csv-page behind the login, via a single-session.
Alert Volume/Pain for On-Call Users
A quick command-line to get the incident volume assigned to an escalation policy broken down by week.
Get Incident Details
Given a valid date-range, output incident-details to CSV in the format: IncidentID,Created-At,Type,Agent/User,NotificationType,ChannelType,Summary
All the incidents in the given time range; here, one day.
A Ruby script to pull all the incidents from a service within a given time range and print the output to the file IncidentsInService.txt.
Get Recent Incidents https://gist.github.com/ryanhoskin/7777921
Get incidents from PagerDuty that have been queued up for several days.
Trigger incidents in multiple PagerDuty services.
Trigger/acknowledge/resolve PagerDuty incidents.
Snooze a PagerDuty incident
Incident Log Entries
Given a valid date-range, get the ILE 'lifecycle' for the following log-entry types: Trigger, Assign, Escalate, Notify, Repeat_Escalation_Path, Acknowledge, Unacknowledge, Resolve, Annotate. Output will be in CSV in the format: IncidentID,Created-At,Type,Agent/User,NotificationType,ChannelType,Notes
This retrieves the in-depth information about a specific log entry (for example, the body of an email).
Get a summary of all log entries for an incident.
Get the information about a specified log entry.
This gets log entries in the appropriate time zone.
Ruby script to get an individual schedule.
List All PagerDuty Schedules by Name
List On-Call Shifts for a PagerDuty Schedule
Update Settings on All PagerDuty Services
Update acknowledgement_timeout and auto_resolve_timeout parameters on all PagerDuty services http://jsfiddle.net/jorts/e6y93y6r/
Create Vacation Overrides
Given a user going on vacation, create overrides for another user, only using the times the vacationing user is on-call.
Schedule Recurring Maintenance Windows
Schedule a recurring regular maintenance window for a service or services.
Remove All Future Maintenance Windows
Removes all future maintenance windows for a service.
Get User Activity
Get the latest activity for all users within a PagerDuty account.
List PagerDuty Users who Don't Have a Minute 0 Phone Notification
List users who have a small # of Notification Rules
List On-Call Users
Import Users from CSV
Given a CSV-file called 'users.csv', in the format:
name,email,role,address,type Joe User,email@example.com,user,15555555555,phone Bob Dobbs,firstname.lastname@example.org,admin,15555555554,sms
Create each user, a default contact-method/immediate email notification-rule, as well as an additional immediate notification-rule.
Import Users from Active Directory
If you are looking for an integration with ADFS, use this guide: https://www.pagerduty.com/docs/guides/setup-adfs-sso-pagerduty/
If you would like a one-time import of users via AD, you can use this: https://gist.github.com/ryanhoskin/4544017
List PagerDuty Users with Contact Information
Add webhooks to every PagerDuty service
Replace Webhook URL on All PagerDuty Services
##License and Copyright Copyright (c) 2014, PagerDuty All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of [project] nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.