node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



Monitor the the health and various custom variables for your node.js processes and let Ravenwall check and store the data. Use to view your node.js processes' data in a dashboard, or send email/sms/phone alerts based on the captured data.

Ravenwall captures arbitrary content at intervals, e.g. a JSON blob every 10 seconds. Any data sent can be used for trending, analysis, or alerting.


with npm, do:

npm install ravenwall

Add this line to your code:

var ravenwall = require("ravenwall").demo()

It will log something like the following to the console, follow the link to watch track your node process' health:

Check out your stats at

Or, run the provided demo script in examples/demo.js. It has some simple custom variable collection and reporting.


{ ravenwall_agent: 'nodejs_0.1.9',
   { arch: 'x64',
     platform: 'linux',
     hostname: 'x220',
     uptime: 2836104.000152195,
     loadavg: { '1m': 0.1494140625, '5m': 0.1513671875, '15m': 0.138671875 },
      { cores: 4,
        model: 'Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz',
        speed: 2701 },
     memory: { free: 424890368, total: 8255836160 } },
   { pid: 26358,
     title: 'node',
     uptime: 15.239411229733378,
     user: 'bryce',
      { http_parser: '1.0',
        node: '0.10.12',
        v8: '',
        ares: '1.9.0-DEV',
        uv: '0.10.11',
        zlib: '1.2.3',
        modules: '11',
        openssl: '1.0.1e' },
     active_requests: 1,
     active_handles: 2,
     memory: { rss: 20504576, heapTotal: 16571136, heapUsed: 5504376 } },
  statware: { checktime: 1372281169541, stats_runtime: 0.000482022 } }

Using The Agent

Production mode:

var ravenwall = require("ravenwall")(options)
// E.g. 
var rw = require("ravenwall")({apiToken: MY_API_TOKEN})


The only required option for production mode is a Ravenwall API Token.

  • apiToken {string} -- your Ravenwal API Token, available once you create an account. You may also use the RAVENWALL_API_TOKEN environment variable.
  • id {string} -- Set a series id defining where the reported data will be stored. If not specified a random one will be asigned.
  • tags {Array[string]} -- Tags to add/apply to this series. Tags may be removed on the Ravenwall site. Tags should match /^[a-zA-Z0-9:_-]+$/
  • initial {Object} -- An optional object with properties to seed the series data with.
  • sysstats {Bool} -- Append system stats to each data point. (Default true)
  • procstats {Bool} -- Append process stats to each data point. (Default true)
  • memstats {Bool} -- Append memory stats to each data point. (Default true)
  • push {Bool} -- Set up an http agent to push the data to Ravenwall's API. (Default true)
  • pushSeconds {Int} -- How frequently to push data to Ravenwall for this process, in seconds. Set to <= 0 to disable automatic posting of data. (Default 10)
  • page {Bool} -- Set up a status http server for the process that will list the stats locally. (Default false) E.g. if your pagePort is 7667, http://localhost:7667/stats.json
  • pagePort {Int} -- What port to run the stats page on. (Default 7667)
  • log {Bool} -- Whether to create a recurring stats logger.
  • logHandle {Function} -- A handle to log to. (Default console.log)
  • logSeconds {Int} -- How frequently to log stats. (Default 60)


Start the ravenwall agent in demo mode. Does not require an account but no historical information will be retained, nor any monitors or data aggregation is available.


var rw = require("ravenwall").demo()


Create an asynchronous helper that calls a function to insert your own data. The helper must be in the form function (statObject, next) and call next() when done.


rw.registerHelper(function (statObjeft, next) {
    .exec(function (e, replies) {
      statObjeft.num_accounts = replies.shift()
      statObjeft.num_users = replies.shift()
      statObjeft.burger_count = replies.shift() = replies.shift()
  { num_accounts: 123456,
    num_users: 654321,
    burger_count: 121212121,
    foo: 'The cat says, "Meow."' }


Asynchronously fetch the status manually. You will not typically need to use this.



rw.set(key, value)

Safely set a status value. Will initialize the key if not yet present.


rw.set("foo", "bar")
  {foo: 'bar'}


Safely increment the value stored at a key, initializing the key if not yet present.


  {burgers: 1}

rw.incrementHash(key, member)

Increment key/member value stored as a hash, useful for creating related buckets of counters.


rw.incrementHash("method", req.method)
  { method:
     { GET: 201,
       POST: 19,
       PUT: 10 } }

var capped = rw.cappedHistory(key, max_entries)

Create a fixed-array of max_entries max size. Add entries with capped.push(...). This will create an internal helper that will emit the min/max/mean for this key.

var c = rw.cappedHistory("speed", 1000)
  speed: { min: 1, max: 10, mean: 4.666666666666667 } }