Hi Kiran,

On Fri, Jan 15, 2021 at 2:01 PM kiran <[email protected]> wrote:

> Hello all
>
> 1. In PromQL range query what step value is used if I don’t give step
> parameter?
>

The server returns an error if you use the API directly and don't set the
step parameter. However, when using the Prometheus web UI and don't set a
step manually, it sets a default step (
https://github.com/prometheus/prometheus/blob/e483cff61ff1b68e8925db1059393c4d36af9df5/web/ui/react-app/src/pages/graph/Panel.tsx#L114)
that depends on the graph range. It's basically the graph range divided by
250, so a 250-minute graph range would get a 1-minute step and a 500-minute
time range would get a 2-minute step.


> 2. Is there a way to determine for the given start and end dates, what is
> the step value I can give so it’s with the limit where query can handle?
>

No, at least not without first looking at the data more and determining how
many samples there would be under a given graph range. You need to somehow
keep the total number of returned points <=11k.

E.g I used a query for last 30 days and I gave 1 min as step and it threw a
> limitation error. So wondering if there is a way I could know what step
> value is appropriate for the given period.
>

Note that the 11k-point limit only applies to range queries. If your goal
is to extract raw data at the resolution that it was scraped over 30d, you
could run an instant query like "my_metric[30d]".

Regards,
Julius

-- 
Julius Volz
PromLabs - promlabs.com

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAObpH5ydfm00mBWoet%2BA4oLwQRfWpSbsOMoHibE6uu97T2qH%3DQ%40mail.gmail.com.

Reply via email to