Skip to content

Instantly share code, notes, and snippets.

Luke Epp lfepp

Block or report user

Report or block lfepp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lfepp
lfepp / recurring_maintenance_windows.py
Last active Jul 1, 2019
Script to create a number of recurring maintenance windows in PagerDuty
View recurring_maintenance_windows.py
#!/usr/bin/env python
#
# Copyright (c) 2016, PagerDuty, Inc. <info@pagerduty.com>
# 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
@lfepp
lfepp / pd_maintenance_windows_v2.rb
Created Jun 21, 2016
Create recurring maintenance windows
View pd_maintenance_windows_v2.rb
#!/usr/bin/env ruby
# Ruby script to create recurring maintenance windows in PagerDuty
#
# Copyright (c) 2012, PagerDuty, Inc. <info@pagerduty.com>
# 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
@lfepp
lfepp / get_incident_details_csv.py
Last active Mar 15, 2019
Output PagerDuty incident details to a CSV
View get_incident_details_csv.py
#!/usr/bin/env python
#
# Copyright (c) 2016, PagerDuty, Inc. <info@pagerduty.com>
# 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
@lfepp
lfepp / get_schedule.rb
Created Jun 2, 2016
Script to retrieve information about a specific PagerDuty schedule
View get_schedule.rb
#!/usr/bin/env ruby
#
# Copyright (c) 2016, PagerDuty, Inc. <info@pagerduty.com>
# 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
@lfepp
lfepp / import_users.rb
Last active Oct 9, 2018
A simple Ruby script to import users into PagerDuty from a CSV file
View import_users.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'faraday'
require 'json'
require 'csv'
require 'optparse'
class PagerDutyAgent
attr_reader :token
View get_incident_details_with_body.py
#!/usr/bin/env python
import requests
import json
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
# Your PagerDuty API key. A read-only key will work for this.
api_key = 'ENTER_YOUR_API_KEY'
View pagerduty_ruby_httparty.rb
#!/usr/bin/env ruby
require 'pp'
require 'httparty'
# Class to GET or POST to the PagerDuty REST API
class PagerDuty
include HTTParty
format :json
def initialize(api_token)
@lfepp
lfepp / get_incidents_csv.py
Created May 25, 2016
Sample script to output all PagerDuty incidents for a given time period to a CSV file (defaults to previous 24 hours)
View get_incidents_csv.py
#!/usr/bin/env python
#
# Copyright (c) 2016, PagerDuty, Inc. <info@pagerduty.com>
# 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
@lfepp
lfepp / import_users_from_ad.ps1
Last active Nov 9, 2016
Script to import users from Active Directory into PagerDuty
View import_users_from_ad.ps1
# Copyright (c) 2016, PagerDuty, Inc. <info@pagerduty.com>
# 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.
@lfepp
lfepp / remove_future_maintenance_windows.py
Last active Jul 1, 2016
Script to remove all future maintenance windows from your PagerDuty account or your PagerDuty services
View remove_future_maintenance_windows.py
#!/usr/bin/env python
#
# Copyright (c) 2016, PagerDuty, Inc. <info@pagerduty.com>
# 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
You can’t perform that action at this time.