pagerduty-alert
v1.0.3
Published
A simple PagerDuty alert trigger that acts like console.log() and returns an axios request promise.
Downloads
42
Readme
pagerduty-alert
A simple PagerDuty alert trigger that acts like console.log() and returns an axios request promise.
npm install pagerduty-alert --save
Usage
Set the PAGERDUTY_INTEGRATION_KEY environment variable to the GUID of one of your "Generic API" services. Go to a service and add a new integration that uses the PagerDuty API directly (a generic API integration).
export PAGERDUTY_INTEGRATION_KEY=service-integration-key
var alert = require('pagerduty-alert');
// You can use console.log style flexible arguments
alert.log('Send an alert', { with: 'objects' }, new Error('And error stack traces'));
// Or use 'trigger' event type attributes
alert.trigger('Alert description', { details: 'Use an object'}, 'The client', 'http://clienturl');
License
ISC