node package manager application monitoring middleware

Monitor you apps with

var bus = require('')(3000);
var monitor = require('');

A full list of options.

The monitor sends messages to the bus so you can configure how it delivers the messages.

var bus = require('')(3000);
var monitor = require('');
bus.use(monitor({actor:'bus monitor', target:'bus monitor', action:'monitoring stuff', interval:1000}));

The monitor will collect stats about your app. It keeps track of messages going in the bus, on the bus, and going to the socket. It will trigger a report event at an interval. You can pass the interval as an option.

var monitor = require('');

You can listen to the report event and consume it however you best see fit.

var events = require('events');
var monitor = require('')();
monitor.on('report', function (report) {

The monitor has a built-in cheesy app that will aggregate reports and send them to its clients.

var monitor = require('');;

You can also just run the app too.

$ cd
$ npm install
PORT=3000 node app/


var monitor = require('')();

Create a new monitor given these options.

var monitor = require('')({actor:'me', target:'me', action:'report', interval:1000});

Access the current report the monitor is populating.

var report =;

Setst he report to a new one.;

Gets the built-in application that visual reports the data.;

You can flush the current report and publish it by calling tick();

monitor.on('report', function (report) {

This will stop the tick() method from being called each interval.


This method is called whenever you attach the monitor to a bus. However, you can always start it again if you happen to clear it.


Triggered each time we collect data from a message.

monitor.on('data', function (data) {

Triggered each time the tick() method is invoked.

monitor.on('report', function (report) {

A monitor populates a report with data it receives from the data event.

var Report = require('').Report;

Makes a new report.

var report = Report();

Returns the passed in report.

var a = Report();
var b = Report(a);
assert.equal(a, b);

Creates a new report given the data.

var data = { 'a':1, 'a.b':2, 'a.b.c': 3 };
var report = Report(data);
assert.equal(, data);

Gets all the data for the report.;

Gets the value for the given key.'some.key');

Sets the value for the given key.'some.key', 1);

Combines the values from the given report into the current report.

var a = Report();'some.key', 1);
var b = Report();'some.key', 1);
assert.equal('some.key'), 2);

Converts the array of elements into a key that will be used in our report.

var data = ['organism', 'insect', 'cricket'];
var key = report.key(data);
assert.equal(key, 'organism.insect.crieck');

Populates a report by incrementing the values given the points. Or if they do not already exist sets them to 1. This may sound confusing so look at the example below.

var data = ['organism', 'insect', 'cricket'];

Now if you call data() you will get this output.

  "animal": 1,

Installation and Environment Setup

Install node.js (See download and install instructions here:

Clone this repository

> git clone

cd into the directory and install the dependencies

> cd
> npm install && npm shrinkwrap --dev

Running Tests

Install coffee-script

> npm install coffee-script -g

Tests are run using grunt. You must first globally install the grunt-cli with npm.

> sudo npm install -g grunt-cli

To run the tests, just run grunt

> grunt spec