Monitoring utilities for qb.
Gathers statistics on the queue size for qb-relyq, and exposes via statsd
or http
, usually in conjunction with qb-statsd and qb-http respectively.
npm install qb-monitor --save
var qbMonitor = require('qb-monitor')
// qb-monitor's http interface can be used on a qb-http instance or a passed in connect app
qb.component(qbMonitor.http, {endpoint: '/my-qb-stats'})
// qb-monitor can also notify statsd (using a qb-statsd instance or other statsd object)
qb.component(qbMonitor.statsd, {interval: 1000, prefix: 'monitor.'})
app
Pass in an expressapp
ifqb-http
isn't being used.endpoint
Place to get stats information (default:'/stats'
)
statsd
Pass in astatsd
client ifqb-statsd
isn't being used.interval
Milliseconds between stats gatheringprefix
Prefix before stats in statsd. Note that the client also can hold a prefix, and theqb-statsd
prefix applies.
MIT in LICENSE file