Last active
August 29, 2015 14:15
-
-
Save eurica/f8c9089e167b79ecc381 to your computer and use it in GitHub Desktop.
Manually Trigger an incident in PagerDuty
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 is the button I'm using to trigger the incident: | |
<input type="button" onclick="PDTrigger(prompt('Incident Description'))" value="Trigger Incident"> | |
*/ | |
// Set up the library | |
PDJS = new PDJSobj() | |
function PDTrigger(description) { | |
// Trigger via the rest API | |
PDJS.trigger({ | |
service_key: "660ca1d238914a2e8cb26248687cba20", | |
description: description, | |
incident_key: "manual_incident_"+Math.random(), | |
details: { | |
language: "English", | |
page: "http://euri.ca" | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment