I was checking if I can access metrics over a period of time. But with 
offset 1d, I am not getting anything with this expression 

request_Count{key="clientId"} offset 1d

Do you know what could be the reason? 

On Saturday, August 14, 2021 at 12:47:51 AM UTC+5:30 Brian Candler wrote:

> That is a range vector, and I still don't know what you're trying to do.
>
> An instant vector, like
>     request_Count{key="clientId"} offset 1d
> should work just fine.
>
> On Friday, 13 August 2021 at 18:58:10 UTC+1 Govind Madhu wrote:
>
>> Additionally I tried to fetch the metric with an offset of 1d like below.
>>
>> request_Count{key="clientId"}[24h] offset 1d
>>
>>
>> It was not coming in console. Current UTC time is 17:53. I tried with an 
>> offset of 6h, it was still not coming. 
>>
>> When I tried with an offset of 5h53m,  I can see some value coming for 
>> the above expression. I was under the impression that with offset you could 
>> get the metric from previous days, but I am unable to get it.
>>
>> On Friday, August 13, 2021 at 11:07:22 PM UTC+5:30 Brian Candler wrote:
>>
>>> > And additionally, when I evaluate the expression 
>>> request_Count{key="clientId"}[24h], I can see the value coming as 2
>>>
>>> That expression gives a range vector as its result: a table of (time X 
>>> value).  It doesn't really make sense in the context of a graph, nor an 
>>> alerting query.  However the PromQL will let you see it in console mode - 
>>> it returns a table of values across the given interval.
>>>
>>

-- 
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/cc04acb5-b55b-4555-bd01-91c9c95f056cn%40googlegroups.com.

Reply via email to