lib/monitor.js
function Monitor (opt) {
  opt = opt || {};
  this.prefix = opt.prefix || process.env.MONITOR_PREFIX || null;
  this.host = opt.host || process.env.DATADOG_HOST;
  this.port = opt.port || process.env.DATADOG_PORT;
  this.interval = opt.interval || process.env.MONITOR_INTERVAL;
  if (this.host && this.port) {
    this.client = new StatsD(this.host, this.port);
    this.socketsMonitor = new SocketsMonitor(this);
  }
}
function Monitor (opt) {
  opt = opt || {};
  this.prefix = opt.prefix || process.env.MONITOR_PREFIX || null;
  this.host = opt.host || process.env.DATADOG_HOST;
  this.port = opt.port || process.env.DATADOG_PORT;
  this.interval = opt.interval || process.env.MONITOR_INTERVAL;
  if (this.host && this.port) {
    this.client = new StatsD(this.host, this.port);
    this.socketsMonitor = new SocketsMonitor(this);
  }
}
function Monitor ( opt ) { opt = opt || { } ; this . prefix = opt . prefix || process . env . MONITOR_PREFIX || null ; this . host = opt . host || process . env . DATADOG_HOST ; this . port = opt . port || process . env . DATADOG_PORT ; this . interval = opt . interval || process . env . MONITOR_INTERVAL ; if ( this . host && this . port ) { this . client = new StatsD ( this . host , this . port ) ; this . socketsMonitor = new SocketsMonitor ( this ) ; } }
Monitoring and reporting.
@class
@param {object} opt Monitor options.
@param {string} [opt.prefix] User defined event prefix.
@param {string} [opt.host] Datadog host.
@param {string} [opt.port] Datadog port.
@param {string} [opt.interval] Sockets Monitor stats poll interval
Monitoring and reporting .