Hi,
I have set up an alert for license expiry, based on the license name and the number of days remaining until expiry. I want to configure the alert to trigger differently depending on the number of days left.
For example,
send an alert once when there are 60 days left, and send daily alerts when there are 7 days left. The alerts are sent to the same email address.
Can these two conditions be configured within the same alert?
Hi,
You could try to create a templated label and two notification policies that will match based on that label. I’m not sure you can send an alert “once” though (unless you have a switch-based label like:
if daysLeft == 60:
label = "first"
else if daysLeft < 7:
label = "daily"
and for all the other conditions there will be no matching (though I’m not sure it would work like intended). (Also the code is nothing near close what you need to write )
1 Like
Thanks for the suggestion @dawiddebowski , but unfortunately it seems setting up different thresholds for different labels is not possible to do in a single alert so I proceeded to create two different alerts
1 Like