Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
140 lines (94 sloc) 3.45 KB


Nibbledb is a simple, light-weight time series database which uses Irmin to store data within Git. The goal is to run over a unikernel using MirageOS. An experimental client is available here.


starting server

docker run -p 8000:8000 -it jptmoore/nibbledb /home/nibble/nibbledb --enable-tls

adding data

Values are floats which can optionally be tagged with extra information. If no timestamp is provided it will be automatically generated as an epoch in millisecond precision.

curl -k --request POST --data '[{"value": 1}, {"value": 2}, {"value": 3}, {"value": 4}, {"value": 5}]' https://localhost:8000/ts/foo
curl -k --request POST --data '[{"value": 10}, {"value": 20}, {"value": 30}, {"value": 40}, {"value": 50}]' https://localhost:8000/ts/bar
curl -k --request POST --data '[{"colour":"red", "value": 1}, {"colour":"blue", "value": 2}, {"colour":"green", "value": 3}, {"colour":"red", "value": 4}, {"colour":"red", "value": 5}]' https://localhost:8000/ts/baz
curl -k --request POST --data '[{"timestamp":1, "value": 100}, {"timestamp":2, "value": 200}, {"timestamp":3, "value": 300}, {"timestamp":4, "value": 400}, {"timestamp":5, "value": 500}]' https://localhost:8000/ts/boz

retrieving data

A typical request to obtain the last n values

curl -k https://localhost:8000/ts/foo/last/3

Finding the combined length of two time series

curl -k https://localhost:8000/ts/foo,bar/length

A range query from a specific point in time

curl -k https://localhost:8000/ts/boz/since/4

A query which filters the result based on matching tagged values and then applies an aggregation function

curl -k https://localhost:8000/ts/baz/last/5/filter/colour/equals/red/count

A query across a time range

curl -k https://localhost:8000/ts/boz/range/3/5

Statistical analysis across different time series

curl -k https://localhost:8000/ts/foo,bar,baz,boz/last/5/sd

Other functions that can be used in above example are: sum,max,min,mean,median,count.

deleting data

The delete API supports range querying across multiple time series with support for filtering

curl -k --request DELETE https://localhost:8000/ts/baz/since/0/filter/colour/contains/re
curl -k https://localhost:8000/ts/baz/since/0

performance data

Finding the number of values of a time series held in memory

curl -k https://localhost:8000/ts/foo/memory/length

Finding the length of an index

curl -k https://localhost:8000/ts/foo/index/length


Flushing the memory of all time series to disk

curl -k https://localhost:8000/ts/sync
curl -k https://localhost:8000/ts/foo,bar,baz,boz/memory/length
You can’t perform that action at this time.