Hello Folks,
I try to approach something like this in notifications:
Apply:
apply Notification "mail-service" to Service {
import "mail-service-notification-template"
user_groups += [ service.vars.notification.mail_contacts.groups ]
assign where service.vars.notification.mail_contacts.groups
}
Template notication 1:
template Service "notification-mail-departmentA-service" {
enable_flapping = true
vars.notification["mail_contacts"] = {
groups = [ "departmentA" ]
}
}
Template notication 2:
template Service "notification-mail-departmentB-service" {
enable_flapping = true
vars.notification["mail_contacts"] = {
groups = [ "departmentB" ]
}
}
Template service check:
template Service "check_A_template" {
import "notification-mail-departmentA-service"
check_command = "..."
...
}
template Service "check_B_template" {
import "notification-mail-departmentB-service"
check_command = "..."
...
}
template Service "check_AB_template" {
import "notification-mail-departmentA-service"
import "notification-mail-departmentB-service"
check_command = "..."
...
}
How could I solve it, without using too many apply rules? Many thanks in advance!
Best regards
David