GithubHelp home page GithubHelp logo

monitor's Introduction

Monitor

Build Status

Remote monitoring for Node.js applications

Introduction

This package provides a foundation for monitoring and controlling remote node.js applications.

It introduces the concept of a Probe - a small software component capable of exposing and controlling state within a running node.js server.

Probes are written as Backbone models, and remain dormant in your process until instantiated from remote monitors.

From the monitoring process, a Monitor class is provided to connect with a remote probe.

This package is used for writing and embedding probes into your app server, and for writing custom clients for inspecting and controlling these probes. A companion package - Node Monitor - provides a user interface for building real time monitor dashboards.

Quick Start

Install using npm

$ npm install monitor

Start the monitor service (standalone)

Normally you'll include this package into your own application server, but you can run as a standalone application as well.

$ npm start monitor

Observe a probe from a remote process

In this example we're using a REPL console to connect with the built-in Process probe.

Open a REPL console from another terminal

$ node

Create a monitor for the Process probe

> var Monitor = require('monitor');
> var processMonitor = new Monitor({server:'localhost', probeClass: 'Process'});

Connect with the probe, and view the properties

> processMonitor.connect();
> processMonitor.toJSON();

The monitor is a Backbone model, so you can watch for changes

> var showFreeMem = function(){console.log(processMonitor.get('freemem'))};
> processMonitor.on('change', showFreeMem);

See Also

  • API-Docs Monitor internal documentation
  • Node Monitor Companion webapp for building real time monitor dashboards

License

Released under the Apache License 2.0

See LICENSE file.

Copyright (c) 2012 Loren West

monitor's People

Contributors

lorenwest avatar

Watchers

Chuck Yang avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.