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 time | |
| import datetime | |
| import requests | |
| import sys | |
| import json | |
| from urllib import urlencode | |
| #Your PagerDuty API key. A read-only key will work for this. |
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 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 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 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 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 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 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 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 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
| # 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) |
NewerOlder