
Company News
Socket Joins the OpenJS Foundation
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.
A Node.js module for sending heartbeats to OpsGenie.
When operating a Node.js app, you need to be notified of downtime. Services like Pingdom allow you to monitor the availability of your app by pinging it periodically and alerting you if it cannot be reached. But this requires your app to be available online.
If your app is running behind a firewall (intranet) or it's a background job not inteded to be publically available, Pingdom and similar services have no way of pinging it. The solution of cause is to reverse the roles and let your app ping the monitoring service. OpsGenie provide such an API.
npm install opsgenie
You can either configure OpsGenie using environment variables, or configure it using the .heartbeat() function.
OpsGenie environment variables:
OPSGENIE_API_KEY - Your personal OpsGenie API keyOPSGENIE_NAME - The hostname that the OpsGenie heartbeat agent should register as (optional)If no name is provided, either by OPSGENIE_NAME or by setting it via the .heartbeat() function, the hostname of the server will be used.
Example 1 - Using OpsGenie with environment variables:
require('opsgenie');
Example 2 - Configure OpsGenie using the .heartbeat() function:
require('opsgenie').heartbeat({
apiKey: 'eb243592-faa2-4ba2-a551q-1afdf565c889',
name: 'host-name'
});
The OpsGenie module can emit the following events:
var opsgenie = require('opsgenie');
opsgenie.on('error', function (err) {
console.log('Something went wrong while communicating with OpsGenie: ' + err.message);
});
opsgenie.on('heartbeat', function (res) {
console.log('OpsGenie heartbeat result:', res);
});
MIT
FAQs
A module for sending heartbeats to OpsGenie
The npm package opsgenie receives a total of 9 weekly downloads. As such, opsgenie popularity was classified as not popular.
We found that opsgenie 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.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.