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
// 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 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. <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 |
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/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 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. |
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 YOUR-SERVICE-KEY-HERE |
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 users from Active Directory to PagerDuty | |
# Requires Windows Server 2008 R2 | |
# Users should be members of a security group named "pagerduty" | |
Import-Module activedirectory | |
# Import users via the PD API | |
function POST_Request ($url,$parameters, $api_key) { | |
$http_request = New-Object -ComObject Msxml2.XMLHTTP | |
$http_request.open('POST', $url, $false) |
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. <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
define command { | |
command_name notify-service-by-pagerduty | |
command_line /usr/local/bin/pagerduty_icinga.pl enqueue -f pd_nagios_object=service -f CONTACTPAGER="$CONTACTPAGER$" -f NOTIFICATIONTYPE="$NOTIFICATIONTYPE$" -f HOSTNAME="$HOSTNAME$" -f SERVICEDESC="$SERVICEDESC$" -f SERVICESTATE="$SERVICESTATE$" | |
} | |
define command { | |
command_name notify-host-by-pagerduty | |
command_line /usr/local/bin/pagerduty_icinga.pl enqueue -f pd_nagios_object=host -f CONTACTPAGER="$CONTACTPAGER$" -f NOTIFICATIONTYPE="$NOTIFICATIONTYPE$" -f HOSTNAME="$HOSTNAME$" -f HOSTSTATE="$HOSTSTATE$" | |
} |
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 time | |
import datetime | |
import requests | |
import sys | |
import json | |
from urllib import urlencode | |
# How many notifications had to be escalated past the primary, due to lack of response? |
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 time | |
import datetime | |
import requests | |
import sys | |
import json | |
from urllib import urlencode | |
# How many notifications had to be escalated past the primary, due to lack of response? |