Get value just before or on the timestamp provided for a metric.

14 views
Skip to first unread message

piyush...@perspica.io

unread,
Sep 8, 2017, 8:29:30 AM9/8/17
to OpenTSDB

Use Case
We want to find the last data point for a metric timeseries just before or on a given timestamp. so if there is metric

"sys.cpu.m1" with tag "host" : <h1 | h2 | h3 | h4 >

We want last data point inserted for the metric "sys.cpu.m1" grouped on hosts. We tried highestCurrent(), method of the gexp but it also returns the result with all the dps between the time-span and not just the latest point ( It's not clear to us but, is this expected behaviour?). Is there is anyway possible to achieve this via any http api or with any config change.

PS: This has become a bottle neck for us as we have ~1.5 million hosts for metric "sys.cpu.m1" and cannot do with iterating over the all the dps return for each host between a given timespan.

ManOLamancha

unread,
Jan 29, 2018, 8:19:52 PM1/29/18
to OpenTSDB
Unfortunately we don't have a good way to do this one right now as it's a pretty expensive operation. The best solution is to have an in-memory last-value store and we have something similar to it at Yahoo that we want to OSS, just have to get it out there. 
Reply all
Reply to author
Forward
0 new messages