lets say i want to check a metric in past. for instance if today is monday and its 12 oclock, i want to check thursday between 17 – 19. is this query correct?
rate(metric_part[5m] offset 4d5h) / rate(metric_whole[5m] offset 4d5h)
also how can i select a range time with this query? it returns an instant vector but i want to graph between 17 – 19. for example is it correct to set offset to 4d7h to shift from 17 to 19 and set panel time selector to -2h?
if this is not correct how can i achieve it?
it is confusing since if in the prometheus panel i run this query it shows current date on data points on the graph. i checked in the google and seems it’s default behaviour since you might join old and current data so date on the panel is always relative to now unless date selector is changed in the panel.
also checked if there’s anyway to set from and to in promql for api request but seems its not possible the set it in the promql.
please help me with this. thanks in advanced
lowkey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.