level-prometheus-metrics
v2.1.0
Published
Instruments a LevelDB Instance with Prometheus Compatible Metrics Collection
Downloads
16
Readme
level-prometheus-metrics
Instruments a LevelDB instances with metric collection and can expose it via an HTTP port for collection by a Prometheus server. Uses https://github.com/ekristen/prometheus-client-js.
Usage
This will expose metrics at http://localhost:6754/metrics
var level = require('level')
var metrics = require('level-prometheus-metrics')
level('./db', function(err, db) {
metrics(db)
db.metrics.createServer().listen()
setInterval(function() {
db.put('one', 'two', function() {
})
}, 500)
})