oaeproject/Hilary — pull request #991 by simong (2014-08-01 14:46:02+00:00)
Title: Statistics module and storage counting

A simple statistics module that allows other modules to push statistics
on a by tenant basis. Eventually there’ll be a possibility to push stats
into statsd.

Currently only a content storage stat has been implemented. This stat
displays the total storage used by a tenant in bytes. The storage stat
collector can be enabled and configured in config.js.
Current configuration options:
* enabled: Whether or not the collector should run on this node
* interval: The interval when the stats should be updated
* expiry: How long a collection can take before something is considered awry

By default only one node in the cluster can refresh the content storage
stats (due to locking). This is so we don't drown the disk in IO operations.