diff --git a/hooks/squadcast/README.md b/hooks/squadcast/README.md new file mode 100644 index 0000000..0d467c4 --- /dev/null +++ b/hooks/squadcast/README.md @@ -0,0 +1,11 @@ +### Squadcast + +Get notified in near real-time as errors occur on your site by sending events into Squadcast. + +#### How to obtain your Errorception Webhook in Squadcast: + +1. Head over to Services from the navigation bar on the left +2. For the Service of your choice, click on Alert Sources +3. Search for "Errorception" from the dropdown +4. Copy the Webhook available on the right +5. Use this copied Webhook within Settings > Service Hooks > Squadcast in Errorception \ No newline at end of file diff --git a/hooks/squadcast/index.js b/hooks/squadcast/index.js new file mode 100644 index 0000000..77dd4b9 --- /dev/null +++ b/hooks/squadcast/index.js @@ -0,0 +1,24 @@ +var request = require("request"), + hash = require("node_hash"); + +exports.serviceName = "WebHooks"; + +exports.author = { + name: "Anusha Ravindra", + email: "it@squadcast.com", + github: "SquadcastHub", + twitter: "squadcastHQ" +}; + +exports.onError = function(error, settings, done) { + request({ + url: settings.url, + headers: { + "Content-Type": "application/json", + "User-Agent": "Errorception Notifications" + }, + method: "post", + body: JSON.stringify(error), + timeout: 10000 + }, done); +};