Skip to content

Instantly share code, notes, and snippets.

@BrandonZacharie
Last active August 29, 2015 14:24
Show Gist options
  • Save BrandonZacharie/1f64ed2b8fcb10fba82f to your computer and use it in GitHub Desktop.
Save BrandonZacharie/1f64ed2b8fcb10fba82f to your computer and use it in GitHub Desktop.
module.exports = function (hook) {
var hr = hook.open(hook.env.slack, { method: 'POST' });
hr.setHeader('content-type', 'application/json');
hr.end(JSON.stringify({ text: hook.params.message || 'test' }));
hr.pipe(hook.res);
};
module.exports.schema = {
alert_type_causes: 'string'
, alert_type_description: 'string'
, alert_type_resolution: 'string'
, databases: ['string']
, message: 'string'
, severity: 'number'
, source: 'string'
, title: 'string'
, trigger_value: 'string'
, type: 'string'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment