visor

Lightweight and extensible program monitoring for node

visor

Lightweight and extensible program monitoring for node

$ npm install visor
var visor = require('visor');
 
// Use visor to track some interesting properties:
visor.requests = 0;
visor.errors = 0;
 
// Later...
 
function handleRequest(err, req) {
    visor.requests++;
    if (err) { visor.errors++; }
}
 
// Several transports are available to query the visor externally:
 
// visor-file writes the visor to a JSON file at a set interval.
var visorFile = require('visor-file');
 
// visor-http makes the visor queryable via a RESTful HTTP interface.
var visorHttp = require('visor-http');
 
// visor-socketio makes the visor queryable via Socket.IO.
var visorSocketIO = require('visor-socketio');