This library relies upon rrdtool being installed an available. It can be used to create, destroy, update, fetch, dump, and restore an RRD database. It's a work in progress, and pull-requests are welcomed (with tests, please).
RRD = require('rrd').RRD
rrd = new RRD('valid.rrd')
rrd.create ["DS:temperature:GAUGE:600:U:U", "RRA:AVERAGE:0.5:1:300"], {}, (err) ->
if err
console.log "error: #{err}"
RRD = require('rrd').RRD
rrd = new RRD('valid.rrd')
rrd.update new Date, [100], (err) ->
if err
console.log "error: #{err}"
rrdTime = (date) ->
return Math.round(date.valueOf() / 1000)
RRD = require('rrd').RRD
rrd = new RRD('valid.rrd')
rrd.fetch rrdTime(rrdStartTime), rrdTime(new Date), (err, results) ->
if err
console.log "error: #{err}"
else
console.log results
This library relies upon rrdtool being installed an available. It can be used to create, destroy, update, fetch, dump, and restore an RRD database. It's a work in progress, and pull-requests are welcomed (with tests, please).
This library is available as a npm package.
npm install rrd
This library is used by Hot or Not.
Are you using this in an interesting project? I'd love to hear about it!
You can find more information on my blog.