On 12 Aug 09:12, Johny wrote:

> I have an alert condition based on count of metric value > 0 in last 10 min 
> below a certain threshold.
> count_over_time((mymetric{..} > 0)[10m:1m]) > x
> 
> Problem with this query is it evaluates each min in last 10 min and returns 
> total of 5 even if there was a single data point in db — because of 5 min 
> staleness in Prometheus. I want it to return 1.

If you make sure that the :1m is your scrape interval staleness should
not be an issue.

> 
> Is there a way to filter a metric value in range query without using 
> resolution? Or alternative way to formulate this alert?
> 
> -- 
> 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/6fe0b62b-7aa4-4a43-87ba-030a7bd2e2c1o%40googlegroups.com.


-- 
Julien Pivotto
@roidelapluie

-- 
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/20200812162025.GB880615%40oxygen.

Reply via email to