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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/8890d23c-5214-473e-874c-dcc12f4398ado%40googlegroups.com.