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 python3 | |
import argparse | |
import os | |
import sys | |
import urllib.parse as url | |
import xml.etree.ElementTree as ET | |
def main(): | |
ap = argparse.ArgumentParser(description="Convert an M3U file to a Brasero " |
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 | |
""" | |
Sample code for a theoretical Splunk plugin to record an observed value as a | |
PagerDuty Impact Metric, and only during incidents triggered via Splunk | |
Requires pdpyras: | |
https://pagerduty.github.io/pdpyras/ | |
""" |
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
#!/bin/bash | |
# PagerDuty Agent | |
COMMAND="/usr/bin/env - /usr/share/pdagent-integrations/bin/pd-nagios" | |
if [ "$NOTIFY_WHAT" = "SERVICE" ]; then | |
$COMMAND -n service -k $NOTIFY_PARAMETER_1 -t $NOTIFY_NOTIFICATIONTYPE -f SERVICEDESC="$NOTIFY_SERVICEDESC" -f SERVICESTATE="$NOTIFY_SERVICESTATE" -f HOSTNAME="$NOTIFY_HOSTNAME" | |
elif [ "$NOTIFY_WHAT" = "HOST" ]; then | |
$COMMAND -n host -k $NOTIFY_PARAMETER_1 -t $NOTIFY_NOTIFICATIONTYPE -f HOSTNAME="$NOTIFY_HOSTNAME" -f HOSTSTATE="$NOTIFY_HOSTSTATE" | |
fi |
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 argparse | |
import logging | |
import os | |
import requests | |
import subprocess | |
import sys | |
from boto.ec2 import get_region |
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 python3 | |
""" | |
@author Demitri Morgan <demitri.morgan@gmail.com> | |
Takes the ugly, poorly-formatted text output from Clipper's web portal... | |
https://www.clippercard.com/ClipperCard/dashboard.jsf | |
...and prints it to stdout in three columns: time, credit and debit. |
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) 2017, 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/env python | |
# | |
# Copyright (c) 2016, 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 | |
# notice, this list of conditions and the following disclaimer in the |
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
' Copyright (c) 2016, 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 | |
' notice, this list of conditions and the following disclaimer in the | |
' documentation and/or other materials provided with the distribution. |
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 | |
# Prints a list of PagerDuty incidents created on a given PagerDuty service over | |
# the past 24 hours. | |
import argparse | |
import time | |
try: | |
import pypd |
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 | |
# Generates a report in CSV format showing the integration emails used on services corresponding to each team | |
import csv,pypd,sys | |
pypd.api_key='' # Your API key here | |
teamobjs = pypd.Team.find() |