You can send the query "foo[2d]" and then filter the results in the client, 
to just those points where the value is N.

This is a use case where it would be nice to be able to build a range 
vector directly out of a simple instant vector expression, i.e. "(foo == 
N)[2d]".  However that isn't allowed.

A subquery doesn't cut it here, because it resamples the data.  The 
subquery "(foo == N)[2d:1s]" gives an approximation, but for a given point 
you'll see multiple points at 1 second intervals (until the time where foo 
!= N)

On Sunday, 2 January 2022 at 04:09:20 UTC Victor Sudakov wrote:

> Colleagues,
>
> If max_over_time(foo[2d]) returns N, how can I find the exact timestamp(s) 
> in the past when foo=N?
>
> In other words, if there have been very short bursts, how do I find the 
> exact time of those bursts with a PromQL query?
>
> -- 
> Victor Sudakov VAS4-RIPE
> http://vas.tomsk.ru/
> 2:5005/49@fidonet
>

-- 
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/691d1784-4139-465b-89a6-21db373e70c6n%40googlegroups.com.

Reply via email to