Found an indirect method to achieve this, using custom vars defined under Service object, and access them via Notification object.
A sample config is given below:
apply Service "service1" {
# service conf goes here
vars.notification.interval = 5m
}
apply Service "service2" {
# service conf goes here
vars.notification.interval = 2h
}
apply Service "service3" {
# service conf goes here
vars.notification.interval = 0
}
apply Service "service4" {
# service conf goes here
}
apply Notification "notifications1" to Service {
# notification conf goes here
interval = (service.vars.notification.interval) || 20m
}
In the above example, the re-notification interval as follows:
service1: 5 minutes
service2: 2 hours
service3: Notify once, no re-notificaiton
service4: 20 minutes (System default is 30m, here we modified the default to 20 minutes)
Explanation:
interval = (service.vars.notification.interval) || 20m
The value for the variable interval
will be set to service.vars.notification.interval
if it is present, else set to 20m