HTTP API - want full time range of timeseries for past 30 days

1,327 views
Skip to first unread message

dkak...@google.com

unread,
Feb 8, 2018, 9:53:01 PM2/8/18
to Prometheus Users
Hi,

Sorry if this question has already been answered, I did look at past queries, I found folks asking for limits, but my problem is the opposite, I want a massive amount of data for 1 time a day analysis.


I was able to fetch the data I needed from OpenTSDB, but I want to see if I can pull directly from Prometheus which contains the same range of data and wanted to compare.


My problem, is that the start and end intervals are not working, I only get one timestamp worth of day, i really want a full timeseries in 1 hr chunks for past 30 days.

here is my query:





and here is the query check on prometheus , which works fine:

avg(ap_client_count) by (station)



Prometheus returned only one instant in time, not the entire interval of Jan 1 to Feb 7



> str(tsdb_list[[1]][[2]][[2]])
'data.frame': 283 obs. of  2 variables:
 $ metric:'data.frame': 283 obs. of  1 variable:
  ..$ station: chr  "SGRL" "TPJ" "PNBE" "NZM" ...
 $ value :List of 283
  ..$ : chr  "1518142928.865" "2.5"
  ..$ : chr  "1518142928.865" "1.9130434782608696"
  ..$ : chr  "1518142928.865" "5.854838709677419"
  ..$ : chr  "1518142928.865" "7.733333333333333"
  ...
..


QUESTIONS:

1. What could possibly be limiting Prometheus from returning the full time series for the given interval. Julius had posted a while back we have both query and query_range, but do not see any docs on query_range, I thought that was why we have start and end now ?

2. how can I make this query provide me the full 30 days time series, albeit massive amounts of data - prob several 100's MB , is it in chunks ? do  I need to stitch ?


3. any sample queries appreciated


thanks

deepak

BTW hello to Brian, Julius, Richard Goutham, Ben, Murali  etc - was great meeting you at Promcom 2017, I hope we have it again this year.


Simon Pasquier

unread,
Feb 9, 2018, 3:37:20 AM2/9/18
to dkak...@google.com, Prometheus Users
On Fri, Feb 9, 2018 at 3:53 AM, dkakadia via Prometheus Users <promethe...@googlegroups.com> wrote:
Hi,

Sorry if this question has already been answered, I did look at past queries, I found folks asking for limits, but my problem is the opposite, I want a massive amount of data for 1 time a day analysis.


I was able to fetch the data I needed from OpenTSDB, but I want to see if I can pull directly from Prometheus which contains the same range of data and wanted to compare.


My problem, is that the start and end intervals are not working, I only get one timestamp worth of day, i really want a full timeseries in 1 hr chunks for past 30 days.

here is my query:





and here is the query check on prometheus , which works fine:

avg(ap_client_count) by (station)



Prometheus returned only one instant in time, not the entire interval of Jan 1 to Feb 7



> str(tsdb_list[[1]][[2]][[2]])
'data.frame': 283 obs. of  2 variables:
 $ metric:'data.frame': 283 obs. of  1 variable:
  ..$ station: chr  "SGRL" "TPJ" "PNBE" "NZM" ...
 $ value :List of 283
  ..$ : chr  "1518142928.865" "2.5"
  ..$ : chr  "1518142928.865" "1.9130434782608696"
  ..$ : chr  "1518142928.865" "5.854838709677419"
  ..$ : chr  "1518142928.865" "7.733333333333333"
  ...
..


QUESTIONS:

1. What could possibly be limiting Prometheus from returning the full time series for the given interval. Julius had posted a while back we have both query and query_range, but do not see any docs on query_range, I thought that was why we have start and end now ?

you want a range query while the example you posted is an instant query. See:
https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries
 

2. how can I make this query provide me the full 30 days time series, albeit massive amounts of data - prob several 100's MB , is it in chunks ? do  I need to stitch ?


3. any sample queries appreciated


thanks

deepak

BTW hello to Brian, Julius, Richard Goutham, Ben, Murali  etc - was great meeting you at Promcom 2017, I hope we have it again this year.


--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/5a1369f4-5e90-402d-a558-10be226d3808%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages