Morning everyone,
I have a prometheus alert that looks like that :
whatever_expr > 0.10 AND ON() absent(hour() >= 2 <= 3)
That excludes alert during some maintenance schedule.
Now that I want to unit test it, I can't find any information to mock the result of the hour()
function.
I would like to do something like that in the test.yaml
- interval: 1m
input_series:
- series: 'hour'
values: 2 2 2 2 2 2 2 2 2 2
I start to think it's not even possible ?
If any idea, I'd be glad to hear it :)