Glad you managed to resolve your issue xkilian! 

Just for some context, the mute_time_intervals mechanism is entirely 
separate to routes and route matching. All it does is 'silence' the route 
from sending out alerts in the specified periods.

The pattern you've discovered of using multiple receivers with the continue 
option is, I believe, the simplest way to achieve what you wanted. 

Cheers,
Ben

On Wednesday, June 30, 2021 at 5:42:01 AM UTC+10 xkilian wrote:

> Ok, I will answer myself.
>
> The way to do this is with continue, continue will permit firing to more 
> than one receiver. I had mistakenly thought that continue would simply 
> continue without firing at first match. Alertmanager is deceptively 
> powerful. The only missing piece is a piece of UI to manage the list of 
> pager numbers for on-call rotation that can now be defined in the 
> alertmanager (offhoursgroup).
>
> # Select receiver based on time of day
>     - match:
>           severity: 5
>       receiver: daygroup
>       mute_time_interval: offhours 
>       continue
>     - match:
>           severity: 5
>       receiver: offhoursgroup    
>       mute_time_interval: workhours 
>
> Then I just need to manage/automate who is in the offhoursgroup based on 
> the rotation schedule. 
>
> This would work for my purposes.
> Le mardi 29 juin 2021 à 14:14:42 UTC-4, xkilian a écrit :
>
>>
>> Can a route use a mute_time_interval as a route matcher criteria?
>>
>>   routes:
>>
>>   # Select receiver based on time of day
>>     - match:
>>           severity: 5
>>       receiver: daygroup 
>>       routes:
>>           - match:
>>               mute_time_interval: offhours 
>>               receiver: offhoursgroup
>>
>>
>> (Not sure the indentation is perfect)
>>
>> Thank you,
>>
>> xkilian
>>
>

-- 
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/64812a2f-6db6-41e8-b195-95e46bec7b03n%40googlegroups.com.

Reply via email to