diff options
Diffstat (limited to 'zones.d/master/notifications.conf')
| -rw-r--r-- | zones.d/master/notifications.conf | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/zones.d/master/notifications.conf b/zones.d/master/notifications.conf new file mode 100644 index 0000000..b980851 --- /dev/null +++ b/zones.d/master/notifications.conf @@ -0,0 +1,72 @@ +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 +} |
