Skip to content

Instantly share code, notes, and snippets.

Created June 17, 2016 08:44
What would you like to do?
var webhook = PD.inputRequest;
var event_type = PD.Trigger;
if(webhook.body.check_result == "OK") {event_type = PD.Resolve;}
var normalized_event = {
event_type: event_type,
incident_key: webhook.body.server_name,
description: webhook.body.check_output,
details: webhook.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment