Trigger Stackdriver on pdt-alper
by eurica
HTML
<script src="https://eurica.github.io/pdjs/js/pdjs.js"></script>
<button onclick="trigger()" style="display: block; width:100%; height:20em"><h1>
Run
</h1></button>
JavaScript
// Set up the library
PDJS = new PDJSobj()
trigger = function() {
// Trigger via the rest API
PDJS.trigger({
url:"https://events.pagerduty.com/integration/ce419c6678004fb780469f2e5174db5d/enqueue",
incident_key: "stackdriver__" + Math.random(),
description: "New Relic incident",
"client": "New Relic",
"client_url": "https://app.google.stackdriver.com/select-customer?customer_id=1112508&next=/violations/699b350f-6b56-4cbc-97de-6d6fe01b5af4",
"details": {
},
success: function(json) {
console.log(json)
alert(JSON.stringify(json))
}
})
}