Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@ceejbot/pagerduty-trigger
Advanced tools
Readme
npm install pagerduty-trigger
A small module that allows you to trigger and resolve a PagerDuty alerts.
Set two environment variables:
export PAGER_DUTY_SERVICE=your-service-id
export PAGER_DUTY_API_KEY=an-api-key-with-write-perms
You can then trigger an alert like this:
var trigger = require('pagerduty-trigger');
trigger('Trouble at mill!', function(err, incidentID) {
console.log('incident created with id ' + incidentID);
});
Resolve the same incident like this:
var resolve = require('pagerduty-trigger').resolve;
resolve(incidentID, function(err, response) {
console.log('we have now resolved ' + incidentID);
});
pagerduty-trigger
takes a string as the first argument, representing the description.
triggerAlert("Your description!", function(err, incident_key) {
//your code here
});
pagerduty-trigger
can also take an object as the first argument.
var event = {
"description": "Your description",
"contexts":[
{
"type": "link",
"href": "http://acme.pagerduty.com"
}],
"details": {
"ping time": "1500ms",
"load avg": 0.75
}
};
triggerAlert(event, function(err, incident_key) {
//your code here
});
The resolve()
function requires either a string incident_key argument or an object with an incident_key
field. See PagerDuty's documentation for other fields you might pass.
You can create an event using the handy command-line tool pd-trigger
. Usage:
pd-trigger "One of t'flayrods has gone out of skew on treadle!"
It will respond with the ID of the incident created. You can then feed that ID to the resolve script: pd-resolve incident-id
.
ISC.
FAQs
trigger a pagerduty alert
The npm package @ceejbot/pagerduty-trigger receives a total of 2 weekly downloads. As such, @ceejbot/pagerduty-trigger popularity was classified as not popular.
We found that @ceejbot/pagerduty-trigger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.