faketsdb

0.4.0 • Public • Published

NPM version NPM downloads GPL License Build Status Coverage

faketsdb

Fake implementation of nodetsdb-api's backend interface

Usage

Run standalone from the command line:

npm start

Or with options:

node faketsdb.js -p 4242 -v

Or embed in an existing application using Express:

var app = express();
var faketsdb = require('faketsdb');
// config optional, sensible defaults exist
var config = {
    probabilities: {
        noData: 0.1,
        missingPoint: 0.1
    }
};
faketsdb.installFakeTsdb(app, config);

var server = app.listen(4242, function() {
    var host = server.address().address
    var port = server.address().port

    console.log('FakeTSDB running at http://%s:%s', host, port)
});

// add some time series
faketsdb.addTimeSeries("some.metric", {host:"host01}, "gauge")

License

Faketsdb is freely distributable under the terms of the GPL license.

Readme

Keywords

Package Sidebar

Install

npm i faketsdb

Weekly Downloads

3

Version

0.4.0

License

GPL-3.0-or-later

Unpacked Size

57.4 kB

Total Files

6

Last publish

Collaborators

  • eswdd