This file contains hidden or 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 hidden or 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. <[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 hidden or 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' |
This file contains hidden or 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 YOUR-SERVICE-KEY-HERE |
This file contains hidden or 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
using System; | |
using System.IO; | |
using System.Net; | |
using System.Text; | |
namespace Examples.System.Net | |
{ | |
public class WebRequestPostExample | |
{ |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<unload unload_date="2015-01-30 16:06:32"> | |
<sys_remote_update_set action="INSERT_OR_UPDATE"> | |
<collisions/> | |
<commit_date/> | |
<deleted/> | |
<description>PagerDuty is a third-party system used to alerts individuals/teams when an important issue requires attention. The integration with ServiceNow focuses on finding an owner (assignee) for high priority incidents. | |
Integration is supported in both directions allowing incidents to be acknowledged, delegated (assigned to another group) and resolved in either system. The following work models are supported: | |
1. User uses PagerDuty for notification only. Once notified, he/she uses ServiceNow to assign, investigate, resolve the incident. |
This file contains hidden or 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
// High priority incident escalated - use PagerDuty to find Assigned to | |
// To support auto-escalated incidents, needed to add Advanced Script Condition | |
// Evaluates Filter conditions and then advanced conditions (not either/or) | |
// 1. changes() is not respected on a record insert | |
// 2. evaluates filter conditions (on When to run pane) before script conditions | |
// 3. auto-escalated events trap on current.operation() == insert | |
// 4. also needed to change into an 'after' event | |
This file contains hidden or 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 | |
# | |
# Copyright (c) 2011-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 | |
# notice, this list of conditions and the following disclaimer. | |
# * Redistributions in binary form must reproduce the above copyright |
This file contains hidden or 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/perl | |
use LWP::UserAgent; | |
use JSON qw(decode_json); | |
use File::Basename; | |
### Configuration parameters ### | |
# Directory where is stored necessary files with match up ids between Pandora FMS and PagerDuty | |
# One hidden tiny file per alert will be created |
This file contains hidden or 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 csv | |
from datetime import date, timedelta | |
#This script will export all log entries associated with a PagerDuty user. All data is written to log_entries.csv. |