The only ways I know are to use the Prometheus API 
<https://prometheus.io/docs/prometheus/latest/querying/api/#instant-queries> 
and set the evaluation time, or to use the @ timestamp 
<https://prometheus.io/docs/prometheus/latest/querying/basics/#modifier> PromQL 
modifier. But in either case you have to work out the timestamp of the end 
of the 24 hours of interest, and insert it yourself.

On Friday 9 February 2024 at 14:29:39 UTC Dipesh J wrote:

> Hi, 
>
> Is there way to get metrics only for current date instead of using time 
> like [24h] which would probably give metrics for day before too.
>
> last 24 hours
> my_metric{node="ABC"} [24h]
>
> Something like below to give metrics for current date only.
> my_metric{node="ABC"} [TODAYS_DATE]
>
>
> Thanks
>

-- 
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/6f37d3e0-f044-46bb-9c9a-0933c41741acn%40googlegroups.com.

Reply via email to