This module is a plugin for the Seneca framework. It provides a message throughput statistics.
Current Version: 0.1.2
Tested on: Seneca 0.6.0, Node 0.10.33
var influxOptions = { host:'localhost',
port: 8086,
username:'root',
password:'root',
database:'test_db',
seriesName:'test_series'
};
seneca.use('msgstats', {pin:{}, influxOpts:influxOptions});
Options can also be set in options.mine.js, e.g:
msgstats: {
pin:{},
influxOpts:{
host:'localhost',
port: 8086,
username:'root',
password:'root',
database:'test_db2',
seriesName:'actions'
}
}
seneca.use('msgstats');
InfluxDB must be installed. Please see the installation guide here: http://influxdb.com/docs/v0.6/introduction/installation.html
npm install seneca
npm install seneca-msgstats
To capture all seneca actions, set the pin in the options to:
pin: {}
To only capture role:web
actions, set the pin to:
pin: {role:'web'}
Foo.
role:msgstats, cmd:foo
foo
Bar.
mocha test/*.test.js