This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Ruby script to create overrides in PagerDuty. | |
# | |
# Copyright (c) 2011, PagerDuty, Inc. <[email protected]> | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Nagios plugin that sends Nagios events to PagerDuty. | |
# | |
# Copyright (c) 2011, PagerDuty, Inc. <[email protected]> | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is a quick instructions on how to setup the Python command line tool for PagerDuty. | |
1) You'll need to have Python installed (tested with Python 2.6.1) | |
2) Verify if Python setuptools are installed | |
python -c "import setuptools;print 'OK';" | |
if you don't see output "OK", then setuptools are not installed. | |
To install setuptools, download setuptools (http://pypi.python.org/pypi/setuptools/) appropriate to your Python major version. ("python --version" to get the version number). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Nagios plugin that sends Nagios events to PagerDuty. | |
# | |
# Copyright (c) 2011, PagerDuty, Inc. <[email protected]> | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# | |
# How to use this script: | |
# | |
# 1) You'll need to have Ruby installed on your machine. | |
# Follow these instructions to install Ruby on your machine: https://docs.google.com/document/pub?id=1Eo3f77CC1Flkb2f71ro-NZCYK2VuA6ajxvcuTGG_c6Q | |
# | |
# 2) Once Ruby is installed, run the following from your command prompt: | |
# gem install faraday --no-ri --no-rdoc | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: Download cURL with SSL support from here: http://www.paehl.com/open_source/?CURL_7.28.0: | |
:: Extract curl.exe in the same directory as this bat file | |
:: Usage: pagerduty.bat service_key event_type description incident_key | |
:: event_types = (trigger | acknowledge | resolve) | |
:: | |
set service_key=%1 | |
set service_key=%service_key:"=\"% | |
set event_type=%2 | |
set event_type=%event_type:"=\"% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Ruby script to mirror an email incident as an API incident | |
# | |
# Copyright (c) 2011, PagerDuty, Inc. <[email protected]> | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Ruby script to create recurring maintenance windows in PagerDuty | |
# | |
# Copyright (c) 2012, PagerDuty, Inc. <[email protected]> | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'faraday' | |
require 'json' | |
require 'csv' | |
class PagerDutyAgent | |
attr_reader :requester_id | |
attr_reader :token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module ActiveDirectory | |
#Import users via the PD API, echo results | |
function POST_Request ($url,$parameters, $api_key) { | |
$http_request = New-Object -ComObject Msxml2.XMLHTTP | |
$http_request.open('POST', $url, $false) | |
$http_request.setRequestHeader("Content-type", "application/json") | |
$token = "Token token=" + $api_key | |
$http_request.setRequestHeader("Authorization", $token) | |
$http_request.setRequestHeader("Content-length", $parameters.length) |
OlderNewer