2.2.1 • Published 6 years ago

pm2plugin v2.2.1

Weekly downloads
59
License
MIT
Repository
github
Last release
6 years ago

pm2plugin

This plugin will pull data from PM2 and publish to New Relic as a plugin

Fork of https://github.com/kenahrens/newrelic-pm2-plugin. Allows plugin to be required as a node module and the poller triggered programatically.

Installation instructions

  • Install the dependency npm install pm2plugin or yarn add pm2plugin
  • In your app's startup script, after you start your app in PM2, require the plugin and pass your New Relic license key to start the listener.
if (process.env.NEW_RELIC_LICENSE_KEY) {
    require('pm2plugin')(process.env.NEW_RELIC_LICENSE_KEY, true);
}

Parameters

pm2plugin(license, debug, hostname, guid, version, url)
ParamTypeDefaultDescription
licenseStringRequiredNew Relic License Key
debugBooleanfalseOutput debug info to the console?
hostnameStringos.hostname()Component name to be shown in NR
guidStringcom.newrelic.pm2pluginNR plugin Guid
versionStringversion from package.jsonThe version of the plugin
urlStringhttps://platform-api.newrelic.com/platform/v1/metricsThe new relic url to post to

PM2 Dashboard

History

  • 2.2.0 - Add hostname parameter
  • 2.0.0 - Convert for use as node module
  • 1.1.0 - Metrics for each PM2 process and added restarts per interval
  • 1.0.4 - Close the connection to PM2 on each poll cycle
  • 1.0.3 - Fix for when errors are not properly handled from Plugin API
  • 1.0.2 - Support for multiple PM2 Servers (run on each PM2 instance)
  • 1.0.1 - Support for single PM2 Server only, separate config file
  • 1.0.0 - Initial prototype
2.2.1

6 years ago

2.2.0

6 years ago

2.1.0

6 years ago

2.0.0

6 years ago