Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rrdjs

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rrdjs

minimal node native bindings to the rrdtool libraries

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

rrdjs

Minimal native bindings to the rrdtool libraries. The rrdtool source is embedded to minimize external dependencies.

Usage

var rrdjs = require('rrdjs');

var sources = [ "DS:test:GAUGE:120:U:U", "RRA:AVERAGE:0.5:1:129600" ];
rrdjs.create('test.rrd', 60, Date.now() / 1000, sources, created);

function created(err) {
  if (err) throw err;
  var time = Date.now() / 1000, sample = 100;
  rrdjs.update('test.rrd', 'test', [ time + ':' + sample ], updated);
}

function updated(err) {
  if (err) throw err;
  var time = Date.now() / 1000;
  rrdjs.fetch('test.rrd', 'AVERAGE', time - 300, time, 60, fetched)
}

function fetched(err, data) {
  if (err) throw err;
  console.log("Got some data", data);
}

API

rrdjs.create(file, step, start, args, callback)

Create an rrd file with the given step and start. The args array specifies the data sources and averages.

rrdjs.info(file, callback)

Retreive information about the given rrd file.

rrdjs.update(file, ds, args, callback)

Insert data into the rrd file.

rrdjs.fetch(file, start, end, step, callback)

Retreive data from the rrd file.

License

ISC

FAQs

Package last updated on 03 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc