How to use the @pm2/io.notifyError function in @pm2/io

To help you get started, we’ve selected a few @pm2/io examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github keymetrics / pm2-server-monit / src / index.js View on Github external
}, function (err, conf) {
  if (err) {
    io.notifyError(err)
    return process.exit(1)
  }

  const cpu = new CPUMetrics(io, conf) // eslint-disable-line
  const network = new NetworkMetrics(io, conf)  // eslint-disable-line
  const disk = new DiskMetrics(io, conf)  // eslint-disable-line
  const memory = new MemoryMetrics(io, conf) // eslint-disable-line
  const fd = new FSMetrics(io, conf) // eslint-disable-line
  const tty = new TTYMetrics(io, conf) // eslint-disable-line
  const processes = new ProcessesMetrics(io, conf) // eslint-disable-line
  const actions = new MonitoringActions()
  actions.expose(io)
})
github keymetrics / pm2-elasticsearch / lib / stats.js View on Github external
], (err, data) => {
    if (err) {
      console.error(err)
      return io.notifyError(err)
    }
    // lets update metrics
    for (let i = 0, max = metrics.length; i < max; i++) {
      var metric = metrics[i]
      let stats = {}

      // depending on the stats source
      switch (metric.from) {
        case 'cluster': {
          stats = data[0][0]
          break
        }
        case 'cluster_health': {
          stats = data[2][0]
          break
        }

@pm2/io

PM2.io NodeJS APM

Apache-2.0
Latest version published 9 days ago

Package Health Score

83 / 100
Full package analysis

Similar packages