Package Exports
- monitor
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (monitor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
NodeJS Monitoring
Remote monitoring and control for your node.js app
Introduction
This is the core library for remote monitoring and control of your NodeJS app.
Think of it as a supercharged JMX for NodeJS:
- Easy to embed - Add to your app with 1 line of code
- Auto discovery - Finds all instances of your app on a server
- Remote REPL - Remote login to your running apps
- Process information - CPU load, memory usage, uptime, etc.
- Backbone.js integration - Remotely monitor Backbone.js models, with active updates
- Configuration control - Inspect and tune your app configurations while running
- Powerful - Enterprise grade for multi-node deployments
- Lightweight - Trim enough to run in a Raspberry Pi or BeagleBoard
- Hackable - For specialized monitoring, and a plugin directory
Quick Start
Install using npm
$ npm install monitorRun standalone
Play with the built-in server before embedding into your app:
$ npm start monitorRemotely Connect
The best way to monitor and control the app is with the Monitor Dashboard, but for this example we'll go headless, driving it from another node.js process.
With the above server running in another window...
Create a test.js
// Get a monitor to the Process probe
var Monitor = require('monitor');
var processMonitor = new Monitor({server:'localhost', probeClass: 'Process'});
processMonitor.connect(function(error) {
// Show the contents of the monitor
console.log(processMonitor);
// Remote monitors are Backbone.js models,
// so you can observe them as they change
processMonitor.on('change', function() {
console.log(processMonitor.get('freemem'));
});
});Try it out
node test.jsYou should see all data from the process montitor, followed by an ongoing report of available memory.
Embedding Into Your App
Now add to your app
Place the following line into your app server bootstrap:
require('monitor').start();Now start your app server and run the same test.js, design your own monitoring client, or build a visual control center with the Monitor Dashboard app.
More Information
License
May be freely distributed under the MIT license
See LICENSE file.
Copyright (c) 2010-2013 Loren West
