Hey Guys ,
I have a doubt on how the result of an alert condition is evaluated.
Below is my configuration for prometheus
*evaluation_interval: 1m*
* scrape_interval: 1m*
Now my query is as below
avg(metric_first_asr{locale=~"en-gb"}) by (locale) >= 80 AND
avg(metric_first_asr{locale=~"en-gb"}) by (locale) < 95 OR
absent(metric_first_asr{locale=~"en-gb"}) == 1
for: 5m
labels:
severity: warning
Here i want to define a warning threshold when condition evaluates to a
value of 80-95
I have specified absent condition so that when there is no data , value in
that case is equal to 1
now given my evaluation period is 1 min and I am taking average for 5 min
... will my condition evaluated like this as below
100 + 100 + 1 + 100 +100 / 5
Considering data is evaluated after one minute and after each minute value
was 100 in 4 cases and there was no data in one instance so that value will
be replaced by 1 so my actual value will be
401/5 = 80.02
Am I doing he right calculations ? or the way Prometheus calculates value
is different ? Please suggest
On Sun, May 3, 2020 at 2:22 AM Brian Candler <[email protected]> wrote:
> Why not try it in the PromQL expression browser built in to prometheus (in
> the prometheus web interface at port 9090)
>
> --
> 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/0de10032-0ae8-43d5-8ea1-faef17a3e07b%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/0de10032-0ae8-43d5-8ea1-faef17a3e07b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
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/CAPz289tmiXyi4xSNsECiL3Lpe0ighVHPMDRvukQ-RVzyUXHnkA%40mail.gmail.com.