Additionally, if you have multiple input series values, how is it reflected 
on the expression? Is the '5 5 5' applied to every minute, or does it mean 
that each minute 0 through 2 has a value of 5?

On Tuesday, June 9, 2020 at 9:57:19 AM UTC-4, Tashfia Rahman wrote:
>
> Hi all,
>
> I'm using Promtool for unit testing alert rules, and I'm having trouble 
> understanding the behavior for unspecific input_series values.
>
> For example, say I have an alert rule that fires for the expression x == 
> 5. 
>
> - alert: test_alert
> expr: x == 5
> labels:
> severity: page
> annotations:
> description: "x is {{ $value }}"
> summary: "x is {{ $value }}"
>
> When I run this test with my input_series values '5 5 5' I'm only 
> specifying input values for minutes 0, 1, and 2.
>
> - interval: 1m
> input_series:
> - series: 'x'
> values: '5 5 5' 
> alert_rule_test:
> - eval_time: 7m
> alertname: test_alert
> exp_alerts:
> - exp_labels:
> severity: page
> exp_annotations:
> description: "x is 5"
> summary: "x is 5"
>
> As expected, the alert fires for eval_time 0m through 2m. However, the 
> alert still fires when I make the eval_time anywhere from 3m through 7m, 
> but then fails with 8m and later. I'm not sure why 3-7 work and then at 8 
> it stops working.
>
> I've tried some other scenarios and can't find a pattern for when 
> unspecified values do/don't work. I'm not sure if I am misinterpreting 
> something here, so any help would be greatly appreciated.
>
> Thanks in advance! 
>
>
>

-- 
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/dfc0de2a-312d-405a-9cdd-01fbcf11a631o%40googlegroups.com.

Reply via email to