template Notification "generic-notification" { types = [ Problem, Acknowledgement, Recovery, Custom, FlappingStart, FlappingEnd, ] } template Notification "generic-host-notification" { import "generic-notification" states = [ Up, Down ] } template Notification "generic-service-notification" { import "generic-notification" states = [ OK, Warning, Critical, Unknown ] } apply Notification "mail" to Host { import "generic-host-notification" command = "mail-host-notification" user_groups = host.vars.notification.mail.groups users = host.vars.notification.mail.users interval = 2h assign where host.vars.notification.mail } apply Notification "mail" to Service { import "generic-service-notification" command = "mail-service-notification" user_groups = host.vars.notification.mail.groups users = host.vars.notification.mail.users interval = 2h assign where host.vars.notification.mail } apply Notification "telegram" to Host { import "generic-host-notification" command = "telegram-host-notification" user_groups = host.vars.notification.telegram.groups users = host.vars.notification.telegram.users interval = 2h assign where host.vars.notification.telegram } apply Notification "telegram" to Service { import "generic-service-notification" command = "telegram-service-notification" user_groups = host.vars.notification.telegram.groups users = host.vars.notification.telegram.users interval = 2h assign where host.vars.notification.telegram }