There are two entities. Series and datapoints.
Key must be unique. Tags and attributes are indexed for filtering.
{
id: 'used-internally',
key: 'your-unique-key',
name: 'Human Name',
tags: [ 'filters', 'here' ],
attributes: { key: 'value' }
}
{ key: 'unique-key' }
{
name: 'Series Name',
tags: [ 'new', 'tags' ],
attributes: { a: 'a', b: 'b' }
}
key=some-key
tag=x & tag=y
attr[x]=1 & attr[x]=2
Allow truncation is mutually exclusive with other params.
key=some-key
tag=x & tag=y
attr[x]=1 & attr[x]=2
allow_truncation=true
T is an iso-format string. V is a float. Datapoints belong to a series.
{
t: '2014-01-03T14:23:33.000-0500',
v: 234.928374
}
[
{ t: '2012-01-08T00:21:54.000+0000', v: 3.121 },
{ t: '2012-01-08T00:21:55.000+0000', v: 3.629 }
]
[
{ key: 'unique-key', t: '2012-01-08T00:21:54.000+0000', v: 3.121 },
{ key: 'other-key', t: '2012-01-08T00:21:55.000+0000', v: 3.629 }
]
ts=2012-01-08T00:21:54.000+0000
direction=exact (before, after, nearest)
Start and end are requried.
start=2012-01-08T00:21:54.000+0000
end=2012-01-09T00:21:54.000+0000
rollup.fold=sum (min, max, avg)
rollup.period=1min (6min, 1hour, 2day, PT5M, PT6H)
interpolation.function=linear (zoh)
interpolation.period=1min (6min, 1hour, 2day, PT5M, PT6H)
tz=America/Montreal
limit=5000 (10000)
Same as GET /series/key/:key/segment, except multiple rollup.fold are possible. Returns multipoints, for example with min and max.
{ t: '2012-01-08T00:21:54.000+0000', v: { max: 23.4, min: 42.7 } }
Here's where it gets interesting. 2D rollups. The key is aggregation.fold.
start=2012-01-08T00:21:54.000+0000
end=2012-01-09T00:21:54.000+0000
key=some-key
tag=x & tag=y
attr[x]=1 & attr[x]=2
aggregation.fold=sum (min, max, avg)
rollup.fold=sum (min, max, avg)
rollup.period=1min (6min, 1hour, 2day, PT5M, PT6H)
interpolation.function=linear (zoh)
interpolation.period=1min (6min, 1hour, 2day, PT5M, PT6H)
tz=America/Montreal
limit=5000 (10000)
Basically all rollups.
start=2012-01-08T00:21:54.000+0000
end=2012-01-09T00:21:54.000+0000
tz=America/Montreal
You'll need to sign up for a free tempodb instance. Create a .env
file with tempodb key and secret.
TEMPODB_KEY=******
TEMPODB_SECRET=*****
Add the npm bin to your path.
export PATH="$PATH:node_modules/.bin/"
Clone or fork and clone repository, and then install and run tests.
$ npm install
$ mocha
License: MIT