bundles/icinga2: do not send sms or mail for services when sms/mail was disabled for host
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2021-12-04 20:07:36 +01:00
parent 0531ecd217
commit 7eec5c42e3
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 4 additions and 0 deletions

View file

@ -18,6 +18,7 @@ object ServiceGroup "checks_with_mail" {
display_name = "Checks which send E-Mails"
assign where service.vars.notification.mail == true
ignore where host.vars.notification.mail == false
}
object HostGroup "checks_with_sms" {
@ -30,4 +31,5 @@ object ServiceGroup "checks_with_sms" {
display_name = "Checks which send SMS"
assign where service.vars.notification.sms == true
ignore where host.vars.notification.sms == false
}

View file

@ -18,6 +18,7 @@ apply Notification "notify_service-notification" to Service {
}
assign where service.vars.notification.sms == true
ignore where host.vars.notification.sms == false
}
apply Notification "notify_service-notification-mail" to Service {
@ -26,4 +27,5 @@ apply Notification "notify_service-notification-mail" to Service {
assign where service.vars.notification.mail == true
ignore where service.vars.notification.sms == true
ignore where host.vars.notification.mail == false
}