A fake implementation of OpenTSDB, generating random but repeatable datasets to aid offline testing of API consumers

Usage no npm install needed!

<script type="module">
  import faketsdb from 'https://cdn.skypack.dev/faketsdb';


NPM version NPM downloads GPL License Build Status Coverage


Fake implementation of nodetsdb-api's backend interface


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")


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