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 python | |
import requests | |
import sys | |
import json | |
import time | |
from datetime import date, timedelta | |
#Your PagerDuty API key. A read-only key will work for this. | |
AUTH_TOKEN = 'YOUR_API_KEY' |
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
define contact { | |
contact_name pagerduty | |
alias PagerDuty Pseudo-Contact | |
service_notification_period 24x7 | |
host_notification_period 24x7 | |
service_notification_options w,u,c,r | |
host_notification_options d,r | |
service_notification_commands notify-service-by-pagerduty | |
host_notification_commands notify-host-by-pagerduty | |
pager 1ebf75f79c8d495ca90a64e18c3e93c5 |
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 python | |
import requests | |
SUBDOMAIN='pdt-dank' | |
API_ACCESS_KEY='HjEs6A6KozribnKqm1tX' | |
def get_escalation_policy_oncall(): | |
url = 'https://{0}.pagerduty.com/api/v1/escalation_policies/on_call'.format(SUBDOMAIN) |
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 python | |
import requests | |
SUBDOMAIN='pdt-dank' | |
API_ACCESS_KEY='HjEs6A6KozribnKqm1tX' | |
def get_incidents(): | |
headers = { |
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 python | |
import json | |
import requests | |
SUBDOMAIN='pdt-dank' | |
API_ACCESS_KEY='HjEs6A6KozribnKqm1tX' | |
REQUESTER_ID='PJR28TQ' | |
INCIDENT_ID='PBI9MB9' |
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 python | |
# | |
# Python script to submit Zabbix events to PagerDuty. This script has | |
# been tested with Python 2.6. | |
# | |
# 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: |
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 python | |
# | |
# Python script to submit Zabbix events to PagerDuty. This script has | |
# been tested with Python 2.6. | |
# | |
# 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: |
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
#This script can trigger an incident in PagerDuty | |
#Hit the PagerDuty Integrations API, echo results | |
function POST_Request ($url,$parameters) { | |
$http_request = New-Object -ComObject Msxml2.XMLHTTP | |
$http_request.open('POST', $url, $false) | |
$http_request.setRequestHeader("Content-type", "application/json") | |
$http_request.setRequestHeader("Content-length", $parameters.length) | |
$http_request.setRequestHeader("Connection", "close") | |
$http_request.send($parameters) |
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/Icinga plugin that sends Nagios/Icinga events to PagerDuty. | |
# | |
# Copyright (c) 2011-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: |
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 python | |
import requests | |
import sys | |
import json | |
import time | |
from datetime import date, timedelta | |
#Your PagerDuty API key. A read-only key will work for this. | |
AUTH_TOKEN = 'YOUR_API_TOKEN' |
OlderNewer