I am trying to obtain counts (sum) over time for various metrics. Here
is my query:
This returns:
user.setup 1317342007 1
user.setup 1317344917 1
user.setup 1317354274 1
I was hoping for a single line like:
user.setup 1317354274 3
Is there an examples page showing common aggregations?
My notion was to flip the 'ascii' parameter to 'json' as in:
http://my-host:4242/q?start=2011/09/01-00:00:00&end=2011/09/30-23:59:59&m=sum:user.setup&o=&yrange=[0:]&json&nocache=1
{
"plotted": 7,
"points": 7,
"etags": [
[
"user_id"
]
],
"timing": 31
}
So my first question is "what is the correct method of obtaining a
total count over time?" My follow up question is "(how) can I get data
summarized by day over a date range?"
Thanks!
--
- - - - - - - - - - - - - - - - - - - - - - - -
randy...@gmail.com
NOTICE: The information contained in this e-mail is confidential and
is for the use only of the intended recipient. If you are not the
intended recipient, any disclosure, copy, distribution or other use of
this information is prohibited. If you have received this
communication in error please notify us immediately by telephone and
delete or discard this message immediately.
It sounds like you're trying to downsample your data to a 1d-sum.
Search for the world "downsample" in
http://opentsdb.net/http-api.html#/q_Parameters
--
Benoit "tsuna" Sigoure
Software Engineer @ www.StumbleUpon.com
I added this as in:
q?start=2011/09/28-12:00:00&end=2011/09/30-13:51:38&m=sum:1d-sum:user.count&o=&yrange=[0:]&ascii
Which hands back 9 lines, each with a value of 1 and a timestamp. If I
change ascii to json, it returns 9 points in a single closure.
I guess what I'm trying to do is to replicate the following SQL in
opentsdb language:
SELECT date_created, COUNT(*)
FROM table
GROUP BY date_created;
Is this possible?
q?start=2011/09/28-12:00:00&end=2011/09/30-13:51:38&m=sum:1d-sum:user.count&o=&yrange=[0:]&ascii
vs
q?start=2011/09/28-12:00:00&end=2011/09/30-13:51:38&m=sum:user.count&o=&yrange=[0:]&ascii
I'm assuming the downsample would group by Nday.