VMware Modern Apps Community
kuldeepjain
Contributor
Contributor

mavg query timeout when called through the REST api

I am running following wavefront query to get `SINGLE  VALUE` which is Average over the given time range for which the query is being called. This works fine in the dashboard but it times out when called through the REST API. Can this query be optimized:
     mavg(1vw, avg(ts(telegraf.response.times.99.percentile , accountid="123" and env="prod" and myvar!="true”)))
I tried with following but does not help

mavg(1vw, avg(align(900s, mean, ts(telegraf.response.times.99.percentile , accountid=“123” and env=“prod” and myvar!=“true”))))

0 Kudos
1 Reply
humphrey_wf
VMware Employee
VMware Employee

Interesting - I'd expect the API call to return faster than the UI (because there's no need to render anything). What parameters are you using for the API call?

0 Kudos